3 Replies Latest reply on Feb 28, 2008 5:23 AM by Ilya Shaikovsky

    Rich:panelGrid ?

    Metin OSMAN Newbie

      Hi,

      I know this topic has been discussed several times, but I haven't found THE solution.

      How to do something like colspan using something like h:panelGrid.

      I know I can do it using a rich:DataTable with a value="1" attribute set and by using rich:colGroup inside (see above code sample). But this doesn't satisfy me.

      What do you think is the best solution, or what is recommanded ?

       <rich:dataTable columns="4" cellpadding="0" cellspacing="0"
       style="width: 100%;" value="1">
       <rich:columnGroup
       columnClasses="column120px leftAlignedColumn, leftAlignedColumn , leftAlignedColumn, leftAlignedColumn">
       <rich:column>
       <h:outputText value="#{lbl.activite_tache_utilisateur_responsable}"
       style="white-space: nowrap;" />
       </rich:column>
      
       <rich:column>
       <h:selectOneListbox size="1">
       <f:selectItem itemLabel="Arsene Houssaye" itemValue="ahoussaye" />
       <f:selectItem itemLabel="Claire Gallet" itemValue="cgallet" />
       <f:selectItem itemLabel="Patrick Leroux" itemValue="pleroux" />
       </h:selectOneListbox>
       </rich:column>
      
       <rich:column>
       <h:outputText
       value="#{lbl.activite_tache_groupe_utilisateur_responsable}"
       style="white-space: nowrap;" />
       </rich:column>
      
       <rich:column>
       <h:selectOneListbox size="1">
       <f:selectItem itemLabel="Groupe 1" itemValue="grp_1" />
       <f:selectItem itemLabel="Groupe 2" itemValue="grp_2" />
       </h:selectOneListbox>
       </rich:column>
       </rich:columnGroup>
      </rich:dataTable>
      


        • 1. Re: Rich:panelGrid ?
          Daniel Soneira Novice

          Use t:panelGrid, t:panelGroup.

          These are MyFaces Tomahawk components and support the colspan attribute.
          When you use t:panelGroup you HAVE to you use t:panelGrid, h:panelGrid does not support colspan.

          <t:panelGrid columns="2">
           <h:outputText value="row 1 column 1"/>
           <h:outputText value="row 1 column 2"/>
           <t:panelGroup colspan="2">
           <h:outputText value="row 2 - complete"/>
           </t:panelGroup>
          </t:panelGrid>


          • 2. Re: Rich:panelGrid ?
            Metin OSMAN Newbie

            thank for your answer.

            I didn't know that Tomahawk provides this components, but whatever, our politic is to limit the number of framework used in our application in order to prevent compatibilities problems.

            Is there anyway to do this with RichFaces ? Or will these kind of such useful components be provided one day ?

            Maybe I am posting in the wrong forum.

            • 3. Re: Rich:panelGrid ?
              Ilya Shaikovsky Master

              at our demosite - there is dataTable example which created using col, rowspan and breakBefore attributes.