gpt4 book ai didi

jsf-2 - 在没有 HTML 表格的情况下渲染 selectManyCheckbox

转载 作者:行者123 更新时间:2023-12-02 04:37:39 33 4
gpt4 key购买 nike

有没有办法从服务器界面中的 h:selectManyCheckbox 标记创建的渲染 html 中删除表格?

我正在使用 twitter bootstrap 并将复选框放在下拉菜单中:

<ul class="dropdown-menu dropdown-menu-form">
<li><label class="checkbox"> <input type="checkbox" />
Activated
</label></li>
<li><label class="checkbox"> <input type="checkbox" />
Deactivated
</label></li>
</ul>

所以生成的html表格破坏了布局...

最佳答案

你可以渲染一堆 <h:outputLabel><h:selectBooleanCheckbox>里面<ui:repeat> .这样你就可以自由标记了。您只需要更改模型,例如List<T>Map<T, Boolean>表示选中的值,然后在 map 上循环以收集选中的值。

一个随时可用的组件是 Tomahawk 的 <t:selectManyCheckbox> 其中有一个额外的 layout spread 的属性值.

关于jsf-2 - 在没有 HTML 表格的情况下渲染 selectManyCheckbox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21607967/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com