mardi 14 juin 2016

If I use datatable inside the ui:repeat, scroll bar inside the datatable not working properly

when in use the datatable inside the ui:repeat, scroll bar inside the datatable not working properly (if i scroll my first datatable horizontal scroll bar ,alone with my first datatable the second datatable header is also getting scrolled )

sample code

    <ui:repeat var="repeatVar" value="#{dtScrollView.repeatList}" id="1234">
                     <p:dataTable var="car" value="#{dtScrollView.cars3}" scrollable="true" scrollWidth="300" scrollHeight="150">
                        <p:column headerText="Id" footerText="Id" width="200">
                            <h:outputText value="#{car.id}" />
                        </p:column>
                        <p:column headerText="Year" footerText="Year" width="200">
                            <h:outputText value="#{car.year}" />
                        </p:column>
                        <p:column headerText="Brand" footerText="Brand" width="200">
                            <h:outputText value="#{car.brand}" />
                        </p:column>
                        <p:column headerText="Color" footerText="Color" width="200">
                            <h:outputText value="#{car.color}" />
                        </p:column>
                        <p:column headerText="Id" footerText="Id" width="200">
                            <h:outputText value="#{car.id}" />
                        </p:column>
                        <p:column headerText="Year" footerText="Year" width="200">
                            <h:outputText value="#{car.year}" />
                        </p:column>
                        <p:column headerText="Brand" footerText="Brand" width="200">
                            <h:outputText value="#{car.brand}" />
                        </p:column>
                        <p:column headerText="Color" footerText="Color" width="200">
                            <h:outputText value="#{car.color}" />
                        </p:column>
                        <p:column headerText="Id" footerText="Id" width="200">
                            <h:outputText value="#{car.id}" />
                        </p:column>
                        <p:column headerText="Year" footerText="Year" width="200">
                            <h:outputText value="#{car.year}" />
                        </p:column>
                        <p:column headerText="Brand" footerText="Brand" width="200">
                            <h:outputText value="#{car.brand}" />
                        </p:column>
                        <p:column headerText="Color" footerText="Color" width="200">
                            <h:outputText value="#{car.color}" />
                        </p:column>
                        <p:column headerText="Id" footerText="Id" width="200">
                            <h:outputText value="#{car.id}" />
                        </p:column>
                        <p:column headerText="Year" footerText="Year" width="200">
                            <h:outputText value="#{car.year}" />
                        </p:column>
                        <p:column headerText="Brand" footerText="Brand" width="200">
                            <h:outputText value="#{car.brand}" />
                        </p:column>
                        <p:column headerText="Color" footerText="Color" width="200">
                            <h:outputText value="#{car.color}" />
                        </p:column>
                        <p:column headerText="Id" footerText="Id" width="200">
                            <h:outputText value="#{car.id}" />
                        </p:column>
                        <p:column headerText="Year" footerText="Year" width="200">
                            <h:outputText value="#{car.year}" />
                        </p:column>
                        <p:column headerText="Brand" footerText="Brand" width="200">
                            <h:outputText value="#{car.brand}" />
                        </p:column>
                        <p:column headerText="Color" footerText="Color" width="200">
                            <h:outputText value="#{car.color}" />
                        </p:column>
                    </p:dataTable>
                    </ui:repeat>

please refer the java class in below link: http://www.primefaces.org/showcase/ui/data/datatable/scroll.xhtml

In addition

I have added two values in the repeatList , so that i can repeat the datatable twice. you can give 'n' values and check.

Am using primefaces 3.3.1 version.

Is there any possibilities to customise primefaces css to achive it?

If you need any other additional information , kindly suggest..

Aucun commentaire:

Enregistrer un commentaire