-2

<xp:comboBox id="txtRequestType" style="width:290px" required="true" defaultValue="Select One">

                        <xp:selectItem itemLabel="Select One" id="selectItem21">
                        </xp:selectItem>




                        <xp:selectItems>
                            <xp:this.value><![CDATA[#{javascript:return @DbColumn("","vwAdminRateTypes",1);}]]></xp:this.value>
                        </xp:selectItems>

                        </xp:comboBox>
<xp:br></xp:br>
<xp:comboBox id="txtRateType" style="width:290px" required="true" defaultValue="Select One">
                                <xp:selectItem itemLabel="Select One">
                                </xp:selectItem>
                                <xp:selectItems id="selectItems10">
                                    <xp:this.value><![CDATA[#{javascript:var key=getComponent("txtRequestType").getValue();
@DbLookup("","vwAdminRateTypes",key ,2);}]]></xp:this.value>
                                </xp:selectItems>




                            </xp:comboBox><xp:br></xp:br>
<xp:panel>
    <xp:label value="New Money" id="label1">
        <xp:this.rendered><![CDATA[#{javascript:return getComponent("txtRequestType").getValue() == "New Money";}]]></xp:this.rendered>
    </xp:label></xp:panel>
<xp:button value="Refresh" id="button1">
    <xp:eventHandler event="onclick" submit="false">
        <xp:this.script><![CDATA[XSP.partialRefreshGet("#{id:txtRateType}", {
   onComplete: function() {
XSP.partialRefreshGet("#{id:panel1}", {
    onComplete: function() {
        XSP.partialRefreshGet("#{id:computedField1}", {});
       }
   });
 }
 });]]
              ></xp:this.script>
    </xp:eventHandler>
</xp:button>
4

1 に答える 1

3

XSP.partialRefreshGetXSP.partialRefreshPostに変更します。これにより、JSFライフサイクルが正しく呼び出され、コンポーネントの値が更新されます。

<xp:eventHandler event="onclick" submit="false">
   <xp:this.script><![CDATA[
      XSP.partialRefreshPost("#{id:txtRateType}", {
         onComplete: function() {
            XSP.partialRefreshGet("#{id:panel1}", {
               onComplete: function() {
                  XSP.partialRefreshGet("#{id:computedField1}", {});
               }
         });
      }
   });]]></xp:this.script>
</xp:eventHandler>
于 2012-11-07T21:58:33.443 に答える