我有一个 xpage,我在其中添加了一个按钮。该按钮有一个操作组和其他操作。
出于某种原因,该事件在页面加载时触发。我没有任何页面加载事件。按钮是核心控件,而不是dojo 按钮。
<xp:button id="button1" value="Approve Receiving Sheet"
    style="font-family:Arial;font-size:9pt;font-style:italic;width:180.0px"
    styleClass="button1">
<xp:eventHandler event="onclick" submit="true"  refreshMode="complete"     
     immediate="false" save="true"><xp:this.action><xp:actionGroup> 
<xp:this.condition>
 <![CDATA[#{javascript:var lookup = document1.getDocument().getUniversalID()
 var checkInvoices:string
 checkInvoices = @DbLookup("", "(Invoices by RS UNID)", lookup, 2)
 var returnValue = @If(@Implode(checkInvoices) == "", false, true)
 if(returnValue == false)
 {
    var x="alert('msg to user');"
    view.postScript(x)  
    return false
 }
 return true}]]></xp:this.condition><xp:confirm>
其他操作遵循条件操作。将按钮从按钮更改为提交不会做任何事情。后记消息显示为真或假,这就是我将其移至 if 语句的原因。在此先感谢,史蒂夫