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 show a selectOneRadio as preselcted

927837Aug 8 2012 — edited Aug 8 2012
Hi,

I have two radion buttons with labels as High and Low

I need to display either high or Low as preselected accoring to what i get from database.


<af:selectOneRadio id="indicatePostnID"
value="#{viewScope.Bean.indicatePostnOptnSelected}"
layout="horizontal">
<f:selectItems value="#{viewScope.Bean.indicatePostnRadioBtnList}"
id="dilReqSelID"/>
</af:selectOneRadio>


indicatePostnRadioBtnList.add(new SelectItem(0,High))
indicatePostnRadioBtnList.add(new SelectItem(1,Low))

if 0 comes from Database i need to display High as preslected or if 1 comes then Low.

Now I am getting 1 from DB whic i have assigned to indicatePostnOptnSelected variable but still Low is not getting preselected. Using ADF 11.1.1.5.0 , JSF 2.0

Please help ASAP.

Edited by: 924834 on Aug 8, 2012 1:35 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 5 2012
Added on Aug 8 2012
1 comment
63 views