[JAVASERVERFACES_SPEC_PUBLIC-796] Use the model value for a UIViewParameter only on a postbacks Created: 12/May/10  Updated: 12/Aug/14

Status: Open
Project: javaserverfaces-spec-public
Component/s: Components/Renderers
Affects Version/s: 2.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Jakob Korherr Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 796
Status Whiteboard:

size_small importance_small


 Description   

Imagine you have a page with a required UIViewParameter called input. You will
get a validation error as long as you don't access the view with ?input=abc. Now
if you do that once, "abc" will be saved as the submittedValue in the state of
the UIViewParameter for every postback and thus will be available for every
further postback. If you now access the view again with a GET request
(non-postback), but without ?input=abc, you will again get a validation error.
However, if you hit any button or link on the view to generate another postback
to the view, the validation error will be gone, because UIViewParameter takes
the value from before ("abc") out of the model (managed-bean) and sets it in the
state. Thus you haven't provided it via ?input=abc, but you will now have a
value of "abc" for your UIViewParameter, which seems kinda wrong to me. The
solution to this one is to get the value from the model to set it as the
submittedValue in UIViewParameter only if the current request is a postback.
However I don't know if this really is an error or the expected behaviour. I
personally just think that it is weird.

Answer from Martin Marinschek: "I absolutely agree that we should do this only
on a postback - everything else is really, really weird behaviour."



 Comments   
Comment by Ed Burns [ 17/May/10 ]

Move to 2.1.

I agree with this approach.

Comment by Ed Burns [ 08/Jun/10 ]

triage

Comment by Ed Burns [ 22/Jun/10 ]

rogerk

Comment by rogerk [ 27/Oct/10 ]

triage

Comment by rogerk [ 16/Nov/10 ]

triage

Comment by Ed Burns [ 01/Aug/14 ]

Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

Generated at Fri May 29 17:12:50 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.