Question

I have this p:tabView

<p:tabView id="monpanel"  >

            <p:tab id="tab1" title="Informations">
                <ui:include src="includes/Informations.xhtml" />
            </p:tab>

            <p:tab id="tab2" title="Prix">
            <ui:include src="includes/Prix.xhtml" />
            </p:tab>

            <p:tab id="tab3" title="Fournisseurs">
            <ui:include src="includes/fournisseurs.xhtml" />
            </p:tab>

            <p:tab id="tab4" title="Stock">
            <ui:include src="includes/stock.xhtml" />
            </p:tab>

        </p:tabView>

and I want to fix the height and width to all tabs and when the width of one of them change because of the validation : all of them get the same width

and also I want to know if it is possible to make scrollbar inside p:tabView

***************** solution : **********************

<p:tabView id="monpanel">

            <p:tab id="tab1" title="Informations">
                <p:scrollPanel style="width: 596px;height: 231px;border: none;" mode="native" >
                    <ui:include src="includes/Informations.xhtml" />
                </p:scrollPanel>
            </p:tab>

            <p:tab id="tab2" title="Prix">
                <p:scrollPanel style="width: 596px;height: 231px;border: none;" mode="native" >
                    <ui:include src="includes/Prix.xhtml" />
                </p:scrollPanel>
            </p:tab>

            <p:tab id="tab3" title="Fournisseurs">
            <p:scrollPanel style="width: 596px;height: 231px;border: none;" mode="native" >
                <ui:include src="includes/fournisseurs.xhtml" />
                </p:scrollPanel>
            </p:tab>

            <p:tab id="tab4" title="Stock">
            <p:scrollPanel style="width: 596px;height: 231px;border: none;" mode="native" >
                <ui:include src="includes/stock.xhtml" />
                </p:scrollPanel>
            </p:tab>



        </p:tabView>
Was it helpful?

Solution

As for your scrollpanel inside your tabview, you can specify the mode to be 'native' to get this to work. See here for an example. Refer to this other question regarding width and height.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top