[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586008#action_12586008 ] Carsten Ziegeler commented on SLING-355: This is how it is currently implemented > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler >Assignee: Carsten Ziegeler > Fix For: 2.0.0 > > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585645#action_12585645 ] Tobias Bocanegra commented on SLING-355: ok. consistency is better :-) removing all properties with empty strings is ok then, if they are not mandatory and if they dont have a defaultValue assigned. > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler >Assignee: Carsten Ziegeler > Fix For: 2.0.0 > > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585638#action_12585638 ] Felix Meschberger commented on SLING-355: - > what was the resolution on this? why is this issue closed now? Because it was fixed as initially described. > as for numbers, i agree that an empty string can be ignored or even force a > removal of the property. > however i would try to set the value anyways and if it fails try to remove it. This is the problem we are facing: It creates inconsistent behaviour depending on the property type. IMHO this is not acceptable > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler >Assignee: Carsten Ziegeler > Fix For: 2.0.0 > > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585626#action_12585626 ] Tobias Bocanegra commented on SLING-355: what was the resolution on this? why is this issue closed now? > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler >Assignee: Carsten Ziegeler > Fix For: 2.0.0 > > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585618#action_12585618 ] Tobias Bocanegra commented on SLING-355: well, an empty string can also mean "i see this field, but i intentionally leave it empty". as for numbers, i agree that an empty string can be ignored or even force a removal of the property. however i would try to set the value anyways and if it fails try to remove it. > If you want to leave the property untouched, don't post it. which is a problem if you can't (or don't want to) modify the DOM of the form. > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler >Assignee: Carsten Ziegeler > Fix For: 2.0.0 > > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585612#action_12585612 ] Carsten Ziegeler commented on SLING-355: Hmm, not sure - if I have a simple form with an input field, this field is always posted to the server with the user input. If there is no user input, the empty string is posted. If we are speaking of types other than strings, than this can only mean to remove the property. For strings this could either mean setting it to an empty value or removing it. Usually empty string and non existing string are treated the same, so its safe to always remove the property. If you want to leave the property untouched, don't post it. > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler >Assignee: Carsten Ziegeler > Fix For: 2.0.0 > > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585611#action_12585611 ] Felix Meschberger commented on SLING-355: - I agree with you Tobias, yet what is the default behaviour on empty parameters for non-String properties ? This question has not been answered in SLING-180 > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler >Assignee: Carsten Ziegeler > Fix For: 2.0.0 > > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585598#action_12585598 ] Tobias Bocanegra commented on SLING-355: it depends on the use case. sometimes a empty value should delete the property, sometimes an empty value should leave the property untouched and sometimes an empty string needs to be stored. see SLING-180 for details. > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler >Assignee: Carsten Ziegeler > Fix For: 2.0.0 > > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585484#action_12585484 ] Carsten Ziegeler commented on SLING-355: Yes, I mean the case where a request parameter with an empty value is used to set the value of a property. And then this property should rather be removed than trying to set the empty string as a value (which fails for all non string properties) > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-355) Empty Request Parameters should be handled as not present
[ https://issues.apache.org/jira/browse/SLING-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585479#action_12585479 ] Bertrand Delacretaz commented on SLING-355: --- I assume by "empty value" you mean a parameter that is present but has no value. If a request does not contain a foo parameter and the node being modified has a foo property, I think the existing property should be left untouched. OTOH if the request contains a foo parameter, but with no value, the property would be removed. > Empty Request Parameters should be handled as not present > - > > Key: SLING-355 > URL: https://issues.apache.org/jira/browse/SLING-355 > Project: Sling > Issue Type: Bug > Components: ujax >Reporter: Carsten Ziegeler > Original Estimate: 0h > Remaining Estimate: 0h > > When the sling post servlet tries to set a property which value is empty, it > fails to set the property value if the proper type is not a string as it for > example tries to convert the empty string into a long - which fails. > Therefore the servlet should treat empty values as not existing ones and > rather remove the property. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.