Hi.

I'm also trying to get apache commons validator running together with
shale-1.0.4-SNAPSHOT and facelets 1.11. This is because I can use the
commons-validator package for business validation, too - independent of
the view technologie.

I've read the posts on the mailing-list but now I'm stuck somehow.

The following things I've done:

- added shale-core, shale-validator and shale-view to my libs
- added the things I need to a facelets taglib.xml like in the posts
I've seen so far and added a reference to it in the web.xml:

<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet
Taglib 1.0//EN" "facelet-taglib_1_0.dtd">
<facelet-taglib>
    <namespace>http://shale.apache.org/core</namespace>
    <tag>
        <tag-name>token</tag-name>
        <component>
            <component-type>org.apache.shale.Token</component-type>
            <renderer-type>org.apache.shale.Token</renderer-type>
        </component>
    </tag>
    <tag>
        <tag-name>commonsValidator</tag-name>
        <validator>
            <validator-id>org.apache.shale.CommonsValidator</validator-id>
        </validator>
    </tag>
</facelet-taglib>

- referenced the commonsValidator as follows in the xhtml file:

<input type="text" jsfc="h:inputText" id="subject"
value="#{messageAction.mailSubject}" maxlength="100" size="40">
        <sh:commonsValidator type="required"
arg="#{msg.NotEmptyValidator_VALUE_IS_EMPTY}" server="true" client="false"/>
</input>

- Added the shale namespace to the top of the page:

xmlns:sh="http://shale.apache.org/core";

So, I'm also using the token tag - that works fine. That means shale
works as expected. But somehow the commonsValidator doesn't seem to
work. When I submit the page, no validation takes place.
If I changed the name of the commonsValidator tag to something else, I
get an error that this tag doesn't exist. So that is setup correctly so far.

Any hints what the problem might be? Perhaps one need really a Facelet
Tag handler to get it running?

btw: people.apache.org is up and running again.

regards,
Veit

Reply via email to