Please look at the beginnings of my documentation for decorations
here: http://portals.apache.org/jetspeed-2/guides/guide-decorators.html. It
is meant to be as easy as possible (using pre-defined macros) to develop a
layout with knowing little or no Velocity whatsoever. I try to give a
mini-tutorial on Velocity and macros, just enough to get an idea of what is
going on in the background and to get the job done. I have also tried to
side-step using the Jetspeed Power Tool as it has become bloated and hard to
follow code wise. So, I would direct you to look at
src/webapp/WEB-INF/jetspeed_macros.vm to get an idea of the logic you need
to use within your JSPs (IMO, custom tags would be best suited to replace
macros).
I would eventually like to get away from Velocity (even though I love it)
and use an approach similar to Tapestry/Wicket and do direct HTML tag
replacement. I have written APIs (where I work) to do just this but thought
it best to hold off until after release to look at replacing the current
Velocity-based, decoration mechanism.
We originally had JSP and Velocity based decoration/layout mechanisms but
found that Velocity worked much better in that we could control the Velocity
rendering as opposed to the container controlling the JSP rendering.
Another issue is the fact that the layout portlets also use Velocity and use
Velocity directives (#parse()) to include the header and footer decoration
templates (look at:
${JETSPEED}/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm).
This being said, you would need to add functionality/rewrite the layout
portlets to handle JSPs. Again, we used to do this but it became a
maintenance nightmare and mixing Velocity and JSP decorations resulted in
unpredictable results at best.
Regards,
-Scott
> -----Original Message-----
> From: Jouni Rajala [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 27, 2005 1:56 AM
> To: Jetspeed Users List
> Subject: Re: JSP decoration template
>
> Raj Saini kirjoitti:
>
> >Hi Randy,
> >
> >I am ready to work on JSP decoration templates. I have experience with
> >taglibs and should not be much difficulty converting existing velocity
> >templates. Certaily I will need your help to understand the structure of
> >existing templates.
> >
> >Can you please point me to any existing documentaion for understanding
> JPT.
> >
> >I have a question about the template structure. Velocity tempates are
> >devided into header and footer part. I personly dont like the idea of
> >separating a template in multiple files because it divides the HTML tags
> in
> >to files and it becomes difficult to edit a template in a editor
> (e.gEclipse).
> >
> >My question is: Is it possible to use just one single file instead of
> two.
> >For example I want to use a single decoration.jsp to contain complete
> >template code.
> >
> >Regards,
> >
> >Raj
> >
> >
> This is good news. While velocity is simple and fast to learn, I just
> don't want to reserve 1 week in my
> schedule to teach it to number of developers when they have years of
> experience in JSP side.
>
> I think portlet decorators are already in single file and content is
> rendered with single 'tag'. I think
> same approach would be good in layout decorators just for the reason you
> mentioned - at least
> I want to use eclipse's jsp editors to do the stuff.
>
> But sorry. I can't contribute any time for the effort. But once you have
> at least something to show/release/test
> I am ready to help you find some bugs ;)
>
> --
> Jouni Rajala
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]