HeaderText doesn't show in RowExpansion component

Locked
spawn
Posts: 8
Joined: 25 Nov 2015, 13:41

25 Nov 2015, 14:51

The headerText (Stuff) in this case doesn't appear inside a <p:rowExpansion> component. Any suggestion?

Code: Select all

<p:rowExpansion>
   <p:dataTable ...>
      <p:column headerText="Stuff">
         ...
      </p:column>
      ...
   </p:dataTable>
</p:rowExpansion>

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

25 Nov 2015, 17:21

I think this isn't a Layout or Theme issue. Please use core forum; http://forum.primefaces.org/viewforum.php?f=3

Also, I tested this issue with Spark. it works fine.
Screenshot;
Image

Test;

Code: Select all

<h:form id="form">
    <p:dataTable var="car2" value="#{dtBasicView.cars}">
        <f:facet name="header">
            Expand rows to see detailed information
        </f:facet>
        <p:column style="width:24px">
            <p:rowToggler />
        </p:column>
        <p:column headerText="Id">
            <h:outputText value="#{car2.id}" />
        </p:column>
        <p:column headerText="Year">
            <h:outputText value="#{car2.year}" />
        </p:column>

        <p:rowExpansion>
            <p:dataTable id="singleDT" var="car" value="#{dtSelectionView.cars7}" selectionMode="single" selection="#{dtSelectionView.selectedCar}" rowKey="#{car.id}"
                         rows="10" paginator="true" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" emptyMessage="No cars found with given criteria" reflow="true">
                <f:facet name="header">
                    Car Sales Ranks
                </f:facet>

                <p:column headerText="Id" sortBy="#{car.id}" footerText="Id">
                    <h:outputText value="#{car.id}" />
                </p:column>
                <p:column headerText="Year" sortBy="#{car.year}" footerText="Year">
                    <h:outputText value="#{car.year}" />
                </p:column>
                <p:column headerText="Brand" sortBy="#{car.brand}" footerText="Brand">
                    <h:outputText value="#{car.brand}" />
                </p:column>
                <p:column headerText="Color" sortBy="#{car.color}" footerText="Color">
                    <h:outputText value="#{car.color}" />
                </p:column>
            </p:dataTable>
        </p:rowExpansion>
    </p:dataTable>
</h:form>

spawn
Posts: 8
Joined: 25 Nov 2015, 13:41

29 Jan 2016, 20:04

I found the problem. The behavior happens when datatable has the reflow attribute.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

01 Feb 2016, 12:21

Thanks for the update. This is a PrimeFaces Core issue. Please try;

Code: Select all

.ui-datatable-reflow .ui-datatable-data .ui-expanded-row-content thead .ui-column-title {
     display: inline;
}

spawn
Posts: 8
Joined: 25 Nov 2015, 13:41

17 Mar 2016, 20:23

It works. Thanks!

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

18 Mar 2016, 09:27

Glad to hear, thanks!

Locked

Return to “Spark”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests