I've hit another snag trying to test out JSF with the struts-faces
integration library. This is the fragment I'm trying to convert:
<html:select property="status">
<c:forEach var="s" items="${project.statusList}">
<html:option value="${s}">
<bean:message key="status.label.${s}"/>
</html:option>
</c:forEach>
</html:select>
And this is what I'm trying to convert it into:
<h:selectOneMenu id="status" value="#{ProjectEdit.status}">
<c:forEach var="s" items="#{projects.statusList}">
<f:selectItem itemValue="#{s}"
itemLabel="#{msgs['status.label.'s.name]}"/>
</c:forEach>
</h:selectOneMenu>
Where 'projects' is a managed bean I've defined in faces-config.xml.
This seems to present a couple of problems...
Firstly, c:forEach doesn't know how to evaluate the #{} expression. I
can't use ${} instead as the 'projects' bean may not have been
referrenced/instantiated yet. I looked through the f: tags, but couldn't
see anything like a c:set equivalent that's #{} aware. How do I do this?
Second, the itemLabel expression doesn't seem to work. Actually, on
second thoughts that might be to do with the things I was trying to do
to solve problem one, so I'll come back to this one...
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]