[jboss-user] [JBoss Seam] - Re: JSF Composition Components with Seam

nhpvti do-not-reply at jboss.com
Wed May 16 04:58:56 EDT 2007


"fernando_jmt" wrote : And, also tell us where is located your field.xhtml?
  | 
  | webapp/ ?
  | webapp/WEB-INF?
  | ...etc.
  | 

Thank you for the prompt reply.

This is exactly the reason. I've placed taglib file and the component source into /WEB-INF/facelets/tags/my.taglib.xml (as you can see from my web.xml), but  Seam deployment script ignores subdirectories in WEB-INF.

I've  moved both into WEB-INF and it works :-) !!!!

Composition Components is a very powerfull feature I missed e.g. with Turbine + Velocity, not saying about PHP & Co. Now I can present our decision makers another strong argument for migration to Seam + JSF + Facelets.

anonymous wrote : Post the page where you are using the composition tag.

Before:
...
  | <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  |                 xmlns:s="http://jboss.com/products/seam/taglib"
  |                 xmlns:ui="http://java.sun.com/jsf/facelets"
  |                 xmlns:f="http://java.sun.com/jsf/core"
  |                 xmlns:h="http://java.sun.com/jsf/html"
  |                 xmlns:rich="http://richfaces.ajax4jsf.org/rich"
  |                 xmlns:my="http://my.com/jsf"
  |                 template="layout/template.xhtml">
  | ...
  |      <h:outputLabel for="username">Username</h:outputLabel>
  |      <h:inputText id="username" 
  |                               value="#{identity.username}"/>
  |      <h:outputLabel for="password">Password</h:outputLabel>
  |      <h:inputSecret id="password" 
  |                                 value="#{identity.password}"/>
  | ...

After:
...
  | <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  |                 xmlns:s="http://jboss.com/products/seam/taglib"
  |                 xmlns:ui="http://java.sun.com/jsf/facelets"
  |                 xmlns:f="http://java.sun.com/jsf/core"
  |                 xmlns:h="http://java.sun.com/jsf/html"
  |                 xmlns:rich="http://richfaces.ajax4jsf.org/rich"
  |                 xmlns:my="http://my.com/jsf"
  |                 template="layout/template.xhtml">
  | ...
  | <my:field label="Username" fieldName="username" entity="#{identity}" />
  | <my:field label="Password" fieldName="password" entity="#{identity}" secret="true" />
  | ...

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

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



More information about the jboss-user mailing list