JSF: Avoid nested update calls

Posted by dhroove on Stack Overflow See other posts from Stack Overflow or by dhroove
Published on 2012-06-17T15:14:26Z Indexed on 2012/06/17 15:16 UTC
Read the original article Hit count: 265

Filed under:
|
|
|

I don't know if I am on right track or not still asking this question.

I my JSF project I have this tree structure:

 <p:tree id="resourcesTree" value="#{someBean.root}" var="node" selectionMode="single" styleClass="no-border"
    selection="#{someBean.selectedNode}" dynamic="true">
    <p:ajax listener="#{someBean.onNodeSelect}" update=":centerPanel :tableForm :tabForm" event="select" onstart="statusDialog.show();"
        oncomplete="statusDialog.hide();" />
    <p:treeNode id="resourcesTreeNode" >
        <h:outputText value="#{node}" id="lblNode" />
    </p:treeNode>
</p:tree>

I have to update this tree after I added something or delete something.. But whenever I update this still its nested update also call I mean to say it also call to update these components ":centerPanel :tableForm :tabForm"...

This give me error that :tableForm not found in view because this forms load in my central panel and this tree is in my right panel.. So when I am doing some operation on tree is it not always that :tableForm is in my central panel.. (I mean design is something like this only)

So now my question is that can I put some condition or there is any way so that I can specify when to update nested components also and when not.... In nut shell is there any way to update only :resoucesTree is such a way that nested updates are not called so that I can avoid error...

Thanks in advance.

© Stack Overflow or respective owner

Related posts about jsf

Related posts about java-ee