cancel
Showing results for 
Search instead for 
Did you mean: 

Link in Treenode

Former Member
0 Kudos

Hi,

This is in EP6 SP2. I am using the Prakash's code from this weblog

I am trying to use this code to display portal favorites (similar in NW portal). Did little modification to the code, I am able to retrieve the user's favorite list and everything is working fine.

The issue for me is to display the contents in the same window( content area) instead of a new window. If I use "target=_top", the link opens in the content area itself, this is working fine. But the issue is, the role which contains the particular link is not opened up in TLN and just the content area gets refreshed with the iview contents

So in "LinkType.EXTERNAL" condition modified "strtext" to display the name instead of href. My plan is to use EPCM.doNavigate so that the user can know the hierarchy of the iview

str3 contains "CollaborationConnector://portal_content/Test/TestRole/TestPg". (If I use original code TestPg is opened, but not the role name,workset name, page gets higlighted)

Link l = new Link("LINK_" + nodeCount++);

String navigationAction = "EPCM.doNavigate('"str3"',1)";

l.setOnClientClick(navigationAction);

TreeNode name1 = new TreeNode(strid, strtext, name);

//name1.setTooltip(strid);

name1.setComponent(l); <== added this line

But the above code is not working. There is no link appearing and the area is blank, no errors.

What am I doing wrong or what should I do to so that along with the iview, TLN also opens up.

BR

Arun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arun,

name1.setComponent is for rendering hover menus.

You could do the following.

String navigationAction = "EPCM.doNavigate('"+str3+"',1);";
if (tmpres.getLinkType() == LinkType.EXTERNAL){			strtext =							"<a class=urLnk href='javascript:"+ navigationAction +  "' >";
strtext = strtext + disname + "</a>";

Former Member
0 Kudos

Hello Prakash,

Thanks for the update.

But the behaviour is the same, the iview gets displayed in the content area, but the hierarchy is not displayed.

For ex: I have 2 roles R1 & R2, iview IV1 is assigned to R1, & iview IV2 is assigned to R2 . I have added IV2 which is present in R2 to my favorites list.

While I am viewing IV1 in R1, if I click IV2 from my favorites list, then IV2 contents are displayed in the content area. But the hierarchy is still shown as the present role R1, detailed navigation is closed too.

Arun

Answers (0)