我与事件处理程序一个简单的按钮:XPages中设定值的动作之前字段=新建文档
Call doc_new.ReplaceItemValue("txt_codformularmain","01")
....
....
Set uidoc = w.EditDocument (True, doc_new)
:
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xp:openPage target="newDocument" name="/doc.xsp"></xp:openPage>
</xp:this.action>
</xp:eventHandler>
在lotusScript
我将值添加到一个场,构成形式,在使用前
我试图在postNewDocument
事件的doc.xsp
<xp:this.data>
<xp:dominoDocument var="Contr" formName="(fmFormularCIP)">
<xp:this.postNewDocument><![CDATA[#{javascript:Contr.replaceItemValue("txt_codformularmain", "01")}]]></xp:this.postNewDocument></xp:dominoDocument>
</xp:this.data>
我不希望每次创建该文档的值时,比如说,01
,但只有当文档。由特定的按钮组成。其他一些按钮将有机会为该字段添加02
值,依此类推。
我如何在XPages开发实现这一目标?谢谢你的时间。
它可以是“0”以及价值。该字段应放置在面板上,并且将隐藏。我的愿望是使用此字段值来隐藏/显示基于此值的其他字段。如果this.value =“0”=>一些字段,在action =“newDocument”之后,将被隐藏或不隐藏,如果this.value =“1”=>某些其他字段将被隐藏或不隐藏。 – 2014-09-04 08:07:17
然后,您不必将此值保存到任何数据源,对不对? – 2014-09-04 08:16:23
不幸的是,我必须保存,因为我在列出一些文档的视图公式选择中使用它。例如,vw1列出了一些文件(其中this.value = 0),vw2列出了一些文件(其中this.value = 1) – 2014-09-04 08:28:46