خرید بک لینک

Vote count: 0

In a Parent jsp I have <ag:commandLink/> and <a4j:commandLink/> below is the code:

<ag:commandLink id="previewLink" 
                value="Preview Template"
                action="#{inquiryMBean.generatePreviewAction}"
                actionListener="#{inquiryMBean.onTemplateEdit}"/>

<a4j:commandLink id="requestResponseView"
                 value="#{msg.admin_inq_choose_response_to_send}"
                 action="#{inquiryMBean.resetResponseList}"
                 oncomplete="openViewReqResLookUp();/>

When I clicks on <ag:commandLink/> Preview Template operation is Successful and I am getting the expected result.

When I Clicks on <a4j:commandLink/> a look-up is getting opened.

In that look-up, I have <ag:button/> onclick of that a JS function populateData() method is getting called and within JS function <a4j:commandButton/> is getting clicked.

Here is the Button code :

<ag:button id="addResponseOkBottom" 
           value="#{msg.admin_inq_re_res_ok}"
           onclick="populateData();"/>

Here is the <a4j:commandButton/> Code:

 <a4j:commandButton id="addResponse" 
                    value="#{msg.admin_inq_re_res_ok}" 
                    style="display:none;" 
                    action="#{inquiryMBean.selectedReqResListFromLookup}"/>

JS Function:

function populateData(){
    var addList="";
    var list = document.getElementById('viewPrimaryRequestResponseLookup:primaryReqResDatatable');
    for (var j = 0; j < list.rows.length; j++) {
        //Doing some thing !!!!!!!
    }
    if (addList == ''){
        alert("Please select atleast one record to proceed.");
        retu false;
    }else{
        document.getElementById('viewPrimaryRequestResponseLookup:addResponse').click();
    }   
}

Problem: When <a4j:commandButton/> getting clicked in the look-up

Error Dialog :View State Couldn't be Stored- reload Page ?


Note:

  • If I directly clicks on <a4j:commandLink id="requestResponseView"/> in parent page to open lookup then Not getting any Error dialog.
  • I am using JSF1.2
  • The Error:View State Couldn't be Stored- reload Page ? dialog getting only when I clicks first <ag:commandLink id="previewLink"/> then <a4j:commandLink id="requestResponseView"/> in Parent jsp page.

  • In server console I am not getting any exception before the dialog error.

Question:

  1. What may be the cause of the error ?
  2. What are the possible causes of View State Couldn't be Stored- reload Page ?
asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 28 خرداد 1395 ساعت: 19:46

صفحه بندی