cancel
Showing results for 
Search instead for 
Did you mean: 

Open iview in Central Area: EPCM.doNavigate

Former Member
0 Kudos

Hi All,

The homepage of our portal contains a lot of iviews. One of these iviews is a km document iview, displaying an html document created in km. This km document should contain links towards portal iViews. When the user click onto a link, the approriate iview should open in the central area (NOT in a seperate window).

After same reading I concluded that the ideal way was via the EPCM.doNavigate() command. So I started a testcase.

The iview I wanted to open is located at pcd:portal_content/be.jorvbcm.developments/be.jorvbcm.iViews.iViews/Prikbord/be.jorvbcm.PrikbordBrowserAll

The html page looks like:

-


<HTML>

<HEAD>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

<!-- EPCF: BOB Core -->

<META http-equiv="Content-Script-Type" content="text/javascript">

<SCRIPT src="/irj/portalapps/com.sap.portal.epcf.loader/script/standard/js13_epcf.js?6.0723"></SCRIPT>

</HEAD>

<BODY>

<SPAN class=urFontStd>

<SPAN class=urTxtStd>

<P>

<SPAN class=urFontStd>

<SPAN class=urTxtStd>When clicking this URL a new iView should be loaded in the central area... .

</SPAN>

</SPAN>

</P>

<A HREF="#"

onclick="return EPCM.doNavigate('ROLES://portal_content/be.jorvbcm.developments/be.jorvbcm.iViews.iViews/Prikbord/be.jorvbcm.PrikbordBrowserAll')">

This is an HTML Link

</A>

</SPAN>

</SPAN>

</BODY>

</HTML>

-


However, when I click the link a javascript pops up telling me that I can not access the requested source.

Also, when I fill in anything different from "#" into HREF (for example "myLink"), I get the following exception:

[EXCEPTION]

#1#com.sapportals.portal.prt.runtime.PortalRuntimeException: iView not found: myLink.default

Anyone an idea what I am doing wrong en how I can solve it?

We are currently working on Portal6.0 SP14.

Kind regards

Joris

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try using htmlb link:

<hbj:link id="myLink"

text="Click Me"

target="_TOP">

<% myLink.setOnClientClick("EPCM.doNavigate('ROLES://portal_content/****Iview', 0);void(0);");%>

</hbj:link>

Something like this will open the page in the content area occupying the navigation area also.

There've been some posts on how to avoid it to load in the navigation area. Search on SDN for more...

<b>Plz don forget points, if it helped</b>

Regards,

P.

Answers (2)

Answers (2)

Former Member
0 Kudos

Joris,

Do you ever achieve a solution to this problem/issue? I have similiar requirements and am having a hard time getting hyperlinks to iViews to work.

Former Member
0 Kudos

Hi,

I also have the exactly same problem. Using JavaScript does not open the "myLink", as described by Joris, and if I don't use JavaScript, but a normal HTML link ("http://<host>:<port>/irj/portal?NavigationTarget=ROLES://portal_content/myfolder/myrole/mypage), the corresponding target page is loaded in the content area, but another navigation panel is also loaded, so I have 2 navigation panels. Also, the selection in the navigation panel is not changed and remains the old one.

I'm having really hard time getting over this problem. Can anyone help?

Thanks in advance!

Best regards,

Georgi Shirkov

Former Member
0 Kudos

Hi Georgi,

I faced same problem, whatever discussed in this thread. I solved this by using <b>Navigation tag library</b>.

For creating link your code shoud be like this in Jsp file.

=======================================================

<!--import section -->

<%@ taglib uri="NavigationTagLibrary" prefix="nav" %>

<!--code for creating link -->

<nav:navNode navTarget="<%=viewLocation%>">

<nav:navNodeAnchor navigationMethod="byURL"/>

</nav:navNode>

========================================================

In the above code value :

viewLocation = "ROLES://portal_content/myfolder/myrole/mypage"

(your targate page)

-


hope this will help you----


thanks & regard,

Pankaj

Former Member
0 Kudos

I would try it without the javascript.

Try just using the <a> tag and with the target property.

<b>

<A HREF="http://<yourportal>/irj/portal?NavigationTarget=ROLES://portal_content/be.jorvbcm.developments/be.jorvbcm.iViews.iViews/Prikbord/be.jorvbcm.PrikbordBrowserAll" target="_self">
This is an HTML Link
</A>

</b>