Could anyone help on this please?

At 2011-09-17 18:39:13,zjzhoufy <zjzho...@163.com> wrote:
>Hi,
> 
>How could I set up the default value of a drop down list (tx:selectOneChoice) 
>to the initialized value in the object?
> 
>Here is the code in my jsp file content:
>     <tx:selectOneChoice id="mtn_basic_role_select" label="Please select a 
> role"
>      value="#{clgBasicMaintain.clg.role}" converter="clgRoleConverter">
>              <f:selectItems value="#{listservice.roleList}"  
> id="roleList_item" />
>     </tx:selectOneChoice>
>------------------------------------------
>clgBasicMaintain.clg.role with type ColleagueRole, and #{listservice.roleList} 
>is a SelectItem list with value type ColleagueRole and label is the role name.
> 
>clgRoleConverter could convert the role name to the ColleagueRole object.
> 
>Now the object clgBasicMaintain.clg already has an initialized value. But 
>every time I run this page, the defaule value of the drop down list is set to 
>the first SelectItem of the list.
> 
>How could I set up the default value of the drop down list to the initialized 
>value please?
> 
>If you need any more information, please let me know.
> 
>Many thanks.
>Regards,
>Peter Zhou
>
>--

Reply via email to