On 3/1/06, Chris Cheshire <[EMAIL PROTECTED]> wrote:
> Michael,
>
> Thanks for the reference, but it doesn't explain very much.
>
> Yes the widget looks like what I want, but is it something I download?

You lost me.

> Is it something that exists in the struts tag libraries? Does the
> states collection exist there?

What "this"? The collection is created by you in your program.

> What happens if I wanted to do states
> for Australia for instance, where would I obtain those?

I don't know. Australian postal service I guess.

> I understand how to write the struts tags to build the list, I don't
> quite know how to obtain a reference to a collection I have built and
> stored in the servlet context.

Have you tried to put collection name in the "name" attribute of
<html:optionscollection>? Does it not work? Do you have another object
with this name in another scope?

Have you looked in the OptionsCollectionTag source code? It uses
pageContext.findAttribute(name) to locate a bean by name.

Michael.

> On 3/1/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > On 3/1/06, Chris Cheshire <[EMAIL PROTECTED]> wrote:
> > > I am building a select list to select a state for an address and since
> > > it will be used in a few forms throughout the application I want to
> > > make this as centralised as possible.
> > >
> > > I have built a bean with getValue(), getLabel() attributes and created
> > > a collection of them and placed as an attribute in the servlet context
> > > via a servlet that is loaded on startup.
> > >
> > > How do I retrieve this for use in the html:optionsCollection tag?
> >
> > http://wiki.apache.org/struts/StrutsWidgets

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

Reply via email to