You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Samir Deolikar <sa...@cisco.com> on 2002/05/10 05:02:43 UTC

Velocity Layout Functionality Fundamentals

HI All,
I have some basic problem in Velocity functionality. My Question is as
follows. (Reply me with any inputs you have on it)
Quest: Consider a Sample Layout file with the following code

<table width="100%">
<tr>
<td colspan="2">
$navigation.setTemplate("/DefaultTop.vm")
</td>
</tr>
<tr>
<td align="left">
$screen_placeholder
</td>
</tr>
<tr>
<td colspan="2">
$navigation.setTemplate("/DefaultBottom.vm")
</td>
</tr>
</table>

Does velocity threads all the three processes(*.vm and $screen_placeholder)
and then create the HTML output sequentially or Velocity sequentially parse
the *.vm and screen_placeholder as and when they appear and create the HTML
output or there is some other method.
Waiting eagerly for replies....
Regds.
Samir Deolikar

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity Layout Functionality Fundamentals

Posted by Samir Deolikar <sa...@cisco.com>.
Thanks Geir!

This is what i understood from your mail....

1. All the instruction written in DefaultTop.vm would be
read-executed-converted to HTML first.
2. HTML TAGS of the Layout (code written below)
3. $screen_placeholder
4. HTML TAGS of the Layout
5. All the instruction written in DefaultBottom.vm would then be
read-executed-converted to HTML
6. HTML TAGS of the Layout

In case if i got it wrong, please do revert.

Regards,
Samir
-------Original Message-------

From: Velocity Users List
Date: Friday, May 10, 2002 04:58:13 PM
To: velocity-user@jakarta.apache.org
Subject: Re: Velocity Layout Functionality Fundamentals

On 5/9/02 11:02 PM, "Samir Deolikar" <sa...@cisco.com> wrote:

> HI All,
> I have one basic problem in Velocity functionality, which is as
> follows. (Reply me with any inputs you have on it)
> Quest: Consider a Sample Layout file with the following code
> 
> <table width"100%">
> <tr>
> <td colspan"2">
> $navigation.setTemplate("/DefaultTop.vm")
> </td>
> </tr>
> <tr>
> <td align"left">
> $screen_placeholder
> </td>
> </tr>
> <tr>
> <td colspan"2">
> $navigation.setTemplate("/DefaultBottom.vm")
> </td>
> </tr>
> </table>
> 
> Does velocity threads all the three processes(*.vm and
$screen_placeholder)
> and then create the HTML output sequentially or Velocity sequentially
parse
> the *.vm and screen_placeholder as and when they appear and create the
HTML
> output or there is some other method.


I am not sure what the $navigation.setTemplate() does, but Velocity will
render sequentially :

First the stuff before the first $navigation, then the stuff between
$navication and $screen_placeholder, then $screen_placeholder, the the stuff
to the next $navigation, then the last $navigation, then the rest to the
end.

It does it all in order as it's found in the template.


-- 
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail: <mailto:velocity-user-unsubscribe@jakarta.apache
org>
For additional commands, e-mail: <ma...@jakarta.apache.org>

Re: Velocity Layout Functionality Fundamentals

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 5/9/02 11:02 PM, "Samir Deolikar" <sa...@cisco.com> wrote:

> HI All,
> I have some basic problem in Velocity functionality. My Question is as
> follows. (Reply me with any inputs you have on it)
> Quest: Consider a Sample Layout file with the following code
> 
> <table width"100%">
> <tr>
> <td colspan"2">
> $navigation.setTemplate("/DefaultTop.vm")
> </td>
> </tr>
> <tr>
> <td align"left">
> $screen_placeholder
> </td>
> </tr>
> <tr>
> <td colspan"2">
> $navigation.setTemplate("/DefaultBottom.vm")
> </td>
> </tr>
> </table>
> 
> Does velocity threads all the three processes(*.vm and $screen_placeholder)
> and then create the HTML output sequentially or Velocity sequentially parse
> the *.vm and screen_placeholder as and when they appear and create the HTML
> output or there is some other method.


I am not sure what the $navigation.setTemplate() does, but Velocity will
render sequentially :

First the stuff before the first $navigation, then the stuff between
$navication and $screen_placeholder, then $screen_placeholder, the the stuff
to the next $navigation, then the last $navigation, then the rest to the
end.

It does it all in order as it's found in the template.


-- 
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>