使用戰斧,我們可以嘗試使用佈局=」傳播」,如:
<t:selectOneRadio id="test" value="one" layout="spread" border="1">
<f:selectItem itemLabel="one" itemValue="one" />
<f:selectItem itemLabel="two" itemValue="two" />
<f:selectItem itemLabel="three" itemValue="three" />
<f:selectItem itemLabel="four" itemValue="four" />
<f:selectItem itemLabel="five" itemValue="five" />
</t:selectOneRadio>
<t:panelGrid columns="2">
<t:radio for="test" index="0"></t:radio>
<t:radio for="test" index="1"></t:radio>
</t:panelGrid>
<t:panelGrid columns="3">
<t:radio for="test" index="2"></t:radio>
<t:radio for="test" index="3"></t:radio>
<t:radio for="test" index="4"></t:radio>
</t:panelGrid>
然後使用AJAX重新呈現這件T:selectOneRadio更改爲其他佈局。
我覺得自定義JSF UI組件或自定義JSP標記是一個解決方案... – 2010-08-10 03:37:56
格式化文本,使其更清晰 – user339108 2010-08-10 03:47:40
爲第一和第二個問題,您可以使用佈局屬性,如佈局=「lineDirection」或這些jsf標籤中的layout =「pageDirection」。 – khairil 2010-08-10 04:04:32