Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to horizontally layout the radio button in <tr:selectOneRadio>

shawn_abcAug 21 2014 — edited Aug 21 2014

Hi all,

I am trying to layout the radio buttons form <tr:selectOneRadio> horizontally by using layout="horizontal" attribute, but it fails to do so? Also, is there a way to specify the position of the label of each item in <tr:selectOneRadio>, I noticed that the label of each radio button is underneath the radio button, how to align the label and radio button in same line (horizontally). So my questions has 2 horizontal layouts: one between radio buttons including there labels; one between each radio button and its label. Here's the code segment


<trh:cellFormat>

                   <tr:panelGroupLayout layout="horizontal">               

                        <tr:inputText id="height"

                            value=" " columns="3" maximumLength="3"

                         />

                        <tr:spacer width="10px"/>

                        <tr:selectOneRadio id="heightUnit" label="unit" valuePassThru="true" layout="horizontal" value="#{bk_myBean.heightUnit}" >

                            <f:selectItem itemValue="in" itemLabel="in"/>

                            <f:selectItem itemValue="cm" itemLabel="cm"/>

                        </tr:selectOneRadio>

                        <!--

                        <tr:selectBooleanRadio group="heightUnits" text="in" autoSubmit="true" inlineStyle="border-width:0px;" />

                        <tr:spacer width="10px"/>

                        <tr:selectBooleanRadio group="heightUnits" text="cm" autoSubmit="true" inlineStyle="border-width:0px;" />

                        -->

                    </tr:panelGroupLayout>

</trh:cellFormat>

Please note that I also tried <tr:selectBooleanRadio> and within <tr:panelGroupLayout layout="horizontal">, its layout is horizontal, but again, the label is below the radio button, not aligned horizontally.

Thanks,

Shawn

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2014
Added on Aug 21 2014
11 comments
1,542 views