You need to sign in to do that
Don't have an account?
Paul Allsopp
Set commandButton action in code
I have a code component that dynamically creates a series of buttons based on a range of values, so just to be clear, NOT apex markup!
Everything works fine, but I need to add an action to the buttons and this is where I am having issue. In apex markup I would add a actionSupport tag to point back to a custom controller method, however, how is this achieved in code?
Any help is greatly appreciated.
Paul
Everything works fine, but I need to add an action to the buttons and this is where I am having issue. In apex markup I would add a actionSupport tag to point back to a custom controller method, however, how is this achieved in code?
ApexPages.Action ap_action = new ApexPages.Action([what goes here?]) my_button.action = ap_action; // this will fail once the page is rendered
Any help is greatly appreciated.
Paul
Which seems odd to me, because I am creating an action, and assigning it to a property of an object, and the type for that property is an ApexPages.Action.
Here is my actual code:
And in my controller:
Any thoughts on what is wrong here?
Paul