You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Pratt <th...@gmail.com> on 2008/01/18 21:09:20 UTC

OGNL Functions

Is there an OGNL Equivalent to the JSP EL Function?

I'd like to be able to do something like:

<s:textfield name="year" value="%{v:year(user.birthDate)}"/>

but it doesn't seem to work.  Thanks.
  (*Chris*)

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


Re: OGNL Functions

Posted by Chris Pratt <th...@gmail.com>.
On Jan 18, 2008 1:40 PM, Dave Newton <ne...@yahoo.com> wrote:
>
> --- Chris Pratt <th...@gmail.com> wrote:
> > Is there an OGNL Equivalent to the JSP EL Function?
> >
> > I'd like to be able to do something like:
> >
> > <s:textfield name="year" value="%{v:year(user.birthDate)}"/>
> >
> > but it doesn't seem to work.  Thanks.
>
> Do you mean calling static functions? If so, that's easy.
>
> http://struts.apache.org/2.x/docs/ognl-basics.html
>
> If not, I'm not sure what you mean.
>

Wow, that's some ugly syntax, but it should work.  Thanks.
  (*Chris*)

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


Re: OGNL Functions

Posted by Dave Newton <ne...@yahoo.com>.
--- Chris Pratt <th...@gmail.com> wrote:
> Is there an OGNL Equivalent to the JSP EL Function?
> 
> I'd like to be able to do something like:
> 
> <s:textfield name="year" value="%{v:year(user.birthDate)}"/>
> 
> but it doesn't seem to work.  Thanks.

Do you mean calling static functions? If so, that's easy.

http://struts.apache.org/2.x/docs/ognl-basics.html

If not, I'm not sure what you mean.

d.


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