You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by hadf <ha...@gmail.com> on 2011/08/31 17:36:26 UTC
How to pass parameters to an EL function
Hi,
I try to pass parameters to an EL function.
I read this wiki : http://wiki.apache.org/myfaces/Parameters_In_EL_Functions
I tried the second solution, that is to say the Map solution.
So I implemented a Map and overrided the get() method, but this method is
never called, I have a javax.el.MethodNotFoundException. Method not found:
{}.etape1()
Here is the callee : #{studentController.sequenceMapper[sequence]}
The sequence variable is an enum. Its value is SequenceEtapeEnum.etape1.
The Exception is thrown as if the expression
"#{studentController.sequenceMapper[sequence]}" was interpreted as
"#{studentController.sequenceMapper.sequence}" unless the method
getSequenceMapper() returns a map.
Thank you for your help
--
View this message in context: http://old.nabble.com/How-to-pass-parameters-to-an-EL-function-tp32373148p32373148.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: How to pass parameters to an EL function
Posted by hadf <ha...@gmail.com>.
I found a solution. Maybe this can help someone.
Instead of passing parameter to the function in the expression, I used the
tag <f:setPropertyActionListener> to set an attribute.
hadf wrote:
>
> I use the version 2.0.3 of myfaces.
>
>
> hadf wrote:
>>
>> Hi,
>>
>> I try to pass parameters to an EL function.
>>
>> I read this wiki :
>> http://wiki.apache.org/myfaces/Parameters_In_EL_Functions
>>
>> I tried the second solution, that is to say the Map solution.
>>
>> So I implemented a Map and overrided the get() method, but this method is
>> never called, I have a javax.el.MethodNotFoundException. Method not
>> found: {}.etape1()
>>
>> Here is the callee : #{studentController.sequenceMapper[sequence]}
>> The sequence variable is an enum. Its value is SequenceEtapeEnum.etape1.
>>
>> The Exception is thrown as if the expression
>> "#{studentController.sequenceMapper[sequence]}" was interpreted as
>> "#{studentController.sequenceMapper.sequence}" unless the method
>> getSequenceMapper() returns a map.
>>
>> Thank you for your help
>>
>
>
--
View this message in context: http://old.nabble.com/How-to-pass-parameters-to-an-EL-function-tp32373148p32378369.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: How to pass parameters to an EL function
Posted by hadf <ha...@gmail.com>.
I use the version 2.0.3 of myfaces.
hadf wrote:
>
> Hi,
>
> I try to pass parameters to an EL function.
>
> I read this wiki :
> http://wiki.apache.org/myfaces/Parameters_In_EL_Functions
>
> I tried the second solution, that is to say the Map solution.
>
> So I implemented a Map and overrided the get() method, but this method is
> never called, I have a javax.el.MethodNotFoundException. Method not found:
> {}.etape1()
>
> Here is the callee : #{studentController.sequenceMapper[sequence]}
> The sequence variable is an enum. Its value is SequenceEtapeEnum.etape1.
>
> The Exception is thrown as if the expression
> "#{studentController.sequenceMapper[sequence]}" was interpreted as
> "#{studentController.sequenceMapper.sequence}" unless the method
> getSequenceMapper() returns a map.
>
> Thank you for your help
>
--
View this message in context: http://old.nabble.com/How-to-pass-parameters-to-an-EL-function-tp32373148p32373166.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.