gpt4 book ai didi

jsf - h :selectOneRadio renders all select items in one line, 如何在新行中渲染每个?

转载 作者:行者123 更新时间:2023-12-04 19:10:14 28 4
gpt4 key购买 nike

我有一个 selectOneRadio 标签,所有单选按钮选项都显示在一行上。我怎样才能让它每行/行一个选项?

最佳答案

要了解标签的行为及其所有可用属性,tag documentation 是一个很好的起点。 .这是 <h:selectOneRadio> tag documentation 的摘录相关性:

[...]

Encode Behavior

Render a "table" element. If the "styleClass" is specified, render the value of the "styleClass" attribute as the value of the "class" attribute on the "table" element. If the "style", "border" attributes are specified, pass them thru and render their values as the "style" and "border" attributes on the "table", respectively. If the "layout" attribute is specified, and its value is "pageDirection", render the children elements vertically, otherwise horizontally, in the table. If any of the children are an instance of SelectItemGroup, render them as a nested table. Each of the children are ultimately rendered as follows. Render an "input" element of "type" "radio" for each child component. Render the "name" attribute on the "input" element with the value of the clientId of the component. Render an "id" attribute on the "input" element. Each "id" value must be unique. If the current SelectItem.isDisabled() returns true, render "disabled" as the value of the "disabled" attribute.

[...]

注意重点。这就是你的答案。

<h:selectOneRadio ... layout="pageDirection">

关于jsf - h :selectOneRadio renders all select items in one line, 如何在新行中渲染每个?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16017919/

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