Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How JSF Reset button works ???

843844Nov 26 2008 — edited Dec 3 2008
I have following JSF components on *.xhtml page
-> h:selectOneMenu . This dropdown displays lists of manufacturers. It also facilitates in CRUD as the dropdown has one of
the values "New" . Picking "New" value from the dropdown clears other form fields and facilitate in creating new manufacturer.
Picking any other value from dropdown will result ajax4jsf onchange event dynamically populating the values into other form fields

Now if users edit one of the form field values and then click "Reset" button. The result is
-> It will reset the value of the form field to the last request value which is perfect

The problem is it resets the dropdown value to "New" instead of resetting to the last request value

I think the dropdown submitted value doesn't get submitted to the backing bean and eventually it get set to the default value "New"

Running with Eclipse debugger having breakpoint on the method binded to whenever users pick a value from the dropdown,
i found the getXXX() method never gets called. So i guess the submitted value doesn't get stored into the backing bean.

Please note i dont have "immediate=true" on Reset button. I do have ajaxSingle=true on dropdown component and it is enclosed in
<a4j:region renderRegionOnly = false>

Any pointers/suggestions to resolve the problem will be greatly appreciated
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2008
Added on Nov 26 2008
9 comments
4,285 views