aspose file tools*
The moose likes JSF and the fly likes custom tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "custom tag" Watch "custom tag" New topic
Author

custom tag

Natt Gonzalez
Ranch Hand

Joined: Apr 28, 2008
Posts: 31
Hello! I have a custom tag where I want to add and HtmlInputText with a validator. I use the following code:

In my encodeBegin method I call a private method with:




ImportValidator obValidator = new ImportValidator();


FacesContext context = getFacesContext();
inputText.setId(id);
inputText.addValidator(obValidator);
inputText.setValue(value);
inputText.setStyleClass(styleClass);
inputText.setParent(this);
inputText.encodeBegin(context);
inputText.encodeEnd(context);

Of course my ImportValidator implements Validator class.

Do I need something more to use the validator?

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: custom tag