Why did you want to do this in a el function? Why not a action method?

Can you describe your usecase?

Regards,
 Volker

2007/1/23, lightbulb432 <[EMAIL PROTECTED]>:

Now where would I use that function? I created a function and tried using it
as the value of h:commandButton's action attribute (because I want it to be
executed when that form is submitted), but I receive an error:

Not a Valid Method Expression: #{prefix:add(collection,value)}




David Delbecq wrote:
>
> If you are using facelets, you can easily create additional EL function
> that you can call to add to your collections and end with something like
> #{add(collection,value)}
>
> En l'instant précis du 01/19/07 17:34, lightbulb432 s'exprimait en ces
> termes:
>> If it's not something that's possible (though I hope it is) could some of
>> you
>> please describe how you deal with such common cases of Collection
>> manipulation from JSF form field values?
>>
>>
>>
>> lightbulb432 wrote:
>>
>>> Can I add/remove an input field value to a collection using EL? e.g.
>>> "#{myBean.myCollection.add/remove}" or something like that? I'd hate to
>>> have to create a special backing bean method for this when it's such a
>>> simple and common thing that I'd have to do for so many collections.
>>>
>>> I could create a special tag or component, but I wouldn't even know
>>> where
>>> to begin...that's why it'd be really great if somebody has created this
>>> functionality already (preferrably part of JSF).
>>>
>>>
>>
>>
>
>
>

--
View this message in context: 
http://www.nabble.com/Add-to-and-remove-from-collection-tf3035146.html#a8514856
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Reply via email to