1 Reply Latest reply on Dec 26, 2010 7:01 PM by boy18nj

    Arrange s:decorate fields next to each other horizontally in Edit page?

    boy18nj

      See the attachment "Before.jpg" it looks like. I want to display them as, see in attachment "After.jpg" (done in paint)

      Please tell me just tags or style that I can used it to make it display as in After.jpg.

        • 1. Re: Arrange s:decorate fields next to each other horizontally in Edit page?
          boy18nj

          I implemented the solution myself by using following code-

           

          Edit.xhtml-

           

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

           

          <style type="text/css">

          .name {

          vertical-align: top;

          font-weight: bold;

          width: 115px;

          float: left;

          padding: 5px;

          margin-top: 3px;

          margin-left: 50px;

          clear: left;

          }

           

          </style>

           

              <div class="prop" style="margin-left:auto;

          margin-right:auto;float:left;position:relative;overflow:auto">

           

                  <s:label styleClass="name #{invalid?'errors':''}">

                      <ui:insert name="label"/>

                      <s:span styleClass="required" rendered="#{required}">*</s:span>

                  </s:label>

           

                  <span class="value #{invalid?'errors':''}">

                      <s:validateAll>

                          <ui:insert/>

                      </s:validateAll>

                  </span>

           

                  <span class="error">

                      <h:graphicImage value="/img/error.gif" rendered="#{invalid}" styleClass="errors"/>

                      <s:message styleClass="errors"/>

                  </span>

           

              </div>

           

          </ui:composition>

          <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">
          <style type="text/css">
          .name {
          vertical-align: top;
          font-weight: bold;
          width: 115px;
          float: left;
          padding: 5px;
          margin-top: 3px;
          margin-left: 50px;
          clear: left;
          }
          </style>
              <div class="prop" style="margin-left:auto;
          margin-right:auto;float:left;position:relative;overflow:auto">
                  <s:label styleClass="name #{invalid?'errors':''}">
                      <ui:insert name="label"/>
                      <s:span styleClass="required" rendered="#{required}">*</s:span>
                  </s:label>
                  <span class="value #{invalid?'errors':''}">
                      <s:validateAll>
                          <ui:insert/>
                      </s:validateAll>
                  </span>
                  <span class="error">
                      <h:graphicImage value="/img/error.gif" rendered="#{invalid}" styleClass="errors"/>
                      <s:message styleClass="errors"/>
                  </span>
              </div>
          </ui:composition>