Jsf 为什么.getComponent().getValue()在可以在CSJS中访问时返回null?

Jsf 为什么.getComponent().getValue()在可以在CSJS中访问时返回null?,jsf,xpages,ssjs,Jsf,Xpages,Ssjs,我有一个密码类型的输入字段,如下所示: <xp:td id="passwordInputTd" align="right"> <xp:inputText id="passwordInputValue" password="true"> </xp:inputText> </xp:td> <xp:button id="signInButton" styleC

我有一个密码类型的输入字段,如下所示:

    <xp:td id="passwordInputTd" align="right">
        <xp:inputText id="passwordInputValue" password="true">
        </xp:inputText>
    </xp:td>
<xp:button id="signInButton"
                    styleClass="prettyEGRZButton prettyEGRZButtonActive"
                    style="width: 50%; padding: 10px;" value="Sign In" />
                <xp:eventHandler event="onclick" submit="true"
                    refreshMode="complete">
                    <xp:this.script><![CDATA[
                    console.log("CSJS value: " + document.getElementById("#{id:passwordInputValue}").value);
                    ]]></xp:this.script>

                    <xp:this.action><![CDATA[#{javascript:              
                    var passwordValue = getComponent('passwordInputValue').getValue());
                    }]]>
                    </xp:this.action>
                </xp:eventHandler>
我用CSJS打印它,但在SSJS中它几乎总是空的(但不总是!)

有什么问题吗


提前感谢

尝试getComponent('passwordInputValue')。getSubmittedValue()不起作用:(是否有任何方法可以直接在CSJS中设置此组件的值?我建议不要使用getValue()。将控件绑定到作用域变量并访问该变量。
console.log("CSJS value: " + document.getElementById("#{id:passwordInputValue}").value);