[jboss-user] [JBoss Seam] - Facelets (Source) Tags problems with seam validation

carloszaniolo do-not-reply at jboss.com
Wed Feb 7 12:41:48 EST 2007


I'm having some problems with seam validation and facelets source tags. It is not working!
To reproduce, in the booking example, just change in the register.xhtml:

<h:inputText id="username" value="#{user.username}" required="true">
  | 	<a:support event="onblur" reRender="usernameErrors"/>
  | </h:inputText>
  | <br/>
  | <a:outputPanel id="usernameErrors"><s:message/></a:outputPanel>

<my:input id="username" value="#{user.username}" />

where <my:input> is:
(input.xhtml in /view/custom)
<html xmlns="http://www.w3.org/1999/xhtml"
  |     xmlns:ui="http://java.sun.com/jsf/facelets"
  |     xmlns:s="http://jboss.com/products/seam/taglib"
  |     xmlns:a="https://ajax4jsf.dev.java.net/ajax"
  |     xmlns:h="http://java.sun.com/jsf/html">
  | 	<ui:composition>
  | 		<h:inputText id="#{id}" value="#{value}" required="true">
  | 			<a:support event="onblur" reRender="#{id}Errors"/>
  |         </h:inputText>
  |         <br/>
  |         <a:outputPanel id="#{id}Errors"><s:message/></a:outputPanel>
  | 	</ui:composition>
  | </html>	

And, of course, it is needed to have a taglibrary declaration in web.xml and the namespace declaration in register.xhtml.

Whit this, only the required validation (from jsf) will work, but the length validation (from seam) will not.

<?xml version="1.0"?>
  | <!DOCTYPE facelet-taglib PUBLIC 
  |   "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
  |   "http://java.sun.com/dtd/faces-taglib_1_0.dtd">
  | <facelet-taglib>
  |    <namespace>http://my/jsf/taglib</namespace>
  |    <tag>
  |       <tag-name>input</tag-name>
  |       <source>../custom/input.xhtml</source>
  |    </tag>
  | </facelet-taglib>

in web.xml:
  | <context-param>
  | 	<param-name>facelets.LIBRARIES</param-name>
  | 	<param-value>/WEB-INF/my.taglib.xml</param-value>
  | </context-param>
  | ...

Carlos Zaniolo

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012572#4012572

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012572

More information about the jboss-user mailing list