gpt4 book ai didi

jsf-2 - 渲染 selectManyCheckbox 而不使用 HTML 表

转载 作者:行者123 更新时间:2023-12-02 21:35:02 25 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 - 渲染 selectManyCheckbox 而不使用 HTML 表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21607967/

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