Barcelona Subtable Rendering Error: Column Header Text Showing in every row

Post Reply
ushiezoe@gmail.com
Posts: 5
Joined: 09 Mar 2017, 17:05

23 Aug 2017, 10:09

Hi All,

I am getting a rendering error with the Barcelona theme for subtable implementations. The column header text appears along with the column data! Below is a piece of code. I am unable to attach a the screen shot of the web page.

<p:dataTable scrollable="true" id="equityPortfolioTable" styleClass="fixed-size" value="#{investmentFundBean.equityPortSummaryList}" var="portSummary" reflow="true" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {Exporters}">
<f:facet name="header">
<p:outputLabel value="EQUITIES"/>
</f:facet>
<p:columnGroup type="header">
<p:row>
<p:column headerText="Security" />
<p:column headerText="Category" />
<p:column headerText="Quantity" />
<p:column headerText="Price" />
<p:column headerText="Average Cost" />
<p:column headerText="Market Value" />
<p:column headerText="Cost" />
<p:column headerText="Growth/(Decline)" />
<p:column headerText="Growth %" />
<p:column headerText="Percent of Total" />
</p:row>
</p:columnGroup>
<p:subTable value="#{portSummary.portfolioSummaryList}" var="portDetail">
<p:column>
<p:commandLink id="securityNameCol" ajax="false" value="#{portDetail.securityName}" actionListener="#{investmentFundBean.viewEquityFundTranxEventCascaded}" action="#{investmentFundBean.viewFundTranxCascaded}"/>
</p:column>
<p:column>
<p:outputLabel value="#{portDetail.categoryName}"/>
</p:column>
<p:column>
<p:outputLabel id="quatityCol" value="#{portDetail.quatity}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2" maxFractionDigits="2"/>
</p:outputLabel>
</p:column>
<p:column>
<p:outputLabel id="priceCol" value="#{portDetail.price}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</p:column>
<p:column>
<p:outputLabel value="#{portDetail.averageCost}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</p:column>
<p:column>
<p:outputLabel value="#{portDetail.marketValue}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</p:column>
<p:column>
<p:outputLabel value="#{portDetail.cost}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</p:column>
<p:column>
<p:panelGrid>
<p:outputLabel value="(" styleClass="#{portDetail.amountPerformanceColor}" rendered="#{portDetail.negativeDifference}"/>
<p:outputLabel value="#{portDetail.difference * -1}" styleClass="#{portDetail.amountPerformanceColor}" rendered="#{portDetail.negativeDifference}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
<p:outputLabel value="#{portDetail.difference}" styleClass="#{portDetail.amountPerformanceColor}" rendered="#{!portDetail.negativeDifference}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
<p:outputLabel value=")" styleClass="#{portDetail.amountPerformanceColor}" rendered="#{portDetail.negativeDifference}"/>
<p:graphicImage url="#{portDetail.amountPerformanceSignImage}" height="20"/>
</p:panelGrid>
</p:column>
<p:column>
<p:panelGrid>
<p:outputLabel value="(" styleClass="#{portDetail.amountPerformanceColor}" rendered="#{portDetail.negativeDifference}"/>
<p:outputLabel value="#{portDetail.differencePercent * -1}" styleClass="#{portDetail.amountPerformanceColor}" rendered="#{portDetail.negativeDifference}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
<p:outputLabel value="#{portDetail.differencePercent}" styleClass="#{portDetail.amountPerformanceColor}" rendered="#{!portDetail.negativeDifference}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
<p:outputLabel value=")" styleClass="#{portDetail.amountPerformanceColor}" rendered="#{portDetail.negativeDifference}"/>
<p:graphicImage url="#{portDetail.amountPerformanceSignImage}" height="20"/>
</p:panelGrid>
</p:column>
<p:column>
<p:outputLabel value="#{portDetail.percentOfTotal}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</p:column>
<p:columnGroup type="footer">
<p:row>
<p:column colspan="5" footerText="" />
<p:column>
<f:facet name="footer">
<p:outputLabel escape="false" value="#{portSummary.marketValue}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</f:facet>
</p:column>
<p:column>
<f:facet name="footer">
<p:outputLabel escape="false" value="#{portSummary.cost}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</f:facet>
</p:column>
<p:column>
<f:facet name="footer">
<p:outputLabel escape="false" value="#{portSummary.difference}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</f:facet>
</p:column>
<p:column>
<f:facet name="footer">
<p:outputLabel escape="false" value="#{portSummary.differencePercent}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</f:facet>
</p:column>
<p:column>
<f:facet name="footer">
<p:outputLabel escape="false" value="#{portSummary.percentOfTotal}">
<f:convertNumber pattern="###,###.##" minFractionDigits="2"/>
</p:outputLabel>
</f:facet>
</p:column>
</p:row>
</p:columnGroup>
</p:subTable>
</p:dataTable>

User avatar
aragorn
Posts: 2697
Joined: 29 Jun 2013, 12:38

23 Aug 2017, 16:32

It is not a PrimeNg issue. Please use PrimeFaces forum.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest