on 2007 Jul 27 4:15 PM
Hi All,
´
i´m using a hovermenu for my links in my toolbar. With hoveritem.setClientSideScript("javascript:EPCM.doNavigate(.....)"); i would like to handle the navigation to the target. I found an older Thread where the same Problem is explained. ()
Can Anybody help me?
Alternative i can handle the navigation with hoveritem.setLinkReference("http://.....);
but in this case the context especially the History get lost. The right way is to use EPCM.doNavigate. But how can i use this with a Hovermenu??
Regards,
Peter Koop
Request clarification before answering.
hi peter,
here i give the code try like that , in my case it is working.
Link l = new Link("LINK_" + nodeCount, title);
String navigationAction = "EPCM.doNavigate('" + node.getName() + "',2)";
l.setOnClientClick(navigationAction);
treeNode.setComponent(l);
try like that if u have any problem let me know.
JagadishBabu Nagarapu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi JagadishBabu,
thanks for your post, but this codesnippet don´t solve my problem.
Maybe i have to post my codesnippet.
.....
HoverMenu menu = new HoverMenu("Menu");
String link = navurl://.....;
HoverMenuItem item = new HoverMenuItem(1, "test");
IPortalComponentURI componentURI = request.createPortalComponentURI();
String myUrl = componentURI.toString();
String contlink = "http://" + myUrl +"?NavigationTarget=" + link;
item.setClientSideScript("javascript:EPCM.doNavigate('ROLES://"contlink"')");
menu.addMenuItem(item);
....
Everthing is going fine, but if i hit the menuitem the browser throws a javascript error:
'EPCM' is undifined.
I don´t know why my IView can´t find EPCM or the relevant .js file.
I hope i could exlpain my Problem. Can you give me advice?
regards
Peter
I don´t have to use EPCM but if i use instead of item.setClientSideScript(....)
item.setLinkReference(...) it works fine. I can navigate to the target, but my context is going lost. The history is empty because a full reload is done. I want only a reload of the contentarea. I tried it with item.setLinkTarget("_self") and so on, but there was no solution for this misery.
In my opinion i have to use EPCM.doNavigate(...)
Of course you can send your suggestion wihtout EPCM. I would like to see it.
No, i´m using the preview of the standard framework with my iview for testing.
regards,
Peter
hi peter refer my code we made Hover Menu Light Frame Work
it is use ful to you go through it.
<%@ taglib uri="NavigationTagLibrary" prefix="nav" %>
<%@ taglib uri="FrameworkTagLibrary" prefix="frm" %>
<%-- variable for resources such as images --%>
<%
String mimeUrl = componentRequest.getWebResourcePath();
%>
<%@ include file="header_style.jsp" %>
<script type="text/javascript">
makeHoverable = function(navigationDiv) {
if (!document.all) return; // continue only for IE
var liEls = document.getElementById(navigationDiv).getElementsByTagName("LI");
for (var i=0; i<liEls.length; i++) {
liEls<i>.onmouseover = function() {
this.className += " hover";
}
liEls<i>.onmouseout = function() {
this.className = this.className.replace(new RegExp(" hover
b"), "");
}
}
}
</script>
<div id="logo"><img src="<%=mimeUrl%>/images/bg-leaves.gif"></div>
<div id="message">Welcome to ACS SYSTECH INTEGRATORS .</div>
<div id="welcome">
<nav:ifNotAnonymousUser>
<frm:userFirstName /> <frm:userLastName />
</nav:ifNotAnonymousUser>
<nav:ifAnonymousUser>
Guest
</nav:ifAnonymousUser>
</div>
<%-- a simple breadcrumb so the user can see where they are in the navigtion tree --%>
<div id="breadcrumb">You are here:
<%-- iterate through all the nodes in the current nav path --%>
<nav:iterateNavNodesInSelectedPath>
<nav:navNodeAnchor navigationMethod="byURL"/>
<%-- output '->' to separate the nodes, but only if there are more to come --%>
<nav:ifHasMoreIterations>-></nav:ifHasMoreIterations>
</nav:iterateNavNodesInSelectedPath>
</div>
<%-- this is the main navigation section --%>
<div id="branding">
<div id="navigation">
<%-- start the unordered list --%>
<ul>
<nav:launchedNavNode navNode="myNode">
You are in: <%=myNode.getTitle(request.getLocale())%>
</nav:launchedNavNode>
<br>
<br>
<%-- the following displays titles of siblings --%><nav:launchedNavNode>
<nav:navNodeParent>
<nav:iterateNavNodeChildren>
<nav:navNodeTitle/>
</nav:iterateNavNodeChildren>
</nav:navNodeParent>
</nav:launchedNavNode>
<nav:iterateInitialNavNodes>
<li class='Level1'><nav:navNodeAnchor navigationMethod="byURL" />
<nav:ifNavNodeHasChildren>
<ul>
<%-- again go through all the nodes in level 2 --%>
<nav:iterateNavNodeChildren>
<li class='Level2'><nav:navNodeAnchor navigationMethod="byURL" /></li>
</nav:iterateNavNodeChildren>
</ul>
</nav:ifNavNodeHasChildren>
</li>
</nav:iterateInitialNavNodes>
</ul>
</div>
</div>
<nav:iterateNavNodeChildren>
<li class='Level2'><nav:navNodeAnchor navigationMethod="byURL" /></li>
</nav:iterateNavNodeChildren>
</ul>
<!</nav:ifNavNodeHasChildren>>
</li>
</nav:iterateInitialNavNodes>
</ul>
</div>
</div>
<script>makeHoverable("navigation");</script>
peter in this code i included one file that style sheet only
i hope it is helps you to solve your problem.
JagadishBabu
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.