struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Musachy Barroso <musa...@gmail.com>
Subject Re: OGNL and parameter binding
Date Thu, 30 Jul 2009 15:45:25 GMT
did you try something like:

<param name="mylist">${#{'key': 'value'}}</param>

OGNL docs: http://www.opensymphony.com/ognl/html/LanguageGuide/index.html

musachy

On Thu, Jul 30, 2009 at 6:36 AM, Wes Wannemacher<wesw@wantii.com> wrote:
> I am working on a new result-type and I want to put a field on the
> result like this -
>
> List<Map<String,String>> blah...
>
> I looked a bit at the HttpHeadersResult because it has an incoming
> HashMap<String,String> as one of the fields and you can set it via
> OGNL using <param name="header.a">blah</param> and 'a' becomes the key
> and 'blah' becomes the value. It seems like OGNL finds a method called
> addHeader(String,String) to do it... Is there a way to do the same
> sort of thing, but to push the map data into a list? If memory serves,
> collections have to be instantiated, and that seems to be my stopping
> point. I know I read about this somewhere, but I can't find it, and
> ognl.org has disappeared from the 'net.
>
> BTW, I'm using xwork 2.1.4, but will upgrade if Musachy's recent
> changes can help me.
>
> -Wes
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message