WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Newbie Question: What are templates for struts menu, Mercy, August 18, 2004
     Re:Newbie Question: What are templates for struts menu, Mercy, August 19, 2004

Subject: Newbie Question: What are templates for struts menu From: Mercy Date: August 18, 2004

Hello,

I am trying to learn struts menu, in particular I've been trying to follow the velocity xtree example.  But ... I still don't know what the template in the example is!!!  I don't know what the template does or how to write one.  I'd really appreciate some clarification in this area... or maybe some websites where I can follow a step by step tutorial?

this is the template that I'm talking about.  ... what are *.vm files?  Am I supposed to write those?

## 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);   #else     var $node = new WebFXTreeItem('$title'#if($menu.url),'$!menu.url'#end);     ${menu.parent.name}.add($node);   #end #end  #displayMenu($menu 0) document.write($menu.name); 

Thanks in advance,

Mercy




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX