I developed an application using JSF1.2,In a form named register.jsf Some mandatory fields are there like MobileNo,FirstName,LastName i.e required="true" is set for all these fields and a Submit Button.
When i click the Submit Initially i am getting all the Messages for Mandatory fields. To My requirement i need to remove all the Messages at certain point of Time.
so I tried to removed all the FacesMessages in a form using the below Code in My backing bean :
for (Iterator<FacesMessage> iter1 = context.getMessages(null); iter1.hasNext();)
but i not able to get Succeed with the above code.so I need the solution to remove all the FacesMessages in a form.
I'm not sure I understand. The FacesMessage object is re-created (empty) every time you make an HTTP request on a JSF page view. So only the items which have offended the current page request should be appearing. That's usually what you'd want to do.
An IDE is no substitute for an Intelligent Developer.