[jboss-user] [JBoss Seam] - Re: Why doesn't this h:message work for the h:selectOneMenu?
grettke_spdr
do-not-reply at jboss.com
Wed Jul 4 11:15:55 EDT 2007
"pete.muir at jboss.org" wrote : Whats the message (aka where is it originating)
Hi Pete,
I was looking at one approach to doing custom validations, and testing out how the error messages show up. The approach in this system is the "form" and "action" style. I added messages in the action. Here is how it looks:
| @Name("inspectionSearchAction")
| @Scope(ScopeType.SESSION)
| public class InspectionSearchActionImpl implements InspectionSearchAction {
|
| @Logger
| Log log;
|
| @In
| FacesMessages facesMessages;
|
| public void search() {
| try {
| facesMessages.addToControl("territoryNumber","territoryNumber");
| facesMessages.addToControl("riskControlRepNumber","riskControlRepNumber");
| facesMessages.addToControl("accountNumber","accountNumber");
| facesMessages.addToControl("selectedPriority","selectedPriority");
| facesMessages.addToControl("companyName","companyName");
| facesMessages.addToControl("selectedState","selectedState");
| facesMessages.addToControl("city","city");
| facesMessages.addToControl("county","county");
| facesMessages.addToControl("zipCode","zipCode");
| facesMessages.addToControl("surveyRangeStart","surveyRangeStart");
| facesMessages.addToControl("surveyRangeEnd","surveyRangeEnd");
| facesMessages.addToControl("inspectionCompleteRangeStart","inspectionCompleteRangeStart");
| facesMessages.addToControl("inspectionCompleteRangeEnd","inspectionCompleteRangeEnd");
| } catch (Exception e) {
| log.error(e);
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060516#4060516
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060516
More information about the jboss-user
mailing list