单击Navigator Entry可隐藏我的节点

时间:2014-04-14 22:28:15

标签: xpages xpages-extlib

如果xPage加载渲染代码就可以正常工作了。但是,当用户单击Register for e-Statements时,它们都会被隐藏,直到我手动刷新页面。我尝试进行完整更新,并且我的代码的其他部分无法尝试访问某些java bean。

用于渲染的代码是在我的全局javascript库中。

有什么想法吗?

<xe:navigator id="navigator1">
        <xe:this.treeNodes>
            <xe:basicContainerNode label="Register for e-Statements"
                submitValue="RegisterForEstatements" enabled="true">
             <xe:this.rendered><![CDATA[#{javascript:myEStatements.renderStatements()}]]>
                </xe:this.rendered>
            </xe:basicContainerNode>

            <xe:basicLeafNode label="View My e-Statements" onClick="linkToEstatements();">
                <xe:this.rendered><![CDATA[#{javascript:myEStatements.renderStatements()}]]>
                </xe:this.rendered>
            </xe:basicLeafNode>
        </xe:this.treeNodes>

        <xp:eventHandler event="onItemClick" submit="true"
            refreshMode="partial" refreshId="navigator1">
            <xp:this.action><![CDATA[#{javascript:                      
            if( context.getSubmittedValue() == "RegisterForEstatements" )
            {
                sessionScope.put( "dialogAcceptEStatementTitle", "Accept e-Statements!" );
                var dialogAcceptEstatements = getComponent( "dlgAcceptEStatements" );
                dialogAcceptEstatements.show();
                return "";
            }        
            sessionScope.put( "dialogOopsTitle", "Oopps!" );
            sessionScope.put( "dialogOopsMessage", "\nThis Feature Has Not Been Enabled Yet!" );
            var dialogOops = getComponent( "dialogOops" );
            dialogOops.show();
            return "";

            }]]>
            </xp:this.action>
        </xp:eventHandler>
        }]]>
</xe:navigator>

以下是Javascript库中的其他代码。仅供参考,properProfile是一个JavaBean,当我单击导航器时,它看起来是null。我已将bean范围定义为请求,尝试会话既不会更改错误。

var myEStatements = 
{
//  If the property receives Statements return true to display the e-Statement Links
//  in the occ navigator
"renderStatements" : function() 
{
    var result = false;
    try 
    {
        result = aPropertyProfile.getStatementCoupon_1().equalsIgnoreCase( "Statement" );
    } catch (e) 
    {
        print(e.message);
    }
    return result;
},

//  Fetch the e-Statement Accept Message
"getEStatementAcceptMessage" : function()
{
    var eStatementAcceptMessage = "";
    try
    {
        eStatementAcceptMessage = eStarService.getEStatementAcceptMessage();
    }  catch(e)
    {
        print( e.message );
    }
    return eStatementAcceptMessage;
}
}

0 个答案:

没有答案