You need to sign in to do that
Don't have an account?
Kirill Yunussov
How to duplicate a block of VF code with a one liner?
is there a way to put an ID or someting on a block of code, say a couple of buttons, and then insert them again somewhere else in the page using just one line of code?
something like this:
<apex:outputPanel id="buttons"> <apex:commandButton value="Process" action="{!process}"/> <apex:commandButton value="Reverse" action="{!reverse}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:outputPanel> .... <apex:render value="buttons"> <!-- this here would display the buttons block again -->
This helps you to create your own reusable components, which you can reference anywhere in your code.
More Info:
http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_compref_component.htm|StartTopic=Content%2Fpages_compref_component.htm|SkinName=webhelp
Regards,
Satish Kumar
Thanks for the response. From what I see, apex components have to be defined in a separate file. Is there a way to define a component on the same page where it's used?
Regards,
Satish Kumar