【问题标题】:fix width and height of p:tabView primefaces修复 p:tabView primefaces 的宽度和高度
【发布时间】:2013-05-06 02:55:05
【问题描述】:

我有这个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>

我想修复所有选项卡的高度和宽度,并且当其中一个选项卡的宽度因验证而改变时:所有选项卡的宽度都相同

我也想知道是否可以在p:tabView内制作滚动条

***************** 解决方案:***** *****************

<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>

【问题讨论】:

    标签: primefaces tabs scroll height tabview


    【解决方案1】:

    对于标签视图中的滚动面板,您可以将模式指定为“本机”以使其正常工作。有关示例,请参阅here。关于宽度和高度,请参阅其他 question

    【讨论】:

      猜你喜欢
      • 2011-07-31
      • 2013-02-03
      • 1970-01-01
      • 1970-01-01
      • 2022-09-28
      • 1970-01-01
      • 2017-12-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多