Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/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
XPages-获取对话框内文本区域的值-第2部分_Xpages_Xpages Extlib_Xpages Ssjs - Fatal编程技术网

XPages-获取对话框内文本区域的值-第2部分

XPages-获取对话框内文本区域的值-第2部分,xpages,xpages-extlib,xpages-ssjs,Xpages,Xpages Extlib,Xpages Ssjs,我上一个问题的后续问题: 我试图在xe:对话框中包含的textarea中获取文本输入的句柄,但未成功。按下XPage上的按钮后,xe:对话框“弹出”。这是我的密码: <xe:dialog id="InputDialog5"> <xe:this.title>Input Dialog</xe:this.title> <xp:panel> <xp:inputTextarea id="InputTextBox5" value="#{document1

我上一个问题的后续问题: 我试图在xe:对话框中包含的textarea中获取文本输入的句柄,但未成功。按下XPage上的按钮后,xe:对话框“弹出”。这是我的密码:

<xe:dialog id="InputDialog5">
<xe:this.title>Input Dialog</xe:this.title>
<xp:panel>
<xp:inputTextarea id="InputTextBox5" value="#{document1.InputTextBox5}" 
cols="60" rows="4" styleClass="StatusDialogLabel"></xp:inputTextarea>
</xp:panel>
<xe:dialogButtonBar id="dialogButtonBar15">
<xp:button value="OK" id="button37">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="true">
<xp:this.action>
<![CDATA[#{javascript:var inputVal = document1.getValue("InputTextBox5");
setJobReferenceStatus(40,inputVal);
var redirect = "window.location='"+applicationScope.get("redirect")+"'";
facesContext.getViewRoot().postScript(redirect);
}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
</xe:dialogButtonBar>
</xe:dialog>

输入对话框

不幸的是,行document1.getValue(“InputExtBox5”);不工作,并将“null”而不是字段中包含的值传递给setJobReferenceStatus函数。知道这段代码为什么不起作用吗?

下面是一个使用SSJS读取textarea字段内容的工作示例(并将值输出到计算字段以供测试):


输入对话框

注意我是如何在对话框中部分刷新面板的。

下面是一个使用SSJS读取textarea字段内容的工作示例(并将值输出到计算字段以用于测试):


输入对话框

注意我是如何在对话框中部分刷新面板的。

下面是一个使用SSJS读取textarea字段内容的工作示例(并将值输出到计算字段以用于测试):


输入对话框

注意我是如何在对话框中部分刷新面板的。

下面是一个使用SSJS读取textarea字段内容的工作示例(并将值输出到计算字段以用于测试):


输入对话框
注意我是如何在对话框中部分刷新面板的。

事件处理程序中删除
immediate=“true”

每个事件都支持两个绕过验证的选项(请参阅更多详细信息)。请注意,在Per的回答中,
eventHandler
包含属性赋值
disableValidators=“true”
。这映射到“无验证的过程数据”选项,而
immediate=“true”
映射到“不验证或更新数据”选项

使用后一个选项时,事件运行时不会对数据模型(即文档)推送任何更新,这就是为什么即使用户填充了值,编辑框的值仍为
null
。如果将
immediate=“true”
替换为
disableValidators=“true”
,事件仍将运行,不会触发任何验证失败,但数据模型将包含用户在编辑框中填充的任何值。

事件处理程序中删除
immediate=“true”

每个事件都支持两个绕过验证的选项(请参阅更多详细信息)。请注意,在Per的回答中,
eventHandler
包含属性赋值
disableValidators=“true”
。这映射到“无验证的过程数据”选项,而
immediate=“true”
映射到“不验证或更新数据”选项

使用后一个选项时,事件运行时不会对数据模型(即文档)推送任何更新,这就是为什么即使用户填充了值,编辑框的值仍为
null
。如果将
immediate=“true”
替换为
disableValidators=“true”
,事件仍将运行,不会触发任何验证失败,但数据模型将包含用户在编辑框中填充的任何值。

事件处理程序中删除
immediate=“true”

每个事件都支持两个绕过验证的选项(请参阅更多详细信息)。请注意,在Per的回答中,
eventHandler
包含属性赋值
disableValidators=“true”
。这映射到“无验证的过程数据”选项,而
immediate=“true”
映射到“不验证或更新数据”选项

使用后一个选项时,事件运行时不会对数据模型(即文档)推送任何更新,这就是为什么即使用户填充了值,编辑框的值仍为
null
。如果将
immediate=“true”
替换为
disableValidators=“true”
,事件仍将运行,不会触发任何验证失败,但数据模型将包含用户在编辑框中填充的任何值。

事件处理程序中删除
immediate=“true”

每个事件都支持两个绕过验证的选项(请参阅更多详细信息)。请注意,在Per的回答中,
eventHandler
包含属性赋值
disableValidators=“true”
。这映射到“无验证的过程数据”选项,而
immediate=“true”
映射到“不验证或更新数据”选项

使用后一个选项时,事件运行时不会对数据模型(即文档)推送任何更新,这就是为什么即使用户填充了值,编辑框的值仍为
null
。如果将
immediate=“true”
替换为
disableValidators=“true”<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
    <xp:this.data>
        <xp:dominoDocument var="document1"></xp:dominoDocument>
    </xp:this.data>

    <xp:button value="Label" id="button1">
        <xp:eventHandler event="onclick" submit="true" refreshMode="complete">
            <xp:this.action><![CDATA[#{javascript:getComponent("InputDialog5").show()}]]></xp:this.action>
        </xp:eventHandler>
    </xp:button>

    <xe:dialog id="InputDialog5">
        <xe:this.title>Input Dialog</xe:this.title>
        <xp:panel id="refreshPanel">
            <xp:inputTextarea id="InputTextBox5" value="#{document1.InputTextBox5}" cols="60" rows="4" styleClass="StatusDialogLabel"></xp:inputTextarea>
            <xp:br />
            <xp:br />
            <xp:text escape="true" id="computedField1"></xp:text>
        </xp:panel>
        <xe:dialogButtonBar id="dialogButtonBar15">
            <xp:button value="OK" id="button37">
                <xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="refreshPanel" disableValidators="true">
                    <xp:this.action><![CDATA[#{javascript:
                            getComponent("computedField1").setValue(document1.getValue("InputTextBox5"));
                        }]]></xp:this.action>
                </xp:eventHandler>
            </xp:button>
        </xe:dialogButtonBar>
    </xe:dialog>
</xp:view>