Hello coderanch,
i build a simple jsf-application which contains 2 input-fields and a submit-button (action leads to the page itself). The page prints the given parameters out.
What I am trying to implement is if you enter a specific value in the first input-field, the response you received before from the server, should be send again to you instead of the new calculated response...
example:
1. pagecall (called by user):
-> user enters "ABC" in field 1
-> user enters "123" in field 2
-> user submits
2. pagecall (called by submit):
->
JSF checks if value 1 is "DEF" - false
-> JSF prints out "ABC"
-> JSF prints out "123"
-> JSF set value of field 1 to "ABC"
-> JSF set value of field 2 to "123"
-> JSF saves the response
-> JSF send the response
-> user enters "DEF" in field 1
-> user enters "456" in field 2
-> user submits
3. pagecall (called by submit):
-> JSF checks if value 1 is "DEF" - true
=> skips calculating, setting values and so on and load last saved response (so the value of field 1 is not "DEF" but "ABC")
-> JSF send the response
is it even possible?
i tried it by adding phaselisteners and rewriting GET and SET-parameters (but the framework does not allow this)...
do i need to implement an own lifecycle-class or something like that?
kind regards