You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Mauricio Scheffer <ma...@yahoo.com.ar> on 2006/09/22 02:15:58 UTC

Shale validation & facelets

Hi. I've been trying to get the commons-validator integration in Shale 
to work with facelets. Problem is, <s:commonsValidator> and 
<s:validatorScript> don't get rendered properly. Instead, they are 
literally written in the resulting html.
I'm a newbie to Shale and JSF in general. Since I'm using 
com.sun.facelets.FaceletViewHandler as view handler, I can't use shale's 
ViewViewHandler (or can I? I'm not sure) so I registered 
org.apache.shale.faces.ValidatorRenderKit as a render-kit. That didn't work.
Then, I thought that maybe it needed a taglib, so I wrote one like this:

<?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://struts.apache.org/shale/core</namespace>
    <tag>
        <tag-name>validatorScript</tag-name>
        <component>
            
<component-type>org.apache.shale.component.ValidatorScript</component-type>            

        </component>
    </tag>
    <tag>
        <tag-name>commonsValidator</tag-name>
        <validator>
            
<validator-id>org.apache.shale.validator.CommonsValidator</validator-id>
        </validator>
    </tag>
    <tag>
        <tag-name>validatorVar</tag-name>
        <component>
            
<component-type>org.apache.shale.validator.CommonsValidator</component-type>
            
<renderer-type>org.apache.shale.validator.CommonsValidator</renderer-type>
        </component>
    </tag>
</facelet-taglib>

Of course I registered this on context-param facelets.LIBRARIES. But 
that didn't work either.
Other than this problem, Shale works perfectly. I suspect my problem 
lies in the taglib, but I found little documentation about it...
Has anyone managed to get this to work?
TIA

Mauricio







	
	
		
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas