开发者

making primeFaces ajax call in dataTable

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 a开发者_运维百科n 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 update attribute does not start with :, it becomes relative to the ID of the current component inside the same NamingContainer component. But since the h:dataTable is an NamingContainer component, 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 its id attribute and use exactly that id in the update attribute, prefixed with :.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜