4 Replies Latest reply on Mar 7, 2011 12:01 AM by javatwo

    implement custom layout of any style

    javatwo

      Hello, Richfaces has layout component, but it support only  left/bottom/top/center/right postion. We need to have a layout component that let user specify any layout style. For example

       

      <my:anyLayout value="#{bean.productList}" var="product" layout="#{bean.layout}"

                  rowIndexVar="rowIndex" ajaxKeys="#{bean.rowsToUpdate}" >

       

      <h:panelGroup >

        <h:outputText value="#{product.name}:" /> 

        <h:outputText value="#{product.price}" />

      </h:panelGroup>

       

      </my:anyLayout>

       

      the layout can be any html code such as :

       

      <table><tr><td>$1</td><td>$3</td></tr></table>

       

      where $N represents the rendered html segment for the row number N. This is similar to <rich:dataList> except the layout code.

      ajax needs to be supported. Can anyone help me to implement this component?  I looked at richfaces source code, but have not figured it out.

       

      Thanks for help.

      Dave