2012-11-12 2 views
5

저는 JSF 응용 프로그램에서 p : remoteCommand를 사용합니다. 나는 7 가지 p : remoteCommand가 빈에서 다른 액션을 호출한다고 선언했다. 버튼을 클릭하면이 7 개의 원격 명령이 동시에 호출됩니다. JS 함수가 호출되었지만 언젠가 서버에 대한 요청이 실행되고 있지 않으며 이는 IE에서만 발생합니다. 나는 IE 8에서만 테스트했다.xhr = error, status = Unknown, error = undefined라는 오류가 AJAX에서 반환되는 오류를 확인하려고했다.Primefaces p : remotecommand가 IE 8에서 작동하지 않습니다.

내 기능과 페이지 :

function loadResult() { 
    loadSmry(); 
    load1(); 
    load2(); 
    load3(); 
    load4(); 
    load5(); 
    load6(); 
} 

<p:remoteCommand id="loadId" 
       name="loadSmry" 
       async="true" 
       action="#{designBean.saveSmry}" 
       process="@this" 
       onsuccess="summaryCount=0;" 
       onerror="handleXhrError(xhr, status, error)" 
       update="logId"/> 

<p:remoteCommand id="loadId1" 
       name="load1" 
       async="true" 
       action="#{designBean.showChrt1}" 
       onstart="showAjaxLoader('begin',1)" 
       oncomplete="showAjaxLoader('success',1)" 
       onerror="handleXhrError(xhr, status, error)" 
       process="@this"      
       update="chart1" /> 

<p:remoteCommand id="loadId2" 
       name="load2" 
       async="true" 
       action="#{designBean.showChrt2}" 
       onstart="showAjaxLoaderForSummary('begin',2)" 
       oncomplete="showAjaxLoader('success',2)" 
       onerror="handleXhrError(xhr, status, error)" 
       process="@this"      
       update="chart2" /> 


<p:remoteCommand id="loadId3" 
       name="load3" 
       async="true" 
       action="#{designBean.showChrt3}" 
       onstart="showAjaxLoader('begin',3)" 
       oncomplete="showAjaxLoader('success',3)" 
       onerror="handleXhrError(xhr, status, error)" 
       process="@this"      
       update="chart3" /> 


<p:remoteCommand id="loadId4" 
       name="load4" 
       async="true" 
       action="#{designBean.showChrt4}" 
       onstart="showAjaxLoader('begin',4)" 
       oncomplete="showAjaxLoader('success',4)" 
       onerror="handleXhrError(xhr, status, error)" 
       process="@this"      
       update="chart4" /> 


<p:remoteCommand id="loadId5" 
       name="load5" 
       async="true" 
       action="#{designBean.showChrt5}" 
       onstart="showAjaxLoader('begin',5)" 
       oncomplete="showAjaxLoader('success',5)" 
       onerror="handleXhrError(xhr, status, error)" 
       process="@this"      
       update="chart5a chart5b" /> 

<p:remoteCommand id="loadId6" 
       name="load6" 
       async="true" 
       action="#{designBean.showChrt6}" 
       onstart="showAjaxLoader('begin',6)" 
       oncomplete="showAjaxLoader('success',6)" 
       onerror="handleXhrError(xhr, status, error)" 
       process="@this"      
       update="chart6" /> 
+0

중첩 된 양식을 사용할 수 있습니까? – Daniel

+0

@Daniel 중첩 된 양식이 없음 – user1817436

+0

왜 이러한 ID입니까? 차트 5a 차트 5b; 아마; chart5a chart5b; (공백없이) 명령을 제거하면 문제가있는 것을 볼 수 있습니다. – Daniel

답변

0

난 당신이 모든 원격 명령에 async="true"를 사용하고 있는지 볼 수 있습니다 remoteCommand는 다음과 같다. 빈의 유형에 따라 문제가 될 수 있습니다. 이러한 명령을 비동기 적으로 실행하려고합니다. 이것이 절대적으로 필요한 경우 대답 할 수도 있지만 async="true"async="false"으로 변경하십시오. 이것이 귀하의 문제를 해결할 가능성이 매우 높습니다.

이 문제

또한 primefaces forum에보고 된이뿐만 아니라 도움을 주었다.

관련 문제