This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSF and the fly likes Using ValueExpression's in a validator tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Using ValueExpression Watch "Using ValueExpression New topic

Using ValueExpression's in a validator tag

Rob Micah
Ranch Hand

Joined: Aug 30, 2011
Posts: 94
I have a component on which I need 2 validations performed. I want to execute the required validator, based on a ValueExpression, and a custom validator I've written. The problem I'm running into is that the jsf validator tags have a disabled property and although the documentation states they accept a ValueExpression, they do not. So this led me to attempt adding an attribute to my own validator that would accept a ValueExpression. Unfortunately I am not having any luck. Here's my taglib.xml

So my questions are:
1. Is it possible to create a ValueExpression attribute on a custom validator tag? and
2. What do the validator property-handling methods look like?
I agree. Here's the link:
subject: Using ValueExpression's in a validator tag
Similar Threads
[facelets] custom taglibrary not recognized
J4J Tag Library rendering problems
Facelets custom tag not recognized ?
My own JSF component renders span after div when only div should be rendered. What's wrong?
problem with code-completion for Facelets custum tags