tags:

views:

63

answers:

1

I am trying to create a custom component that recieves a link and adds style class.

In the original link, that the user may have f:setPropertyActionListener more than once.

I don't want to create propertyActionListenerValue1 and propertyActionListenerTarget1 propertyActionListenerValue2 propertyActionListenerTarget2 etc for each one.

How can I recieve it in something like actionProperties="name:Daniel,surname:Smith" where name and surname represent name and Daniel and Smith represent value and in my composite element I will be able to send it as
<f:setPropertyActionListener value="name" target="Daniel" /> for each of them?

It can be that the user will send an object as name, and not only a String

+1  A: 

In JSF 2.0 you can use the recent EL (2.2), which allows you to pass arguments to methods. I.e.

 action="bean.method('value2', 'value2')"

So no need of action listeners.

Bozho
thanks, but in my commandLink I don't have any action, only sets propeties values.How can I sets the all values at once ?
Rivki