radio button list

hi,

i have a radio button list and want to select one before the page will load!!

is this possible and how can i do this!

this is my code!

<h:selectOneRadio value="#{testBean.sortMode}" onchange="this.form.submit();">

<f:selectItems

value="#{testBean.sortModeList}" />

</h:selectOneRadio>

[356 byte] By [RonniAngerera] at [2007-10-1 1:22:22]
# 1

I hope this will help you

on mainPage.jspthe user selcets a commandLink that calls

nextPage method.

Within the nextPage method.

FacesContext facesContext = FacesContext.getCurrentInstance();

testBean.sortMode test = (testBean)app.createValueBinding("#{testBean}").getValue(facesContext);

know the test object has a copy of the testBean that is stored in the users session

test.setSortMode("Desc");

return("nextPage")

so then on the nextPage.jsp the sortMode will have a default value.

<h:selectOneRadio value="#{testBean.sortMode}" onchange="this.form.submit();">

<f:selectItems value="#{testBean.sortModeList}" />

</h:selectOneRadio>

Hope this helps

ferric4a at 2007-7-8 1:40:43 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...