如何使用带有复选框的p:scrollpanel,我尝试过这样做,但它不起作用:
<p:scrollPanel mode="native" >
<h:panelGrid>
<p:selectManyCheckbox value="#{localCobrancaBean.selectLocaisCobranca}">
<f:selectItems value="#{localCobrancaBean.listaLocalCobranca}" />
</p:selectManyCheckbox>
</h:panelGrid>
</p:scrollPanel>发布于 2012-09-01 20:36:48
我使用以下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-12-20 18:22:02
在我看来,解决方案是将scrollpanel模式设置为native。这个问题是关于滚动面板和选择复选框DOM的相对和绝对定位
发布于 2017-11-08 17:18:15
在我的应用程序中,我使用了以下代码集来获得带有滚动条的多个复选框列表:
<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>https://stackoverflow.com/questions/12215793
复制相似问题