Datatable losing theme inside accordion panel

UI Components for JSF
Post Reply
squeeze
Posts: 2
Joined: 28 Nov 2013, 00:22

28 Nov 2013, 00:33

I have 2 datatables inside individual tabs inside an accordion panel. When I put the datatables outside of the accordion panel the style looks correct, but when they are inside the style looks like it is removed. I'm using primefaces 4.0 and Tomcat. Please help.

<p:accordionPanel id="accordionPanel" multiple="true"
activeIndex="#{holdBean.activeHoldTab}">
<p:ajax event="tabChange" listener="#{holdBean.tabOpened}" />
<p:ajax event="tabClose" listener="#{holdBean.tabClosed}" />
<p:tab title="Active Holds" id="activeHolds">
<p:panel>
<p:dataTable id="activeHoldsGrid"
value="#{holdBean.workflowActiveHolds}" var="activeHold"
emptyMessage="No Active Holds" styleClass="ui-datatable">
<p:column headerText="Hold Type">#{activeHold.holdTypeDesc}</p:column>
<p:column headerText="Start Date">#{activeHold.startDate}</p:column>
<p:column headerText="Reason">#{activeHold.holdReason}</p:column>
<p:column headerText="User">#{activeHold.userID}</p:column>
<p:column>
<p:commandButton id="releaseButton" value="Release"
action="#{holdBean.release}" immediate="true" />
</p:column>
</p:dataTable>
</p:panel>
<p:panel id="releaseAllPanel" visible="#{holdBean.hasActiveHold}">
<div align="center">
<p:commandButton id="releaseAllButton" value="Release All"
action="#{holdBean.releaseAll}" update="accordionPanel"
immediate="true" />
</div>
</p:panel>
</p:tab>
<p:tab id="holdHistory" title="Hold History">
<p:dataTable id="holdHistoryGrid"
value="#{holdBean.workflowHistoryHolds}" var="workflowHistoryHold"
emptyMessage="No Hold History" paginator="true" rows="10"
paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {CurrentPageReport}">
<p:column headerText="Hold Type">#{workflowHistoryHold.holdTypeDesc}</p:column>
<p:column headerText="Start Date">#{workflowHistoryHold.startDate}</p:column>
<p:column headerText="End Date">#{workflowHistoryHold.endDate}</p:column>
<p:column headerText="Reason">#{workflowHistoryHold.holdReason}</p:column>
<p:column headerText="User">#{workflowHistoryHold.userID}</p:column>
</p:dataTable>
</p:tab>
</p:accordionPanel>

squeeze
Posts: 2
Joined: 28 Nov 2013, 00:22

29 Nov 2013, 20:12

I figured out the issue. I had to add a <head> tag to my page.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests