"pete.muir(a)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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...