You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sorenson, Alexander" <al...@tallan.com> on 2001/08/07 05:51:51 UTC
using a Collection from nested attributes for option tag
I have previously been populating my options form elements from
ArrayLists I have stored in the application scope. I am now
implementing a more robust caching mechanism for this information and am
trying to find the best way to access these collections now. For
example to get to one of my collections now, I would use the following
call:
ArrayList countries = CacheManager.getMenuCache().getCountries();
CacheManager is stored at the application scope, under
Const.CACHE_MANAGER_KEY.
Is there a way to just use the options tag, with something like:
<html:options collection="<%
session.getAttribute(Const.CACHE_MANAGER_KEY).getMenuCache().getCountrie
s() %>" property="value" labelProperty="label"/>
or do I need to have a <jsp:useBean> tag to get to the collection?
Thanks,
Alex