You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Shishir K. Singh" <sk...@synapsistech.com> on 2004/01/23 20:39:15 UTC

Velocity and JSF UI

Hi, 

I have not played around with velocity (I am still a new bie). I would
be interested to know how would velocity fit in with the JSF UI
component (with all the new tags that JSF is introducing). 

Thanks
Shishir


-----Original Message-----
From: Will Glass-Husain [mailto:wglass@forio.com] 
Sent: Friday, January 23, 2004 1:46 PM
To: Velocity Users List
Subject: Re: Active Learning Environment (Velocity/Java/XML)

Hi Brad,

We have an app ( broadcast.forio.com ) that similarly has a number of
accounts for which different users upload Velocity pages.  (like your
app, accounts are distinguished by pathinfo from the url).  We stuck
with a single VelocityEngine for performance reasons, with a few
customizations.  A few issues that may be parallel

First, I was concerned about #include and #parse, so we implemented a
customized event handler (patch in Bugzilla) to restrict users to only
be able to include files within their own account.  (it's a little more
complex, as we also have a system-wide set of includeable files).

Second, there's some (solvable) security-related issues to consider if
you are allowing untrusted users to upload templates. [1]

Third, database initialization in our system done via a singleton
wrapper class that sets an application-wide boolean flag to indicate the
database status.  (with appropriate synchronization, of course).
Actually, our apps use the Hibernate object persistance library.
Putting O/R objects in the Velocity context is an easy way to make data
available to template writers.

I hadn't thought about the macro issue, but (assuming you wanted to go
with a single VelocityEngine) remember that users can always define
macros within a file that is pulled in with #parse throughout the pages.

Best, WILL

P.S.  Is availability of MySQL really an issue?  My impression is that
it's standard on most Linux systems, and installable with an "EXE"
installer on Windows.

[1]
http://nagoya.apache.org/wiki/apachewiki.cgi?BuildingSecureWebApplicatio
ns



----- Original Message -----
From: "Brad Cox" <bc...@virtualschool.edu>
To: "Tim Colson" <tc...@cisco.com>; "'Velocity Users List'"
<ve...@jakarta.apache.org>
Sent: Friday, January 23, 2004 10:06 AM
Subject: RE: Active Learning Environment (Velocity/Java/XML)


> Thanks for the support, and the interest. Guess I better brush up on
> my mind-reading skills. ;)
>
> And please do send in those (constructive) comments and suggestions.
> The main problem is not sure how to provide for a foolproof,
> seamless, no configuration  install. Considering switching to
> berkeley db instead of mysql for this reason alone. TBD. Suggestions
> most welcome.
>
> PS: The main snag is that each course should have its own velocity
> engine for course-specific macros and a connection to its very own
> database. The ale servlet should handle multiple courses,
> distinguished via pathinfo from the url. Possible, I know, but messy
> to think through. When/how to trigger automatic database
> initialization is also an issue. I'm working on it. ;)
>
> At 10:41 AM -0700 1/23/04, Tim Colson wrote:
> >Brad -
> >
> >Will wrote:
> >>  Thanks for posting this, found it interesting.  Always
> >>  interested to hear about other Velocity apps (especially related
to
> >e-learning).
> >>  I'll download it and take a look, maybe send back some thoughts in
a
> >>  personal email.
> >
> >Ditto. :-)
> >Timo
>
> -- 
> Brad J. Cox, PhD, 703 361 4751, http://virtualschool.edu
>         http://virtualschool/ale Action Learning Environment
> http://virtualschool.edu/mybank Digital Rights Management System
>     http://virtualschool.edu/jco Java Cryptographic Objects (JCO)
>    http://virtualschool.edu/jwaa Java Web Application Architecture
(JWAA)
>   http://virtualschool.edu/java+ Java Preprocessor (Java+)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


RE: Velocity and JSF UI

Posted by Guillermo Meyer <gm...@sib.interbanking.com.ar>.
I'm working with Xkins-Faces subproject in Xkins project
(http://xkins.sourceforge.net/). Xkins-Faces will have renderers for JSP
taglibs and these renderers will use Velocity Templates to generate
HTML. But you should use JSP to use JSP taglibs. I still haven't
researched on using Xkins-Faces with velocity.

Anyway, JSF is not constrained to be used only with JSP, so, as nathan
said, a Velocity implementation would be written.



-----Original Message-----
From: Nathan Bubna [mailto:nathan@esha.com] 
Sent: Viernes, 23 de Enero de 2004 05:08 p.m.
To: Velocity Users List
Subject: Re: Velocity and JSF UI


Shishir K. Singh said:
> I have not played around with velocity (I am still a newbie). I would 
> be interested to know how would velocity fit in with the JSF UI 
> component (with all the new tags that JSF is introducing).

i've been wondering this lately too, but i haven't had time to look at
JSF yet.  i read on TheServerSide that JSF can have non-JSP
implementations.  i think it said there is an XUL impl out there
somewhere.  if this is the case, i suppose it may be possible to write a
Velocity implementation of JSF.

also, i know Struts is working on integration with JSF (Struts-Faces).
as that gains stability and popularity, i'm sure we'll be looking for
ways to integrate that with the VelocityStruts project.

Nathan Bubna
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Velocity and JSF UI

Posted by Nathan Bubna <na...@esha.com>.
Shishir K. Singh said:
> I have not played around with velocity (I am still a newbie). I would
> be interested to know how would velocity fit in with the JSF UI
> component (with all the new tags that JSF is introducing).

i've been wondering this lately too, but i haven't had time to look at JSF
yet.  i read on TheServerSide that JSF can have non-JSP implementations.  i
think it said there is an XUL impl out there somewhere.  if this is the case,
i suppose it may be possible to write a Velocity implementation of JSF.

also, i know Struts is working on integration with JSF (Struts-Faces).  as
that gains stability and popularity, i'm sure we'll be looking for ways to
integrate that with the VelocityStruts project.

Nathan Bubna
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org