[richfaces-issues] [JBoss JIRA] Commented: (RF-3786) subTable in dataTable adds additional <th>
ashutosh (JIRA)
jira-events at lists.jboss.org
Wed Oct 28 04:53:05 EDT 2009
[ https://jira.jboss.org/jira/browse/RF-3786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12491830#action_12491830 ]
ashutosh commented on RF-3786:
------------------------------
there is still a problem with the extra <th>
when i use
<rich:dataTable value="#{capitalsBean.capitals}" var="capital">
<rich:column>
<f:facet name="header">Capital Name</f:facet>
</rich:column>
<rich:column>
<f:facet name="header">Property Name</f:facet>
</rich:column>
<rich:column>
<f:facet name="header">Property Value</f:facet>
</rich:column>
<rich:subTable value="#{capital.detailList}" var="detail">
<rich:column />
<rich:column>
<h:outputText value="#{detail.key}" />
</rich:column>
<rich:column>
<h:outputText value="#{detail.value}" />
</rich:column>
</rich:subTable>
</rich:dataTable>
THE EXAMPLE DEMO WHICH IS MENTIONED ABOVE IS FROM THE LIVEDEMO OF EXADEL SITE THEN I WANT TO COMMENT ON THAT
THIS IS THE EXAMPLE IF I AM NOT WRONG MENTIONED IN THE REPORT
-----
<rich:dataTable
onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
cellpadding="0" cellspacing="0"
width="700" border="0" var="record" value="#{report.expReport.records}">
<f:facet name="header">
<rich:columnGroup>
<rich:column rowspan="2">
<rich:spacer />
</rich:column>
<rich:column colspan="3">
<h:outputText value="Expenses" />
</rich:column>
<rich:column rowspan="2">
<h:outputText value="subtotals" />
</rich:column>
<rich:column breakBefore="true">
<h:outputText value="Meals" />
</rich:column>
<rich:column>
<h:outputText value="Hotels" />
</rich:column>
<rich:column>
<h:outputText value="Transport" />
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column colspan="5">
<h:outputText value="#{record.city}" /></rich:column>
<rich:subTable
onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
var="expense" value="#{record.items}">
<rich:column>
<h:outputText value="#{expense.day}"></h:outputText>
<f:facet name="footer">
<rich:spacer />
</f:facet>
</rich:column>
<rich:column>
<h:outputText value="#{expense.meals}"><f:convertNumber pattern="$####.00" /></h:outputText>
<f:facet name="footer">
<h:outputText value="#{record.totalMeals}"><f:convertNumber pattern="$####.00" /></h:outputText>
</f:facet>
</rich:column>
<rich:column>
<h:outputText value="#{expense.hotels}"><f:convertNumber pattern="$####.00" /></h:outputText>
<f:facet name="footer">
<h:outputText value="#{record.totalHotels}"><f:convertNumber pattern="$####.00" /></h:outputText>
</f:facet>
</rich:column>
<rich:column>
<h:outputText value="#{expense.transport}"><f:convertNumber pattern="$####.00" /></h:outputText>
<f:facet name="footer">
<h:outputText value="#{record.totalTransport}"><f:convertNumber pattern="$####.00" /></h:outputText>
</f:facet>
</rich:column>
<rich:column>
<rich:spacer></rich:spacer>
<f:facet name="footer">
<h:outputText value="#{record.total}"><f:convertNumber pattern="$####.00" /></h:outputText>
</f:facet>
</rich:column>
</rich:subTable>
<f:facet name="footer">
<rich:columnGroup>
<rich:column>Totals</rich:column>
<rich:column>
<h:outputText value="#{report.expReport.totalMeals}"><f:convertNumber pattern="$####.00" /></h:outputText>
</rich:column>
<rich:column>
<h:outputText value="#{report.expReport.totalHotels}"><f:convertNumber pattern="$####.00" /></h:outputText>
</rich:column>
<rich:column>
<h:outputText value="#{report.expReport.totalTransport}"><f:convertNumber pattern="$####.00" /></h:outputText>
</rich:column>
<rich:column>
<h:outputText value="#{report.expReport.grandTotal}"><f:convertNumber pattern="$####.00" /></h:outputText>
</rich:column>
</rich:columnGroup>
</f:facet>
</rich:dataTable>
-------
this dataTable in the above is using <rich:columnGroup>
it is fine when using the property
but the dataTable losses some of its property like ---- sortBy , which is one of the features in dataTable
if this is the case then is there any solution to this that i will retain the like ---- sortBy and doesnot face the problem of of extra <th>
if <rich:columnGroup> is the only solution please comment on this
> subTable in dataTable adds additional <th>
> ------------------------------------------
>
> Key: RF-3786
> URL: https://jira.jboss.org/jira/browse/RF-3786
> Project: RichFaces
> Issue Type: Bug
> Components: planning_all
> Affects Versions: 3.2.0.SR1, 3.2.1
> Environment: RF-3.2.[01], JSF-RI implementation
> Reporter: Andreas Heiduk
> Assignee: Alexander Dubovsky
> Fix For: 3.3.0
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> As soon as a dataTable contains both subTable and a column "header" facet an additional <th> element is rendered.
> Example:
> <rich:dataTable value="#{capitalsBean.capitals}" var="capital">
> <rich:column>
> <f:facet name="header">Capital Name</f:facet>
> <h:outputText value="#{capital.name}" />
> </rich:column>
> <rich:column>
> <f:facet name="header">Property Name</f:facet>
> </rich:column>
> <rich:column>
> <f:facet name="header">Property Value</f:facet>
> </rich:column>
> <rich:subTable value="#{capital.detailList}" var="detail">
> <rich:column />
> <rich:column>
> <h:outputText value="#{detail.key}" />
> </rich:column>
> <rich:column>
> <h:outputText value="#{detail.value}" />
> </rich:column>
> </rich:subTable>
> </rich:dataTable>
> Now <thead> contains *four* <th> elements instead of three. The last <th> element looks like this:
> <th class="dr-table-subheadercell rich-table-subheadercell" scope="col"/>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list