2014-11-17 37 views
0

我有一個帶有一些組件的模塊面板(例如,一棵樹)。在我的行動和actionListners工作corretity。一段時間後(從5到10分鐘),行動完全停止。該帖子被觸發,但AjaxViewRoot操作爲空。我沒有驗證錯誤。 所有頁面組件id都是固定的(不生成)以防止轉換錯誤。 我的bean是Conversation作用域,超時時間超過30分鐘。JSF actionListner在一段時間後不會調用

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

這裏是我的空間(包括頁)代碼:

<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> 

沒有任何人有一個想法,有什麼問題呢?

+0

您是否檢查過您的JavaScript控制檯上的網絡選項卡以獲取任何錯誤消息?你正在運行什麼版本的射頻? – kolossus

+0

@kolossus,我在firebug中檢查過我的js concole。沒有錯誤。我的RF版本是3.3.1。 – Ermintar

回答

0

終於找到了解決辦法。我的一些組件沒有定義的id,並生成了一個(如myForm:j1456546)。 頁面的另一部分發送輪詢請求(顯示一些消息),它將一個DOM樹發送到服務器進行驗證。生成的id在服務器端更改,但在客戶端保持不變(因爲輪詢不會從新聞面板中重新顯示任何內容)。因此,當用戶點擊按鈕(或觸發了其他任何ajax動作)時,客戶端和服務器端的按鈕標識符不會被調用,並且不同的動作也會被調用。 解決方案:手動定義您的所有ID。

相關問題