You need to sign in to do that
Don't have an account?

How to Display Values from Ajax toolkit script to Visualforce Components?
Hi all,
I retrived some values from Account object using Ajax toolkit scripts. so i able to display those values only the HTML controls like <div>, <b>. but i need to display those values in Visualforce components like datatable or datalist. Is this possible in ajax toolkit.
Thanks in advance
You can style the elements yourself so that they look and feel like normal components. Alternatively, you can assign an ID to the element and use that ID to pick up the element and modify it. Use $Component to reference the element. Required attributes will still be required to render the element, so you may need a "dummy" function to populate the table or list with an initially blank value.
For example:
The real question may be... why would you go through this much trouble? It would seem to me that you could just push the data in to the dataTable directly and save the hassle of this design. You can even use server event-generating tags (such as commandButton and actionFunction) to re-render (using the reRender attribute) to perform the same function with nearly the same efficiency. Alternatively, you could use @RemoteAction to acheive the same results with less code.