Binding output panel not getting displayed

UI Components for JSF
Post Reply
pacharu
Posts: 2
Joined: 08 Feb 2012, 17:20

10 Feb 2012, 22:42

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?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests