Craig McClanahan wrote:
There are some significant interoperability issues between JSF 1.0/1.1 and
JSTL -- some of which have been addressed in JSF 1.2.  But there is a more
fundamental design issue here ... you're trying too hard :-).  Consider this
instead:

     <h:selectOneMenu id="status" value="#{ProjectEdit.status}">
         <f:selectItems value="#{projects.statusList}"/>
     </h:selectOneMenu>

where the getStatusList() method of your "projects" managed bean returns an
array or list of SelectItem instances.  There's no reason for you to have to
do the iteration in the view tier.

LOL! I'm actually using exactly that pattern elsewhere. The reason I didn't here is that the label needs to be localized:

  <f:loadBundle basename="MessageResources" var="msgs"/>
  ...
    <h:selectItem value="..." itemLabel="#{msgs['stat.lbl.'s.name]}"/>

in other words, if s.name is ACTIVE, the label should be the resource string keyed by 'stat.lbl.ACTIVE'. I didn't think I could get at the localization resources loaded in the current view from within an application-scoped bean's getter method (though I might be wrong about that!).

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to