使用PostNewDocument事件的Xpages
我试图使用xpage的使用PostNewDocument事件的Xpages,xpages,xpages-ssjs,Xpages,Xpages Ssjs,我试图使用xpage的PostNewDocument事件向editBox添加一个值,考虑到我希望字段在打开时具有相应的值——使用特定的按钮 我尝试了两种方法:
PostNewDocument
事件向editBox添加一个值,考虑到我希望字段在打开时具有相应的值——使用特定的按钮
我尝试了两种方法:
<使用简单操作:
<xp:dominoDocument var="Contr" formName="(fmFormularCIP)">
<xp:this.postNewDocument>
<xp:setValue
binding="#{javascript:Contr.txt_codformularmain}">
<xp:this.value><![CDATA[#{javascript:"01"}]]></xp:this.value>
</xp:setValue>
</xp:this.postNewDocument>
</xp:dominoDocument>
(但字段仍然是“”)
打开xpage的按钮中的我的事件处理程序:
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="true">
<xp:this.action> <xp:openPage name="/doc.xsp" target="newDocument"></xp:openPage>
</xp:this.action>
</xp:eventHandler>
如何实现这一点?这是XPage的一个工作示例,它在postNewDocument事件中将值设置为编辑字段。打开Xpage后,该值在编辑字段中可见
如果url具有类似于…&codvalue=01
的codvalue参数,则可以通过param.codvalue
从url或从类似于sessionScope.codvalue
的范围变量设置值本身
确保调用此XPages时不带url参数
?action=openDocument
或?action=editDocument
,因为这样就不会执行postNewDocument事件。我使用?action=newDocument。这是一个问题吗??action=newDocument
很好。打开xpage的按钮中的我的事件处理程序:我的xpage数据:当xpage为空时,inputText仍然为null。
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="true">
<xp:this.action> <xp:openPage name="/doc.xsp" target="newDocument"></xp:openPage>
</xp:this.action>
</xp:eventHandler>