I am pretty new to JSF. I have a requirement which needs contents on my page to get displayed dynamically. Some times it may be multiple input texts / sometimes it can be a datatable / sometimes it can be a select box based on the condition. I am trying to bind output panel using the following code:
Code: Select all
<p:outputPanel id="dataId"
binding="#{controller.sampleData}">
</p:outputPanel>
In the backing bean I am adding HtmlInputText to the panel:
Code: Select all
sampleData= new OutputPanel();
HtmlInputText input = new HtmlInputText();
input.setLabel("sample text");
input.setValue("sample value");
sampleData.getChildren().add(input);
But the outputpanel which is created in the backing bean is not getting rendered. Can any one tell me if the binding I did was wrong? I am not quite sure if this is the correct approach that I am following to achieve the requirement. Can anyone guide me?