I have several buttons, and I want each of of them to pass an attribute to the backing bean. How do I do this? I googled it several times, but I always get answers in completely different contexts... Is this not possible?
I have read that I can't pass <f:param> with command buttons. Is this true? All I need to pass is a string.
Hi Peter, sure you can pass parameters for your UI to your bean, and you can do it for different ways, but you can use a <f:param> or <f:attribute>, If you use the f:param in a commandButton or commandLink the value of the param is turned into a request parameter. When you use f:attribute you're attaching this attribute to the map of attributes of the component, I give you an example of how to use it.
An the method listener for the action event.
I hope this help you with your question
When a dream is ending because to come true - OCPJP 6,7. OCE JPA EE6. MCTS
Joined: Oct 18, 2010
Many thanks, mate!
subject: Passing attributes with <ice:commandButton>