[jboss-user] [JBoss Seam] - [JSF] <s:decorate> and <h:panelGrid> conflict
Yacho
do-not-reply at jboss.com
Sun Sep 30 09:24:26 EDT 2007
I got question regarding <s:decorate>
Normally i design my forms in such manner :
<h:panelGrid columns="2">
| <h:outputText>Login</h:outputText>
| <h:inputText value="#{newUser.login}"/>
| </h:panelGrid>
Wich gets Me the layout i want
But when using <s:decorate> im forced to do like so :
<h:panelGrid columns="2">
| <s:decorate template="../misc/error_facelet.xhtml">
| <ui:define name="label">Nazwisko</ui:define>
| <h:inputText value="#{newUser.lastName}"/>
| </s:decorate>
| </h:panelGrid>
The Problem with above design is that everything in <s:decorate> is inserted in one cell of a table.
My error_facelet.xhtml is the file straight from docu :
<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':''}">
| <s:validateAll>
| <ui:insert/>
| </s:validateAll>
| </span>
| <s:message styleClass="error"/>
| </div>
| </ui:composition>
One Thing is the div element wich i should not use (ill erease it and check it out) but my question is :
is <s:decorate> threated as a container (component wise) are all contents of it threated as one element or it just pastes the template without interfering ?
the effect id like to achieve is to have label in one cell - field in the other and do not use separate panelGrid in the template (so i wont generate 2 cell tabel for each field) is it possible ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090029#4090029
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090029
More information about the jboss-user
mailing list