-
1. Re: AJAX Reset Button
ilya_shaikovsky Sep 23, 2009 7:15 AM (in response to tanmay.solanki)so just write a method which will reset component value bindings, then call the method from some a4j:control and just reRender the panel with components, or just some concrete components set by id/ids
-
2. Re: AJAX Reset Button
tanmay.solanki Sep 23, 2009 7:35 AM (in response to tanmay.solanki)Thanks for your reply. I got your point to reset all value binding method to default value explicitly in a method, make an Ajax call to this method and re-render related component. This solution is straight forward.
But is there and way we can have it without writing an explicit method?
Explanation:
What I meant to say is when a JSF view is initially constructed we don't have
to set default value explicitly to any component they just go through a JSF cycle and we get our default values to all components in a page.
Is there any way I can have partial update for a set of component in a page
which goes to same initial levels on click of a button. -
3. Re: AJAX Reset Button
nbelaevski Sep 23, 2009 10:17 PM (in response to tanmay.solanki)Just remove them from view in the action method - view handler will create new ones then with the default values.
-
4. Re: AJAX Reset Button
tanmay.solanki Sep 24, 2009 2:51 AM (in response to tanmay.solanki)Thanks. Can you give a sample code to achive the same ( remove a component from the view handler) or just tell me method to be called from facescontext ?
-
5. Re: AJAX Reset Button
nbelaevski Sep 24, 2009 5:58 AM (in response to tanmay.solanki)UIComponent parent, child; parent.getChildren().remove(child);
-