# |
Jan 18th 2019, 09:57 |
slackebot1 |
Crud: json api converter pick it up so it returns my entity as json:api format? Thanks in advance |
# |
Jan 18th 2019, 09:57 |
roel |
Hello everyone, currently I am using the Crud Json Api plugin for my api, all the "standard" Crud functions work perfectly. I have made a custom function in one of my api controllers, when I set a variable (with `_serialize`) to the view it doesn't seem to trigger the `DynamicEntitySchema` and convert it into a json:api format (https://crud-json-api.readthedocs.io/en/latest/listener-configuration/schemas.html) My question is: How can I let the |
# |
Jan 18th 2019, 09:48 |
mocelle |
How can i search encrypted data from db? |
# |
Jan 18th 2019, 09:33 |
k4t |
thank you |
# |
Jan 18th 2019, 09:32 |
admad |
Yes |
# |
Jan 18th 2019, 09:32 |
k4t |
and latter param will always win, right? no matter of environment |
# |
Jan 18th 2019, 09:32 |
admad |
Knowing whether a field/input was present or not is required mainly for POST for validation purposes |
# |
Jan 18th 2019, 09:31 |
admad |
s/different/differentiate |
# |
Jan 18th 2019, 09:30 |
admad |
If you are using GET then depending on your use case you can turn off the hidden field |
# |
Jan 18th 2019, 09:29 |
admad |
The hidden field is necessary cause by default if checkbox is unchecked html won't produce anything, so you won't be able to different when the checkbox wasn't checked or it didn't exist at all in form |
# |
Jan 18th 2019, 09:28 |
admad |
@k4t yes that's expected, the 1st with 0 is for the hidden field. The latter with 1 will be present only when checkbox is checked. |
# |
Jan 18th 2019, 09:19 |
k4t |
thank you |
# |
Jan 18th 2019, 09:19 |
k4t |
ok, just wanted to know wheater I created a bug or it is normal |
# |
Jan 18th 2019, 09:18 |
neon1024 |
Or, you implement PRG |
# |
Jan 18th 2019, 09:18 |
neon1024 |
You either disable the hiddenField or live with two query params |
# |
Jan 18th 2019, 09:18 |
neon1024 |
Then there is nothing you can do. |
# |
Jan 18th 2019, 09:17 |
k4t |
I am getting: suche?trackTopic=0andtrackTopic=1 instead of suche?trackTopic=1 which looks weird... and I can not disable hiddenField |
# |
Jan 18th 2019, 09:17 |
neon1024 |
Wat |
# |
Jan 18th 2019, 09:16 |
k4t |
so this is normal that paramter in querystring is not overwritten? |
# |
Jan 18th 2019, 09:16 |
neon1024 |
Right, so where does the witch come into things? |
# |
Jan 18th 2019, 09:16 |
k4t |
and I can turn it off like you siad |
# |
Jan 18th 2019, 09:16 |
k4t |
yes, yes, I know |
# |
Jan 18th 2019, 09:16 |
neon1024 |
YOu can turn it off with the `hiddenField => false` option |
# |
Jan 18th 2019, 09:15 |
neon1024 |
That’s just because by default the Cake FormHelper will create a hidden field |
# |
Jan 18th 2019, 09:15 |
k4t |
I think it should be only: suche?trackTopic=1 |
# |
Jan 18th 2019, 09:15 |
k4t |
I am not sure if this is normal behavior but when I create form with checkbox called "trackTopic" and when I submit that form with checked checkbox via GET then my querystring in url contains duplicated parameters: suche?trackTopic=0andtrackTopic=1 |
# |
Jan 18th 2019, 09:13 |
neon1024 |
@kat |
# |
Jan 18th 2019, 09:12 |
Guest85165 |
Aaaah... if I rename the "Positions" belongsToMany association, it will no longer be removed by the "Users.Positions" |
# |
Jan 18th 2019, 09:12 |
k4t |
@neon1024 did you work witch checkboxes in Cake? |
# |
Jan 18th 2019, 09:08 |
Guest85165 |
placed as last in the contain.... Could it be a collision into the same PositionsTable |
# |
Jan 18th 2019, 09:08 |
Guest85165 |
I have a funny case that may or may not have a explanations with it.... I am trying to pulls a list of records that has 4 associations. 3 belongsTo and 1 belongsToMany. The belongsToMany associates to table Positions, while one of the belongsTo associated to Users.Positions. Apparently when Users.Positions (the Positions) is placed first in the contain array, it will nuke the belongsToMany from the record unless it gets |
# |
Jan 18th 2019, 08:57 |
k4t |
@dereuromark, @admad could you please check my question above in ur free time? |
# |
Jan 18th 2019, 08:49 |
asdfghj |
guys i have a strange request...the customer is asking me to show random results... it is simple...BUT how to deal with the pagination? the results on first page can be seen on other pages too |
# |
Jan 18th 2019, 08:48 |
asdfghj |
hello |
# |
Jan 18th 2019, 08:35 |
k4t |
I think that in that situation I still should have one parameter in query string: andtrackTopic=1 instead of trackTopic=0andtrackTopic=1 |
# |
Jan 18th 2019, 08:34 |
k4t |
query string contain duplicated parameters only when form is submitted with checked trakcTopic checkbox |
# |
Jan 18th 2019, 08:33 |
k4t |
I know I can turn it off by setting hiddenFields to false on checkbox but still I am not sure if my current behavior is correct when hiddenField flag i enabled |
# |
Jan 18th 2019, 08:32 |
k4t |
as you can see there is duplication |
# |
Jan 18th 2019, 08:32 |
k4t |
Hi, is it normal that when I submit GET form with checkbox called "trackTopic" (all created with Form Helper) then contains following query string: suche?trackTopic=0andtrackTopic=1 ? |
# |
Jan 18th 2019, 06:09 |
rhkz63rky7 |
@admad Thank you in advance |
# |
Jan 18th 2019, 06:06 |
admad |
@rhkz63rky7 fire away |