2 Replies Latest reply on Oct 13, 2007 8:14 PM by Jacek Zebrowski

    [JSF] <s:decorate> and <h:panelGrid> conflict

    Jacek Zebrowski Newbie

      I got question regarding <s:decorate>
      Normally i design my forms in such manner :

      <h:panelGrid columns="2">
      <h:inputText value="#{newUser.login}"/>

      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}"/>

      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"
       <s:label styleClass="#{invalid?'error':''}">
       <ui:insert name="label"/>
       <s:span styleClass="required" rendered="#{required}">*</s:span>
       <span class="#{invalid?'error':''}">
       <s:message styleClass="error"/>

      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 ?