This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Nov 12, 2012, 4:22 PM
5 Posts

Dynamic Render Formula in Navigator

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 4
Hi,
 
I have a navigator which will be build dynamically. 
The information is coming from a different database. 
The label and the page are working fine, but when I want it to render based on a role, it is not working.
 
var1 can be:

var1 = 0~Workflow Approval Requests**vwWorkflowApprovalRequested**context.getUser().getRoles().contains(["Admin"])

 

The code I am using is:

 <xe:this.rendered>

<![CDATA[#{javascript:

if(@Left(var1, 1) < 1) {

if (@Text(@Word(var1, "**", 3))=="") {

true

} else {

@Text(@Word(var1, "**", 3))

}

} else {

false

}

}]]>

</xe:this.rendered>

So actually what I want is that instead of the text context.getUser().getRoles().contains("[Adnin]") getting in the <rendered> I want it to be executed. 
 
What am I doing wrong..... Please Help !!!!
 
 
Robert Lardenoije 
Nov 12, 2012, 4:23 PM
135 Posts
Re: Dynamic Render Formula in Navigator
Is this a copy-paste problem? 
 
"var1 = 0~Workflow Approval Requests**vwWorkflowApprovalRequested**context.getUser().getRoles().contains(["Admin"])"
 
That is not valid SSJS.
Nov 13, 2012, 10:31 AM
5 Posts
Re: Dynamic Render Formula in Navigator
Hi Panu,
 
Yes, this is a copy and paste. The var1 is a variable which gets its information from a external Notes database.
It is the var1 which will be splitted into a level, label, page, and rendering formula. 
Nov 14, 2012, 10:24 AM
135 Posts
Re: Dynamic Render Formula in Navigator
 Can you post the XPage source where var1 gets its value?
Nov 15, 2012, 4:13 PM
5 Posts
Re: Dynamic Render Formula in Navigator
Hi Panu,
 
The code is very complex and goes over several databases.
But what I would like to do is:
I have a document where there is a rendering formula defined in one of the fields.
The formula is:  
context.getUser().getRoles().contains("[Admin]")  
 
On a Xpage I have a navigator, where the rendering should come from that document.
That is in a simple way what I want to achieve. 
 
Thanks for helping me on this one. 
 
Robert Lardenoije 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal