Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

behavior issues with "INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL" setting #671

Closed
eclipse-faces-bot opened this issue Nov 16, 2009 · 22 comments

Comments

@eclipse-faces-bot
Copy link

This impl bug was filed:
https://java.net/jira/browse/JAVASERVERFACES-1375

as there are some issues in handling empty string validation...

Now, the fix is in; and most-likely the behavior of the alogrithm needs to be
updated in the spec as well. Additionally there should be java doc which
explains the change...

Environment

Operating System: All
Platform: All

Affected Versions

[2.0]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by mwessendorf@java.net

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Prepare to delete api subcomponent

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
mojavelinux said:
Looking at the scenario cited in the impl issue report, the problem I see is
that the assignment of a "blank" value should not be disabled when
INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is enabled. But that is likely
happening because prior to this feature, a null value was interpreted as "no
assignment necessary".

The resolution I see is that if the request parameter is missing or empty, then
a null value needs to overwrite any previous value on the component. After all,
that is what is meant by INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
mojavelinux said:
Updating target milestone and subcomponent.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
cat1

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
frame

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
These are valid 2.0 Rev a issues

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
take ownership.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Behavior change, move to 2.1.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Change target milestone.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
rogerk said:
triage

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@manfredriem said:
Setting priority to Major

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:

<os890> well what worked in the past is:
<os890> public class FixedHtmlInputText extends HtmlInputText {
<os890>     @Override
<os890>     public void validate(FacesContext context) {
<os890>         Object submittedValue = getSubmittedValue();
<os890>         try {
<os890>             super.validate(context);
<os890>         } finally {
<os890>             if (!isValid()) {
<os890> setSubmittedValue(submittedValue);
<os890>             }
<os890>         }
<os890>     }
<os890> }

@eclipse-faces-bot
Copy link
Author

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@BalusC said:
EditableValueHolder#getSubmittedValue() javadoc already says

The action taken based on whether the value is null, empty, or
non-null is determined based on the value of the javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL context-param.

The UIInput implementation never considered that. I have therefore applied the fix as proposed in https://java.net/jira/browse/JAVASERVERFACES-2262?focusedCommentId=340126#comment-340126 without any necessary spec changes.

https://java.net/projects/mojarra/sources/git/revision/0813ee1fdef418e47ef03ced7d57a1abe4c2bf54

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Monday, May 30th 2016, 6:13:45 am

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-671

@eclipse-faces-bot
Copy link
Author

@tandraschko Commented
@BalusC / @arjantijms / @edburns
This issue has assigned 2.3 as milestone but still not fixed, right?
We currently discuss this is in the MyFaces community if we should add a flag to MyFaces, to control this behavior.
Maybe we could also agree on spec level?
Please see: https://issues.apache.org/jira/browse/MYFACES-3525

@eclipse-faces-bot
Copy link
Author

@arjantijms Commented
@tandraschko

Didn't javaserverfaces/mojarra@0813ee1 fix the issue?

@eclipse-faces-bot
Copy link
Author

@tandraschko Commented
@arjantijms
Oh i see, Mojarra 2.3 behaves different now. Maybe i tried with 2.2 in the past.
The value is always blank if invalid, doesn't matter if "javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL" is true or false.

Thanks!

@eclipse-faces-bot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant