Matt,
I was trying to do a pop up window from the menus using the Velocity and Xtree templates (default templates from the demos on website). I tried at first to utilize the onclick attribute within the Menu and Item XML tags within the menu-config. I did change the xtree.html macro to recognize the onclick attribute:
## displayMenu is defined in WEB-INF/classes/globalMacros.vm
#macro( menuItem $menu $level )
## set title
#set ($title = $displayer.getMessage($menu.title))
#set ($node = $menu.name)
#if ($level == 0)
var $node = new WebFXTree('$title'#if($menu.url),'$!menu.url'#end#if($menu.onclick),'$!menu.onclick'#end);
#else
var $node = new WebFXTreeItem('$title'#if($menu.url),'$!menu.url'#end#if($menu.onclick),'$!menu.onclick'#end);
${menu.parent.name}.add($node);
#end
#end
#displayMenu($menu 0)
document.write($menu.name);
I set the onclick attribute as below:
<Menu name="BillPayment" title="menu.toplevel.MyBills" >
The problem is that the link gets generated as <%=request.getContextPath()%>/winopen(). The only way I got the _javascript_ call generated correctly by having the menu-config.xml entry as:
<Menu name="BillPayment" title="menu.toplevel.MyBills" >
Also I noticed that I could not put and quoted data within _javascript_:winopen() or the link would get generated as _javascript_:winopen(. So I had to create the function within the page and call it from the link.
Could you (or anyone) tell me if this issue has been raised before? If so, how was it fixed?
Thanks in advance for your help.
Kevin Drennen
