How to render JSF controls dynamically using AJAX
Posted on 2009-04-20
I am new to JAVA and JSF. I am recently started doing a web project. First we started using plain JSP and servlets and now we are going to use JSF.
Now I am facing one problem with JSF. In a JSP page, I am having a combobox and a div and when i am selecting a value from the combo box, the div should be filled with some controls(like text boxes and comboboxes, buttons, etc) according to the selection.
Now for JSF, I have modified my XML file by adding JSF controls, and it inturn returns the corresponding string having JSF controls easily, but i could not set it directly to div's innerHTML as the String contains JSF controls (Moreover, these JSF controls are linked with JAVA beans).
Is there any provision to add JSF controls to a running page dynamically and is there any provision to convert the above mentioned string of JSF controls to normal HTML controls, like the JSF taglibraries doing.??