0

我如何将 ap:scrollpanel 与复选框一起使用,我试过这样,但它不起作用:

    <p:scrollPanel mode="native" >
                <h:panelGrid>
                    <p:selectManyCheckbox value="#{localCobrancaBean.selectLocaisCobranca}"> 

                        <f:selectItems value="#{localCobrancaBean.listaLocalCobranca}" />  

                    </p:selectManyCheckbox>
                </h:panelGrid>

            </p:scrollPanel>
4

3 回答 3

0

在我看来,解决方案将滚动面板模式设置为原生。问题是关于滚动面板和selectmanycheckbox DOM的相对和绝对定位

于 2012-12-20T10:22:01.927 回答
0

我使用以下 JSF 进行了测试:

<p:scrollPanel mode="native">
    <h:panelGrid>
        <p:selectManyCheckbox>
            <f:selectItem itemLabel="asdfghgfd" />
            <f:selectItem itemLabel="zdvdfbdfvds" />
            <f:selectItem itemLabel="zdcdghnfw" />
            <f:selectItem itemLabel="sddfvdfv" />
        </p:selectManyCheckbox>
    </h:panelGrid>
</p:scrollPanel>

结果是这样的:

复选框垂直滚动

所以它似乎正在工作。

于 2012-09-01T12:36:48.037 回答
0

在我的应用程序中,我使用下面的代码集来获取带有滚动条的多个复选框列表:

<style type="text/css">
#productCategoryId label {
  float: inherit;
  font-size: 10px!important;
  font-weight: normal;
}
#productCategoryId table.formTable th, table.formTable td {
  padding: 0px 0px 0 0;
}
</style>

<div style="width:200px;height: 280px;overflow-y:scroll;overflow-x:hidden;border:1px solid #999;" max-height=280px>
             <h:selectManyCheckbox  id="productCategoryId" layout="pageDirection" style="width:200px" styleClass="changeId">
                  <f:selectItem itemValue="-1000" itemLabel="ALL" />
                  <f:selectItems value="#{lookup.list['RSM_LOOKUP']['PRODUCT_CATEGORY']}"/>
                </h:selectManyCheckbox >
            </div>
于 2017-11-08T09:18:15.293 回答