You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "David Evans (JIRA)" <ji...@apache.org> on 2006/04/27 19:50:19 UTC
[jira] Closed: (STR-241) Change to use a collection
like
[ http://issues.apache.org/struts/browse/STR-241?page=all ]
David Evans closed STR-241:
---------------------------
Resolution: Fixed
> Change <html:options/> to use a collection like <logic:iterate/>
> ----------------------------------------------------------------
>
> Key: STR-241
> URL: http://issues.apache.org/struts/browse/STR-241
> Project: Struts Action 1
> Type: Improvement
> Components: Taglibs
> Versions: Nightly Build
> Environment: Operating System: other
> Platform: Other
> Reporter: Jim Richards
> Assignee: Craig McClanahan
> Priority: Minor
>
> Why does <logic:iterate/> use a collection as
> A runtime expression that evaluates to a collection to be iterated over.
> and <html:options>
> Name of the JSP bean (in some scope) which is itself a Collection of
> other
> beans, each of which has properties named by the "property" and
> "labelProperty"
> attributes that are used to retrieve the value and label for each
> option,
> respectively. [RT Expr]
> effective, if I use <logic:iterate> I can do (something like) this
> <logic:iterate id="template" collection="<%= (SortedMap)
> application.getAttribute(\"template\")).getEntries() %>">
> </logic:iterate>
> which is really handy, but for <html:options> I have to do
> <% pageContext.setAttribute("catalog", myCatalogCollection); %>
> <html:select property="catalog_id">
> <html:options collection="catalog" property="value.id"
> labelProperty="value.description"/>
> </html:select>
> I'd rather have in the middle
> <html:options collection="<%= catalog %>" property="value.id"
> labelProperty="value.description"/>
> or similar, like I can do with iterate.
> Or put better from the index of the javadoc
> setCollection(Object) - Method in class
> org.apache.struts.taglib.EnumerateTag
> Set the collection over which we will be enumerating.
> setCollection(Object) - Method in class
> org.apache.struts.taglib.IterateTag
> Set the collection over which we will be iterating.
> setCollection(Object) - Method in
> class org.apache.struts.taglib.bean.SizeTag
> setCollection(Object) - Method in class
> org.apache.struts.taglib.logic.IterateTag
> setCollection(String) - Method in class
> org.apache.struts.taglib.html.OptionsTag
>
> Spot the odd one out.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org