This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line! See this thread for details.
My requirment is that i have to create a dynamic datatable and which contains listing of Questions and its respectives Answer. These questions and answer come from the server and along with the answer i also get the answer type , which tells what is the type of the UIComponent that is associated with the answer say input text,select many,select one etc., so i have to dynamically create these UIComponent inside the datable based on the answer type. Actually i'm having the logic to create the components which is based on the answer type which comes from the backend and this answer type define what kind type of component(component for single answers/component for multiple answer,input and other types) needs to be created.(this will be done in the if-else block)
My problem is that im not able to create this componets dynamically in the data table. In the code below , i have binded the datatable and in the java method i 'm trying to create the ui components(as of now im creating it without the creation logic of answer type). The idea was to just try and see whether the components are created and is getting added to the datable.
when i run this code im getting no output.
Please suggest me where im going wrong and what is the correct approach.