JSF actionListner not called after some time

160 views Asked by At

I've got a modalPanel with some components (for example, a tree). At fisrt my actions and actionListners work correclty. After some time (from 5 to 10 minutes) actions stop working completely. The post is fired, but the AjaxViewRoot actions are empty. I have no validation errors. All the page component ids are fixed (not generated) to prevent conversion error. My bean is Conversation scoped and its timeout is over 30 minutes.

    <rich:modalPanel id="modalId" resizeable="false" autosized="true">
        <a4j:include id="myPage" viewId="#{bean.viewId}"/>
    </rich:modalPanel>

Here is myPage (included page) code:

<ui:composition>
<h:form id="frmPage">  
    <h:panelGrid columns="1">
    <a4j:region id="treeRegion">
    <rich:panel id="tbPanelTrees">

      <h:panelGrid columns="2" >
        <h:panelGroup layout="block" style="height:#{(height-150)/2}px; width:#{(width-20)/2}px; overflow:visible; overflow-y:auto; overflow-x:auto;">
           <rich:tree id="subjectTree"
                       style=" height: 100%" 
                       switchType="ajax" 
                       var="item" 
                       nodeFace="#{item.nodeType}"
                       value="#{bean.subjTree.rootSubjectsTree}"
                       adviseNodeOpened="#{bean.subjTree.adviseNodeOpened}"                                                                
                       changeExpandListener="#{bean.subjTree.changeExpandListener}"
                       nodeSelectListener="#{bean.subjTree.nodeSelectListener}"
                       ajaxSubmitSelection="true"
                       reRender="elements outside region"
                       ajaxSingle="true"
                       ignoreDupResponses="true">
                <rich:treeNode type="root" icon="#{item.subjectsIcon}" iconLeaf="#{item.subjectsIcon}" id="subjectRootNode">
                    <a4j:commandLink value="#{item.nodeName}" id="subjectRootNodeLink"/>                    
                </rich:treeNode>
                <rich:treeNode type="user" icon="#{item.userIcon}" iconLeaf="#item.userIcon}" id="userNode">
                      <a4j:commandLink value="#{item.nodeName}" id="userNodeLink"/>                 
                </rich:treeNode>

            </rich:tree>                
        </h:panelGroup>
    </a4j:region>   
    </h:panel:Grid>
</h:form>           
</ui:composition>

Does anybody have an idea, what's the problem?

1

There are 1 answers

0
Ermintar On BEST ANSWER

Finally found a solution. Some of my components didn't have a defined id and had a generated one (like myForm:j1456546). Another part of the page send a polling request (to show some news), which send a DOM-tree to the server for validation. The generated ids where changed on server-side, but remained the same on client side (because the polling didn't rerender anything apart from news panel). So when user clicked the button (or fired any other ajax-action), the button ids on the client and server-side where different and action was not invoked. Solution: manualy define all of your ids.