-
1. Re: How to reset form fields and rerender the form?
liuliu Apr 10, 2014 3:17 AM (in response to jholusa)hi,
I remember render list is comma seperate string. and in your case you only need @form. and your bean scope?
-
2. Re: How to reset form fields and rerender the form?
jholusa Apr 10, 2014 3:34 AM (in response to liuliu)Hi liumin,
thanks for answer.
I have tried it even with render="@form", render=":criteriaForm", nothing worked. My bean is @SessionScoped.
Any other ideas?
-
3. Re: How to reset form fields and rerender the form?
liuliu Apr 10, 2014 3:47 AM (in response to jholusa)1 of 1 people found this helpfulhi,
when you debug, the getter is called?
-
4. Re: How to reset form fields and rerender the form?
jholusa Apr 10, 2014 4:02 AM (in response to liuliu)Hmm, that's weird.
I debugged it, put break points on the getter and clearSearchCriteria and this is what happens:
1) I enter some value into the field a do a search making the value stored in the bean.
2) Click reset
3) First break on getter with the old value
4) Break on clearSearchCriteria
5) Next two breaks on getter - but STILL with the value!
Something strange is going on. There must be a bug in my logic!!
Thanks for pointing me to the right direction, I will investigate it further and hopefully solve this.
-
5. Re: How to reset form fields and rerender the form?
jholusa Apr 10, 2014 4:24 AM (in response to jholusa)Found the mistake in the bean's logic. Thank you very much for your answers! :-)
-
6. Re: How to reset form fields and rerender the form?
michpetrov Apr 10, 2014 5:06 AM (in response to jholusa)1 of 1 people found this helpfulHi again,
RichFaces 4.5 uses the a4j/rich prefixes, the "r" prefix is used by RF 5 (on top of which the 4.5 is built); command button is part of the richfaces-components-a4j artifact.
Buttons execute the whole form by default, if you don't want the values to be sent to the server add execute="@this" to the button.
-
7. Re: How to reset form fields and rerender the form?
michpetrov Apr 10, 2014 5:09 AM (in response to liuliu)liumin hu wrote:
hi,
I remember render list is comma seperate string. and in your case you only need @form. and your bean scope?
The render list can be comma or space separated, you can also put in an Array, a List etc.