You need to sign in to do that
Don't have an account?
Dynamic components, command buttons and parameters
I am adding a few command buttons dynamically by using the
<apex:dynamicComponent/>
For each command button's controller action, I want to pass in a parameter value so that I know which button has been pressed. Each command button needs to have a different parameter value associated with it.
The use case is:
I want to display list of items a user can purchase. Each is a button. When the user clicks on the button, I need to have an item id associated with that item. These items are not regular Salesforce entities and are populated from a remote web-service call.
All the examples I have seen so far are simple and deal with only 1 button and on static Apex pages. None show how to pass a parameter to the controller action from a commandButton that is created dynamically.
How can I do this?