用于渲染的代码是在我的全局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;
}
}