我想實現在JSF1.1環境下:對齊單選按鈕上,標籤在JSP/JSF
性別:女RadioButtonForFemale男RadioButtonForMale
<h:panelGroup>
<h:outputLabel for = "searchSex" value = "#{bundle.Sex_Label}" style ="width:15%;">
</h:outputLabel>
<h:selectOneRadio id="searchSex" value="#{yy.search_Sex}" style="verticle-align:top;font-size:95%;color:red;">
<f:selectItem itemLabel="F" itemValue="F" />
<f:selectItem itemLabel="M" itemValue="M"/>
</h:selectOneRadio>
</h:panelGroup>
基本上,所有的無線電按鈕應與標籤在同一行(在我們的案例中爲性別)。
附加是我目前的代碼。單選按鈕出現在下一行。我的PanelGrid有1列。
感謝,
如果您在代碼中提及'panelGrid',將會更容易理解。 – mrembisz 2012-02-05 21:29:25