You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Jim Richards <gr...@cyber4.org> on 2001/05/02 15:49:02 UTC
html:options collection attribute
I'm not if this has ben pointed out before (way too much email at the moment)
but I find that the <html:options> tag has some discrepency in the collection
attribute. At the moment I do this:
<% pageContext.setAttribute("catalog", ((SystemManager) application.getAttribute(SystemManager.THIS)).getCatalog("skill_catalog_user_years").entrySet()); %>
<html:select property="<%= \"skillTree.skill[\" + ((SkillEntry) ((Map.Entry) entry).getValue()).getParentId() + \"].entry[\" + ((SkillEntry) ((Map.Entry) entry).getValue()).getSkillId() + \"].years\" %>">
<html:options collection="catalog" property="value.id" labelProperty="value.description"/>
</html:select>
Sorry about the long property value, I have fairly heavily nested structures at the moment,
(A subject for a longer email).
I would expect the html:options collection to be more like the logic:iterate collection and
take something like
<html:options collection="<%= some collection here %>" property="value.id" labelProperty="value.description"/>
so I didn't have to set a pageContext as I do now before the html:select tag.
Any comments?
--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html