XPages และการรีเฟรชบางส่วนที่ถูกล่ามโซ่

ฉันต้องการทำการรีเฟรชบางส่วนบนพาเนลที่สอง หลังจากการรีเฟรชบางส่วนครั้งแรกเสร็จสิ้นแล้ว นี่คือรหัสของฉันจากแหล่งที่มา:

<xp:comboBox id="comboBox3" value="#{document1.Company}">
<xp:selectItem itemLabel="Select a Company" itemValue="Select a Company">
</xp:selectItem>
<xp:selectItems>
<xp:this.value><![CDATA[#{javascript:var db = sessionScope.serverPath + "!!" + sessionScope.dbName; @Trim(@Unique(@DbColumn(db, "vwTblCompany",1)));}]]></xp:this.value>
</xp:selectItems>
<xp:eventHandler event="onclick" submit="true"
                        refreshMode="partial" refreshId="pnlLocation">
</xp:eventHandler>
<xp:eventHandler event="onchange" submit="true" refreshMode="partial" disableValidators="true" refreshId="pnlLocation">
<xp:this.action><![CDATA[#{javascript:getComponent("comboBox4").setValue("Select a Location");}]]></xp:this.action>
</xp:eventHandler>
<xp:eventHandler>
<xp:this.onComplete><![CDATA[function() {
XSP.partialRefreshGet("#{id:pnlApprovalInfo}");
}]]></xp:this.onComplete>
</xp:eventHandler>
</xp:comboBox>

ข้อผิดพลาดที่ฉันได้รับเมื่อคลิกที่ช่องคำหลักคือ:

เกิดข้อผิดพลาดขณะอัปเดตบางเพจ ไม่สามารถอ่านคุณสมบัติ 'การเรียก' ที่เป็นโมฆะได้

ใครสามารถแสดงให้ฉันเห็นว่าฉันทำอะไรผิด?

ขอบคุณ,

แดน


person Dan Soares    schedule 26.01.2016    source แหล่งที่มา


คำตอบ (1)


ช่างเถอะ. ฉันรู้วิธีการทำ:

<xp:comboBox id="comboBox3" value="#{document1.Company}">
<xp:selectItem itemLabel="Select a Company" itemValue="Select a Company">
</xp:selectItem>
<xp:selectItems>
<xp:this.value><![CDATA[#{javascript:var db = sessionScope.serverPath + "!!" + sessionScope.dbName; @Trim(@Unique(@DbColumn(db, "vwTblCompany",1)));}]]>  
</xp:this.value>
</xp:selectItems>
<xp:eventHandler event="onclick" submit="true"
                    refreshMode="partial" refreshId="pnlLocation">
<xp:this.onComplete><![CDATA[XSP.partialRefreshGet("#{id:pnlApprovalInfo}")]]></xp:this.onComplete>
</xp:eventHandler>
person Dan Soares    schedule 26.01.2016
comment
ฉันขอแนะนำให้ใช้ setTimeout ในโค้ด onComplete เพื่อให้กระบวนการ XSP ก่อนหน้าเสร็จสมบูรณ์ก่อนที่กระบวนการใหม่จะเริ่มต้น: เช่น: setTimeout(function(){XPS.partialRefreshGet(...)}, 1); - person Newbs; 27.01.2016
comment
ขอบคุณเฮนรี่ ขอขอบคุณคำแนะนำ - person Dan Soares; 27.01.2016