[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16322849#comment-16322849 ] Thomas Andraschko commented on MYFACES-3525: allright :) so +1 from my side > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16322845#comment-16322845 ] Bill Lucy commented on MYFACES-3525: [~tandraschko] I think the relationship between INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL and CLEAR_INPUT_WHEN_SUBMITTED_VALUE_IS_NULL_OR_EMPTY makes sense. As I understand the patch, the three states you mentioned can be configured: *always clear -- set CLEAR_INPUT_WHEN_SUBMITTED_VALUE_IS_NULL_OR_EMPTY=true (2.3 default case) *always populate from model -- set CLEAR_INPUT_WHEN_SUBMITTED_VALUE_IS_NULL_OR_EMPTY=false and INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL=true *PRE JSF 2.3 behavior -- set CLEAR_INPUT_WHEN_SUBMITTED_VALUE_IS_NULL_OR_EMPTY=false and INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL=true > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16322751#comment-16322751 ] Eduardo Breijo commented on MYFACES-3525: - INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is independent now. However, if we still want to restore the previous model value, then we INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL needs to be enabled, and the new parameter CLEAR_INPUT_WHEN_SUBMITTED_VALUE_IS_NULL_OR_EMPTY should be disabled. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16322742#comment-16322742 ] Thomas Andraschko commented on MYFACES-3525: The current patch contains following description: +/** + * When CLEAR_INPUT_WHEN_SUBMITTED_VALUE_IS_NULL_OR_EMPTY is enabled, input fields will be cleared + * when null or empty values are submitted. When disabled, and INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL + * is enabled, submitting null or empty values will cause the previous model value to be restored + * to the input field. + **/ Shouldn't this behavior be independent from INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL now? I thought we introduced the problem because the current behavior depends on INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL. Not sure... Maybe we have 3 states of the new param? - true: always clear - false: always populate from model - auto: PRE JSF 2.3 behavior which also checks INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16322450#comment-16322450 ] Bill Lucy commented on MYFACES-3525: That covers the behavior a little better; +1 for CLEAR_INPUT_WHEN_SUBMITTED_VALUE_IS_NULL_OR_EMPTY > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16322408#comment-16322408 ] Thomas Andraschko commented on MYFACES-3525: yep, it sounds better. Maybe also something like CLEAR_INPUT_WHEN_SUBMITTED_VALUE_IS_NULL_OR_EMPTY > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16321207#comment-16321207 ] Bill Lucy commented on MYFACES-3525: Is something like CLEAR_COMPONENT_INPUT_WHEN_NULL_VALUE_SUBMITTED better? Not an easy param to come up with. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16320606#comment-16320606 ] Thomas Andraschko commented on MYFACES-3525: the patch works fine; +1 I just wonder if we could find a better name for the param + little bit better description. I know, it's a difficult case, therefor it should be 100% clear what it does. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16320463#comment-16320463 ] Eduardo Breijo commented on MYFACES-3525: - Uploaded the patch again with Thomas recommendation. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16320410#comment-16320410 ] Thomas Andraschko commented on MYFACES-3525: I think the patch is fine, i would just cache the "param eval"-result as done in #shouldInterpretEmptyStringSubmittedValuesAsNull e.g. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16320378#comment-16320378 ] Bill Lucy commented on MYFACES-3525: I agree that 3) is a valid case - but I don't think we care about it here. The context param gives users the choice of using 2).. so I think it's OK. If we leave that in, what additional cleanup can be done in the most recent patch? > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16319191#comment-16319191 ] Thomas Andraschko commented on MYFACES-3525: I'm not sure actually. We have one user (since many years!) in PrimeFaces which would like to restore the old value: https://github.com/primefaces/primefaces/issues/2821 But we have actually have 3 cases: 1) reset to empty 2) display old model value 3) display invalid input Or do i miss something? > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16319186#comment-16319186 ] Bill Lucy commented on MYFACES-3525: I think the patch is fine - by default it mirrors Mojarra's behavior, and then the context param flips the behavior to restore the previous model value. [~tandraschko] do you think the context param should be removed altogether? > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16319117#comment-16319117 ] Thomas Andraschko commented on MYFACES-3525: First of all, we should decide what we do... The JSF (Mojarra 2.3) behavior is that the value is ALWAYS cleared. For this feature, the patch seems to complicated for me. Should be simple IF-statement?! If we would like to create a behavior, that the value is displayed from the model again, then we need a context param, too. But the default should be: clear always if validation fails. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16319107#comment-16319107 ] Eduardo Breijo commented on MYFACES-3525: - I have uploaded a patch for JSF 2.3. The patch is a combination of Bernd patch and the initial patch provided here. It uses the org.apache.myfaces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL_CLEAR_INPUT context parameter, but in this case it will be "true" by default. So Bernd fix will be enabled by default on JSF 2.3. Also, we can port this new patch to JSF 2.0-2.2 but have the context parameter set to "false" by default, meaning that the fix will not be enabled by default, keeping the old behavior on JSF 2.0-2.2. If there are no objections, I can commit the patch to JSF 2.3 and port it to JSF 2.0-2.2. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT, 2.3.0 > > Attachments: MYFACES-3525-JSF23.patch, > MYFACES-3525-setsubmittedValueagain.patch, MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310983#comment-16310983 ] Thomas Andraschko commented on MYFACES-3525: [~wtlucy] Please see: https://github.com/javaee/javaserverfaces-spec/issues/671 The spec hasn't been changed as balusc already posted in this ticket. I'm fine with it to change our behavior in 2.3, so that the value is always empty. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525-setsubmittedValueagain.patch, > MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309887#comment-16309887 ] Bill Lucy commented on MYFACES-3525: We need to decide what to do with this issue for 2.3, either pull in Bernd's change or the EMPTY_VALUES_AS_NULL_CLEAR_INPUT_PARAM_NAME parameter. Correct me if I'm wrong, but from what I can tell after reading over https://github.com/javaee/javaserverfaces-spec/issues/671 the 2.3 spec hasn't actually changed - so the behavior change issue still stands. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525-setsubmittedValueagain.patch, > MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16165285#comment-16165285 ] Bernd Bohmann commented on MYFACES-3525: I don't agree and we should not discuss this in jira. It should be clear this EMPTY_VALUES_AS_NULL_CLEAR_INPUT_PARAM_NAME parameter should be removed before we are creating a new release. I'm writing code to show there is a better alternative instead of this EMPTY_VALUES_AS_NULL_CLEAR_INPUT_PARAM_NAME parameter. I think this clear input is dangerous. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch, > MYFACES-3525-setsubmittedValueagain.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16165273#comment-16165273 ] Thomas Andraschko commented on MYFACES-3525: Just tried mojarra and the input is also empty after submitting a empty value. Therefor -1 to change the behavior in MyFaces as it breaks compatibility. As leo said, it should be fixed at spec level. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch, > MYFACES-3525-setsubmittedValueagain.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16106680#comment-16106680 ] Bernd Bohmann commented on MYFACES-3525: Sorry we are not following mojarra (I didn't take a look at the mojarry code this is not allowed for us) The information i have is from the spec issue tracker. We (me and matthias) raised this question several years ago. The javadoc about setting setSubmittedValue to null only is rubbish. There are two options 1. don't set submitted value to null only call validate with the null value or 2. reset the submitted value to the old value if it's invalid That's all it's already triggered many years ago. But with no real answer before 2016 > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch, > MYFACES-3525-setsubmittedValueagain.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16106595#comment-16106595 ] Thomas Andraschko commented on MYFACES-3525: I like your patch much more as the initial patch BUT we should check the specs in detail. As bill already commented, our default behavior looks aligned with the specs. Not sure if it's correct to follow mojarra when the spec's hasn't been changed. Maybe we should trigger this at the specs mailing list. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12, 2.1.18, 2.2.12, 2.3.0-beta >Reporter: VS >Assignee: Leonardo Uribe > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch, > MYFACES-3525-setsubmittedValueagain.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16101954#comment-16101954 ] Bernd Bohmann commented on MYFACES-3525: If you read the comment from the spec lead in https://github.com/javaee/javaserverfaces-spec/issues/671 the submitted value should be restored to the original submitted value if the UIInput is not valid. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch, > MYFACES-3525-setsubmittedValueagain.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16101871#comment-16101871 ] Bill Lucy commented on MYFACES-3525: Thanks for the patch! The behavior looks good to me - but regarding Leonardo's comment above, is it OK for us to change the default behavior here? > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch, > MYFACES-3525-setsubmittedValueagain.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16101589#comment-16101589 ] Bernd Bohmann commented on MYFACES-3525: I will not apply exactly the patch because I should cleanup the code as well. But the patch shows the idea behind it > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch, > MYFACES-3525-setsubmittedValueagain.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100638#comment-16100638 ] Bernd Bohmann commented on MYFACES-3525: Ok, I can do it but not today. I will prepare a patch for better understanding tomorrow. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100634#comment-16100634 ] Bill Lucy commented on MYFACES-3525: Would you mind attaching a patch here or on the dev list so I can make sure I understand your proposal? > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100598#comment-16100598 ] Bernd Bohmann commented on MYFACES-3525: I can change the behavior to the suggestion in https://github.com/javaee/javaserverfaces-spec/issues/671 and remove the INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL_CLEAR_INPUT workaround any complains? > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100523#comment-16100523 ] Bernd Bohmann commented on MYFACES-3525: The suggested fix in https://github.com/javaee/javaserverfaces-spec/issues/671 is much better. It's setting the submitted Value to the old value if it's invalid > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100499#comment-16100499 ] Dennis Kieselhorst commented on MYFACES-3525: - Looks like all related issues have been closed: https://github.com/javaee/javaserverfaces-spec/issues?utf8=%E2%9C%93=INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100298#comment-16100298 ] Bernd Bohmann commented on MYFACES-3525: In this case the description of the spec is wrong. Compare to the local Value (local Value has two methods set/getLocalValue and set/isLocalValueSet) unfortunately submitted Value has not a set/isSubmittedValueSet method. Set submitted to null means there was no value submitted. In this case if there is an conversion error or something else it will render the old value instead of render the empty String. javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL means during validation an empty value should be interpreted as a null value only. This should be the correct behavior. We raised a spec issue about this years ago but the project has moved to github and I can not find the original issue: // -= matzew = setSubmittedValue(null) is wrong, see: // https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=671 > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16049316#comment-16049316 ] Bill Lucy commented on MYFACES-3525: [~bommel] I may be misinterpreting you, but based on my reading of the jsf 2.0 spec we're doing this correctly. In section 11.1.3: "If the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL context parameter value is true (ignoring case), and UIInput.getSubmittedValue() returns a zero-length String call UIInput.setSubmittedValue(null) and continue processing using null as the current submitted value" Can you clarify how you think we should fix this? > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16049211#comment-16049211 ] Bernd Bohmann commented on MYFACES-3525: I think the fix is wrong. setSubmittedValue(null) should not called. Instead every getSubmittedValue call should use INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL if it should interpret the submitted empty value as null. Then if the validation fails the empty submitted will be rendered > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS >Assignee: Bill Lucy > Fix For: 2.0.25-SNAPSHOT, 2.1.19-SNAPSHOT, 2.2.13-SNAPSHOT > > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16044523#comment-16044523 ] Bill Lucy commented on MYFACES-3525: Thanks for the input Leonardo, and thanks for the patch Eduardo. I've committed the patch (with an updated comment/description) to the 2.0, 2.1, and 2.2 branches. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16043437#comment-16043437 ] Eduardo Breijo commented on MYFACES-3525: - I have provided a patch for this issue as discussed by Bill Lucy. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS > Attachments: MYFACES-3525.patch > > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16041766#comment-16041766 ] Leonardo Uribe commented on MYFACES-3525: - No problem from my side, if a custom parameter help, please add it. Just let the default behavior intact. > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16040977#comment-16040977 ] Bill Lucy commented on MYFACES-3525: I realize that this issue is 5+ years old, but it's still causing problems for users. This wasn't resolved in the 2.1 or 2.2 specifications, so aside from workarounds there is still no solution. The patch provided in https://issues.apache.org/jira/browse/MYFACES-2497 seems to resolve the issue. Since this is an issue with the spec, we could fix this issue, leave the fix disabled by default, and allow users who need this fix to enable the non-spec fix via a configuration parameter. For example, org.apache.myfaces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL_CLEAR_INPUT with a default value of "false". Would anyone have an issue with that? > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects > display behavior for required fields > -- > > Key: MYFACES-3525 > URL: https://issues.apache.org/jira/browse/MYFACES-3525 > Project: MyFaces Core > Issue Type: Bug >Affects Versions: 2.0.12 >Reporter: VS > > Inconsistent behavior for required field validation when > javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true > versus false > To observe behavior: > 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in > web.xml > 2. Create JSF Page: > > > required="true" > requiredMessage="You must enter a first name"/> > > > 3. Create Managed Bean: > @ManagedBean > public class Page1Controller > { > public String getFirstName() > { return "Default Value"; } > public void setFirstName(String value) > { // no-op (for example purposes only) } > 4. Load JSF page, blank out value in the input field and click Submit > 5. Error message is displayed, however the value in the input field (which > you formerly blanked out) is now reset back to its original value. > 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL > setting to false and re-run the test. > 7. Note that the value in the input field remains blank. > Behavior is inconsistent and should be fixed > (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true > or false should not result in inconsistent behavior with required fields) > > To state in a different way: > When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank > out a value for a required field that had previously been populated by the > model, submit the form, you will see the OLD data from the model in the > field. However, if that field had had a format validation applied to it and > the user submits the form with a format validation error, the OLD data is NOT > shown in the field (instead, the submitted/invalid data is shown). The same > should happen for required field validation errors. The field should show the > "blank" data and not the original model data. In order to get the correct > behavior, the developer has to currently set > INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not > have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is > true or false, the behavior of showing the blank field that the user > submitted should be the same. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-3525) javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields
[ https://issues.apache.org/jira/browse/MYFACES-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13286687#comment-13286687 ] Leonardo Uribe commented on MYFACES-3525: - This issue should be solved at spec level, see: http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-939 http://java.net/jira/browse/JAVASERVERFACES-1375 http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-671 javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL value affects display behavior for required fields -- Key: MYFACES-3525 URL: https://issues.apache.org/jira/browse/MYFACES-3525 Project: MyFaces Core Issue Type: Bug Affects Versions: 2.0.12 Reporter: VS Inconsistent behavior for required field validation when javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to true versus false To observe behavior: 1. Set javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true in web.xml 2. Create JSF Page: h:form h:messages showSummary=true/ h:inputText value=#{page1Controller.firstName} required=true requiredMessage=You must enter a first name/ h:commandButton value=Submit/ /h:form 3. Create Managed Bean: @ManagedBean public class Page1Controller { public String getFirstName() { return Default Value; } public void setFirstName(String value) { // no-op (for example purposes only) } 4. Load JSF page, blank out value in the input field and click Submit 5. Error message is displayed, however the value in the input field (which you formerly blanked out) is now reset back to its original value. 6. Change the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting to false and re-run the test. 7. Note that the value in the input field remains blank. Behavior is inconsistent and should be fixed (javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL setting of true or false should not result in inconsistent behavior with required fields) To state in a different way: When INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is TRUE, and you blank out a value for a required field that had previously been populated by the model, submit the form, you will see the OLD data from the model in the field. However, if that field had had a format validation applied to it and the user submits the form with a format validation error, the OLD data is NOT shown in the field (instead, the submitted/invalid data is shown). The same should happen for required field validation errors. The field should show the blank data and not the original model data. In order to get the correct behavior, the developer has to currently set INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to false. But they should not have to do this... whether INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is true or false, the behavior of showing the blank field that the user submitted should be the same. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira