• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

f:ajax not rendering the component ids in ui:include page

srinath srinat
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


<h:form id="myform1" prependId="false">
<p:panel id="myfields" header="Company Details" toggleable="true" toggleOrientation="vertical" toggleTitle="Company Details" toggleSpeed="100" style="font-size:10pt;">

<p:fieldset id="myField" style="border:0;" rendered="#{companybean.form1}">
<ui:include src="companyForm1.xhtml" ></ui:include>

<p:fieldset id="myField1" style="border:0;" rendered="#{companybean.form2}">
<ui:include src="companyForm2.xhtml" ></ui:include>

<p:fieldset id="myField2" style="border:0;" rendered="#{companybean.form3}">
<ui:include src="companyForm3.xhtml" ></ui:include>

<p:fieldset id="myField3" style="border:0;" rendered="#{companybean.form4}">
<ui:include src="companyForm4.xhtml" ></ui:include>




Above shown is my code.... when first time this page is loaded companyForm1.xhtml will be loaded and i have a ok button in this page.on click of ok please find below code

<h:commandButton id="commandBtn" value="Ok" style="width: auto; height: 20px;font-size:7pt;" actionListener="#{companybean.refresh}" >
<f:ajax render="@all" execute="@this" ></f:ajax>

in the refersh method i set boolean attribute form1 to false and form2 to true...so companyForm2.xhtml will be loaded now...it is working..but my problem is when this happens the ids of the components in companyForm2.xhtml is not present when i check in view source.I observed one thing if i remove the ajax call then it is generated....Can anyone help me wid this...i want a ajax call
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic