I am using JSF 2 with PrimeFaces 2.2. I tried making an ajax call through a select box onchange event in a dataTable. I was able to see the System.outs printing but, I could not see the components given in the update attribute getting updated. I have given the dataTableId in the update attribute.
I guess the problem now is the selectbox is getting populated again and an ajax call is made. Should we give only the parent tags in the update attirbute, for the ajax call to work. Please help me out in this.
When the ID in the
updateattribute does not start with:, it becomes relative to the ID of the current component inside the sameNamingContainercomponent. But since theh:dataTableis anNamingContainercomponent, you need to reference it by an absolute ID. Rightclick the JSF page in the webbrowser and choose View Source to see the generated HTML DOM tree. Locate the HTML<table>element which is generated by the<h:dataTable>, determine the value of itsidattribute and use exactly that id in theupdateattribute, prefixed with:.