This content has been marked as final.
Show 1 reply
-
1. Re: Table with detail stamp
michpetrov Feb 12, 2015 9:30 AM (in response to ricardinho_rio)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>