You need to sign in to do that
Don't have an account?
Paul Allsopp
New Developer: Button Object Instantiation
Problem: I want to create a row of, say 20, buttons dynamically using an Apex class.
How do I create a commandButton instance in a class and assign it the required properties?
Something along the lines of:
Any help is greatly appreciated.
Paul
How do I create a commandButton instance in a class and assign it the required properties?
Something along the lines of:
CommandButton cb = new CommandButton(); cb.value = "My button"; cb.action = "{!my_action}";As I said in the title, I am a complete novice in VF/Apex, but a seasoned developer in other languages.
Any help is greatly appreciated.
Paul
It seems obvious now...I was trying to serialize a list because I didn't want to iterate it, but in hindsight I shouldn't have even been using a list.
Loving Apex and VF...this is my first play with it
All Answers
However, I do get a new error:
System.SerializationException: Not Serializable: com/salesforce/api/fast/List$$lcom/salesforce/api/VisualForceComponent/Component/apex/commandbutton$$r
My compnent markup is thus
I'm guessing my reference to {!apex_buttons} cannot be like this
It seems obvious now...I was trying to serialize a list because I didn't want to iterate it, but in hindsight I shouldn't have even been using a list.
Loving Apex and VF...this is my first play with it