1 Reply Latest reply on Feb 12, 2015 9:30 AM by michpetrov

    Table with detail stamp

    ricardinho_rio

      Hi Folks,

       

      i am used to work with ADF Faces and right there we have a datatable with detailstamp, something like we have in IceFaces and as in the attached image.

       

      I would like to know if we have something like this in RichFaces or I should write my own component. Would it be hard to write such behaviour?

       

      Thanks in advance.

       

      Best Regards,

      Ricardo

        • 1. Re: Table with detail stamp
          michpetrov

          Hi,

           

          there is no special component but it doesn't look like it would be hard to implement. You simply add another column with all the details, make it hidden by default and then make a button that will toggle the visibility, something like this:

           

          <rich:dataTable value="#{bean.list}" var="item" id="table">
              <rich:column>
                  <h:outputText value="#{item.id}" />
                  <a4j:commandButton execute="@none" value="Show Detail"
                      onclick="$(this).parent().parent().next().find('.hidden').toggle(); return false;"/>
              </rich:column>
              <rich:column>
                  <h:outputText value="#{item.value}" />
              </rich:column>
              <rich:column>
                  <h:outputText value="#{item.type}" />
              </rich:column>
              <rich:column colspan="3" breakRowBefore="true" style="display:none" styleClass="hidden">
                  <h:panelGroup>
                      …
                  </h:panelGroup>
              </rich:column>
          </rich:dataTable>