[
http://jira.jboss.com/jira/browse/JBSEAM-1412?page=comments#action_12369631 ]
Sverker Abrahamsson commented on JBSEAM-1412:
---------------------------------------------
I can confirm that this issue occurs on Seam 1.2.1 with facelets 1.1.11 and goes away when
using the facelets jar from Seam dist. Which version is that? I'd like to know to be
able to set dependencies in maven correctly.
Feels more like an issue in facelets than in Seam.
<s:decorate /> with template property
-------------------------------------
Key: JBSEAM-1412
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1412
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.2.1.GA
Environment: JBoss 4.2 (w JSF RI 1.2 )
Seam 1.2.1
facelets 1.1.11
Windows XP
Reporter: Felix Ho?feld
Assigned To: Gavin King
Priority: Minor
Fix For: 1.3.0.ALPHA
Attachments: s-decorate-error.png
I am trying to use the template property of <s:decorate /> in Seam 1.2.1 .GA but it
doesn't work for me. The <ui:insert /> in the decorateField.xhtml does not only
insert the input child of <s:decorate /> but the whole page (which is in a
<ui:define /> because it uses a page template).
If I explicilty define
<ui:define name="input"><h:inputText
value="#{mitgliedHome.instance.name}"
required="true"/></ui:define>
and adjust the decorateField.xhtml file accordingly it works. I am not sure whether this
is a bug, a documentation issue or if I made a silly mistake but I thought I report it
before it gets lost.
Main page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
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:c="http://java.sun.com/jstl/core"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:rich="http://richfaces.ajax4jsf.org/rich"
template="/WEB-INF/templates/standard.xhtml">
<ui:define name="title">Title</ui:define>
<ui:define name="body">
<h:form>
<rich:toolBar height="26" itemSeparator="line">
<rich:toolBarGroup rendered="#{not mitgliedHome.managed}">
<h:commandLink action="#{mitgliedHome.persist}"><h:graphicImage
value="/images/button_ok.png" /><h:outputText value="Save"
/></h:commandLink>
</rich:toolBarGroup>
</rich:toolBar>
<h:messages globalOnly="true"/>
<s:decorate template="decorateField.xhtml">
<ui:define name="label">Username:</ui:define>
<h:inputText value="#{userHome.instance.name}"
required="true"/>
</s:decorate>
</h:form>
</ui:define>
decorateField:
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib">
<div>
<s:label styleClass="#{invalid?'error':''}">
<ui:insert name="label"/>
<s:span styleClass="required"
rendered="#{required}">*</s:span>
</s:label>
<span class="#{invalid?'error':''}">
<!-- <h:graphicImage src="img/error.gif"
rendered="#{invalid}"/> -->
<s:validateAll>
<ui:insert />
</s:validateAll>
</span>
<s:message styleClass="error"/>
</div>
</ui:composition>
</ui:composition>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira