On 9/25/06, Mauricio Scheffer <[EMAIL PROTECTED]> wrote:
Thanks everyone, I'll try the latest svn
I only fixed the website, nothing related to Shale Validation and
Facelets. Which I'm now having my own problems with. :/
Facelets 1.1.11, Shale 1.0.4-SNAPSHOT, MyFaces Core 1.1.4
I'm trying to add a required validator to a Facelets template, and
MyFaces is complaining "Unknown validator id
'org.apache.shale.validator.CommonsValidator'."
With this in accessRequest.xhtml
<h:outputText value="#{messages['prompt.effectiveDate']}"/>
<h:inputText id="effectiveDate"
value="#{effectiveDate}">
<s:commonsValidator
type="required"
arg="#{messages['prompt.effectiveDate']}"
server="true"
client="false"/>
</h:inputText>
<h:message for="effectiveDate" styleClass="errors"/>
The <s:commonsValidator> tag comes through in the HTML. Fair enough.
If I add a Facelets tag file (and the corresponding web.xml context param,)
<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
"http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
<facelet-taglib>
<namespace>http://shale.apache.org/validator</namespace>
<tag>
<tag-name>commonsValidator</tag-name>
<validator>
<validator-id>org.apache.shale.validator.CommonsValidator</validator-id>
</validator>
</tag>
</facelet-taglib>
then I get:
javax.faces.FacesException: Unknown validator id
'org.apache.shale.validator.CommonsValidator'.
at
org.apache.myfaces.application.ApplicationImpl.createValidator(ApplicationImpl.java:600)
at
com.sun.facelets.tag.jsf.ValidateHandler.createValidator(ValidateHandler.java:116)
at
com.sun.facelets.tag.jsf.ValidateHandler.apply(ValidateHandler.java:90)
...
Full stack trace here:
http://wiki.wsmoak.net/cgi-bin/wiki.pl?Facelets#validator
Does anyone see anything obviously wrong above (or on the wiki page)
or have any advice?
Thanks,
--
Wendy