This content has been marked as final.
Show 2 replies
-
1. Re: Help needed in selectOneMenu
nbelaevski Mar 24, 2010 6:30 PM (in response to richfaceman)Hi Zed,
Looking at the code posted, it seems to me that code block with all the nested c:choose/c:when can be replaced by:
<f:selectItem itemValue="#{bean.selectedEvent.eventTypeCode}" itemLabel="#{bean.selectedEvent.eventTypeLabel}" />
or
<f:selectItem itemValue="#{bean.selectedEvent.eventTypeCode}" itemLabel="#{bean.eventTypeLabelsMap[bean.selectedEvent.eventTypeCode]}" />
Also it is better to remove logic from your view as possible and use beans. JSF provides special attributes that you can use: "rendered" instead of <c:if>, <f:selectItem> with its "value" attribute, etc.
-
2. Re: Help needed in selectOneMenu
richfaceman Mar 24, 2010 7:15 PM (in response to nbelaevski)Thanks for your reply Nick I'm gonna have a go at it.
Zed