Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用PostNewDocument事件的Xpages_Xpages_Xpages Ssjs - Fatal编程技术网

使用PostNewDocument事件的Xpages

使用PostNewDocument事件的Xpages,xpages,xpages-ssjs,Xpages,Xpages Ssjs,我试图使用xpage的PostNewDocument事件向editBox添加一个值,考虑到我希望字段在打开时具有相应的值——使用特定的按钮 我尝试了两种方法:

我试图使用xpage的
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>