-
1. Re: What is the expected result when using @resetValues on this simple example ?
michpetrov Mar 30, 2016 8:50 AM (in response to bluez974)In my opinion, it should show "Changed Value" into the field, but it keeps the previous value when rendering.
That's what I'm seeing, what version of JSF/RichFaces are you using?
btw. you can simply do action="#{testBean.setInfo1('Changed value')}"
-
2. Re: What is the expected result when using @resetValues on this simple example ?
bluez974 Mar 30, 2016 9:21 AM (in response to michpetrov)I am using MyFaces 2.2.9 and the last Richfaces 4.5.14.
What version of JSF do you use ?
-
3. Re: What is the expected result when using @resetValues on this simple example ?
michpetrov Mar 30, 2016 10:10 AM (in response to bluez974)Mojarra 2.2.8, I'll check MyFaces.
-
4. Re: What is the expected result when using @resetValues on this simple example ?
bluez974 Mar 30, 2016 11:28 AM (in response to michpetrov)It does work as expected with Mojarra 2.2.8 but not with MyFaces 2.2.9.
I have got to use a classical component to make it work with MyFaces :
<h:commandButton value="change Info1 Value" action="#{testBean.setInfo1('Changed Value')}" > <f:ajax event="click" execute="@this" render="itInfo1" resetValues="true"/> </h:commandButton>
-
5. Re: What is the expected result when using @resetValues on this simple example ?
michpetrov Mar 30, 2016 11:31 AM (in response to bluez974)When deciding to reset values MyFaces tries to obtain renderIds (i.e. ids of the components that should be reset) from the request parameters instead of getting them our implementation of PartialViewContext. And since RichFaces doesn't include the ids in the request the input fails to reset. (f:ajax with @resetValues obviously works but h:commandButton with f:resetValues doesn't seem to). Can you file an issue?