I need to clear all the components in a form. According to the wiki
http://wiki.apache.org/myfaces/ClearInputComponents there are many
methods that given. I tried the first method. It works well in a simple
JSF page. In my case I tried to use it in a page that has 2 tabs. Each
of the tabs has a JSP include. Now if I want to clear only components
that are present in one tab then this method will not work. It gives
weird results.



I do not want to go over all the components in the form as there are
many and as told in the wiki entry there can be complications based on
what type of control you are dealing with. Is there any better and
easier solution to clearing components in one form? I am wondering why
such a simple thing as clearing form fields has to have such a complex
solution.



One more thing - how do you clear all the messages in the message queue.
The problem is that if I have a command button with type = "reset" then
it will not work if there are validation error messages on the page. Is
there any way in which I can clear all the messages and then reset the
form?



I had a look at ServletFacesContextImpl (as my app runs in Servlet
container) class there is no method to only clear all the messages.



Thanks for any help.

~madhav







**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Reply via email to