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.