Two Laptop Bag
The moose likes Portals and Portlets and the fly likes velocity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "velocity" Watch "velocity" New topic


pb kishor

Joined: Apr 27, 2008
Posts: 1

I am some help on velocity.

How can i start the velocity development using Springs.

>How can we send the user Inputs from velocity to my Controller class.

>How the validations need to be done.

Please help me on this.

Ajith Prasad
Ranch Hand

Joined: Aug 22, 2006
Posts: 66
Import the velocity engine,
invoke the file(style sheet, etc) which you are going to display,
and rest of the stuffs are same as invoking classes from another
Jonas X. Yuan
Ranch Hand

Joined: May 18, 2008
Posts: 108
You can use the Velocity in Liferay portal.

Here is an real example for navigation.

Web Site:

Codes: navigation.vm

<div id="navigation">
#foreach ($nav_item in $nav_items)
#if ($nav_item.isSelected())
#set ($nav_item_class = "selected parent-nav-item")
#set ($nav_item_class = "parent-nav-item")

<li class="$nav_item_class">
<a href="$nav_item.getURL()" $nav_item.getTarget()><span>$nav_item.getName()</span></a>

#if ($nav_item.hasChildren())
<ul class="child-menu">
#foreach ($nav_child in $nav_item.getChildren())
<a href="$nav_child.getURL()" $nav_child.getTarget()>$nav_child.getName()</a>

Books: Liferay Portal 6.1 Systems Development
I agree. Here's the link:
subject: velocity
It's not a secret anymore!