myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Kurz <>
Subject Re: el expression
Date Wed, 10 Feb 2010 08:33:56 GMT

it is true that it is not possible to use method parameters or to call 
methods of an object that are no getters or setters (at least before 
Java EE 6).

But there are ways to bypass this limitation:

* If you only want to call a method in an EL expression you could define 
an EL function (possible with JSP and Facelets).

* If you want to pass a parameter to an action method you could use an 
alternative EL implementation like JBoss EL (see [1]). For this you have 
to include the JBoss EL libraries and replace the expression factory of 
MyFaces like this in your web.xml:

   <!-- Replace ExpressionFactory for Apache MyFaces -->



Am 10.02.2010 09:20, schrieb Martin Monshausen:
> Hi,
> calling methods with parameters is not possible in JSF as far as I know. Try to set Parameter
in Bean before calling the method and then refer to it in your parameter-less method.
> Yours,
> Martin
> ________________________________
> Von: Krishna K. Pandit []
> Gesendet: Mi 10.02.2010 06:14
> An: MyFaces Discussion
> Betreff: el expression
> Hi all
> Can any one can help me how to pass a parameter to a method while
> calling it in EL expression.
> Im trying this
> "#{myBean.method('JAVA')}
> But I m getting errors while rendering.
> Thanks
> Krishna Pandit
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify the sender by email
> reply and delete it from your system.
> The integrity and security of this email cannot be guaranteed on the Internet.

View raw message