You need to sign in to do that
Don't have an account?
Kodan Hunt
How to add a section dynamically in visualforce page after the page rendered?
Hi,
I would like to add a section dynamically after the page is rendered. Say like if I click a button in the page it should repeat a section which is already present in the same visualforce page. Can someone give me any idea about how to do this so??
Thanks.
There's a number of ways that you can do this - e.g. having a list of sections and adding an entry to it when the user clicks the button, or having the section conditionally rendered.
I wrote a blog post on the former ("add more" functionality) at:
http://bobbuzzard.blogspot.com/2011/01/uploading-multiple-attachments-via.html
which you may be able to adapt.
If you decide to go the conditionally rendered route, you might want to read another of my blog entries which gives an example of this and also highlights one of the pitfalls:
http://bobbuzzard.blogspot.com/2011/02/visualforce-re-rendering-woes.html