JSF RichTable merging rows / columns in a header

后端 未结 1 1716
独厮守ぢ
独厮守ぢ 2021-01-29 04:12

What I want to do is do this layout with RichTable in its header to have 3 columns:

+---+---+-------+
|   |   | 3   5 |
| 1 | 2 |-------+
|   |   | 4         


        
相关标签:
1条回答
  • 2021-01-29 04:55

    I use <rich:column rowspan="2"> and <rich:column breakRowBefore="true"> for similar table: Result

    Code

        <f:facet name="header">
            <h:outputText value="#{msg.txnLineItems}" />
            <rich:columnGroup>
                <rich:column rowspan="2">
                    <h:outputText value="#{msg.item}" />
                </rich:column>
                <rich:column rowspan="2">
                    <h:outputText value="#{msg.department}" />
                </rich:column>
                <rich:column rowspan="2">
                    <h:outputText value="#{msg.purchaseAmount}" />
                </rich:column>
                <rich:column rowspan="2">
                    <h:outputText value="#{msg.quantity}" />
                </rich:column>
                <rich:column colspan="5">
                    <h:outputText value="#{msg.promotions}" />
                </rich:column>
    
                <rich:column breakRowBefore="true">
                    <h:outputText value="#{msg.promoName}" />
                </rich:column>
                <rich:column>
                    <h:outputText value="#{msg.promoCode}" />
                </rich:column>
                <rich:column>
                    <h:outputText value="#{msg.promoCategory}" />
                </rich:column>
                <rich:column>
                    <h:outputText value="#{msg.discount}" />
                </rich:column>
                <rich:column>
                    <h:outputText value="#{msg.points}" />
                </rich:column>
            </rich:columnGroup>
            </f:facet>
    
    0 讨论(0)
提交回复
热议问题