Johnny2012
Johnny2012

Reputation: 1532

Fixed PanelGrid in JSF while scrolling (primefaces)

I need to set the panelGrid fixed while scrolling the page.

e.g. the bottom bar on the top should be fixed, while scrolling the datatable.

    <h:panelGrid id="buttonGrid">
....
</h:panelGrid>


<p:dataTable id="datatable" .....>
....
</p:dataTable>

How can I solve this?

Upvotes: 1

Views: 3109

Answers (1)

Kuba
Kuba

Reputation: 2089

This works:

<h:panelGrid id="buttonGrid" styleClass="fixed-class">
            <h:outputText value="text text"/>
            <h:outputText value="text text"/>
            <h:outputText value="text text"/>
            <h:outputText value="text text"/>
            <h:outputText value="text text"/>
</h:panelGrid>

css:

.fixed-class{
    position: fixed;
}

Upvotes: 2

Related Questions