You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kibo <to...@gmail.com> on 2008/09/28 13:10:31 UTC

call Collections.sort with OGNL

Please

How can I call static method java.util.Collections.sort in OGNL?

I use this: (but it don´t work)
<s:set name="testList" value="%{@java.util.Collections@sort(testList)}"   
/>  
 <s:iterator value="#testList" >
    <s:property  /> <br />
</s:iterator>

in struts.properties i have allow:
struts.ognl.allowStaticMethodAccess=true

Thanks for help


-----
Tomas Jurman
Czech Republic
-- 
View this message in context: http://www.nabble.com/call-Collections.sort-with-OGNL-tp19710687p19710687.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: call Collections.sort with OGNL

Posted by Dave Newton <ne...@yahoo.com>.
--- On Sun, 9/28/08, Kibo wrote:
> Hmm, interesting help
> Maybe, it would be better say that exists struts tag: sort
> http://struts.apache.org/2.x/docs/sort.html

Sure, if you want. IMO that kind of work belongs on the server side, but to each their own.

Dave


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


Re: call Collections.sort with OGNL

Posted by Kibo <to...@gmail.com>.
Hmm, interesting help
Maybe, it would be better say that exists struts tag: sort
http://struts.apache.org/2.x/docs/sort.html


though I thanks



newton.dave wrote:
> 
> --- On Sun, 9/28/08, Kibo wrote:
>> How can I call static method java.util.Collections.sort in OGNL?
>> 
>> I use this: (but it don´t work)
>> <s:set name="testList" 
>>        value="%{@java.util.Collections@sort(testList)}"
> 
> Does sort() return a value?
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 


-----
Tomas Jurman
Czech Republic
-- 
View this message in context: http://www.nabble.com/call-Collections.sort-with-OGNL-tp19710687p19712853.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: call Collections.sort with OGNL

Posted by Dave Newton <ne...@yahoo.com>.
--- On Sun, 9/28/08, Kibo wrote:
> How can I call static method java.util.Collections.sort in OGNL?
> 
> I use this: (but it don´t work)
> <s:set name="testList" 
>        value="%{@java.util.Collections@sort(testList)}"

Does sort() return a value?

Dave


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