Awesome! Should that be: "WebWork2 contains the following items by default in the **VelocityContext**"?
Great work Matt! > -----Original Message----- > From: Matt Ho [mailto:[EMAIL PROTECTED] > Sent: Friday, August 29, 2003 8:52 PM > To: [EMAIL PROTECTED] > Subject: Re: [OS-webwork] Velocity in ww2 beta... where/how? > > > With regards to the data contained within the ValueStack, I've posted > the following up on the wiki under: > > http://wiki.opensymphony.com/space/Using+WebWork+2+Tags+from+Velocity > > cWebWork2 contains the following items by default in the ValueStack: > > * req - the current HttpServletRequest > * res - the current HttpServletResponse > * stack - the current OgnlValueStack > * ognl - an instance of OgnlTool > * ui - a (now deprecated) instance of a ui tag renderer > > Additionally, WebWork uses a customized VelocityContext that allows > properties from the value stack to be directly accessed. This > means that > if you have the following Action: > > public class SampleAction implements Action { > ... > > public String getName() { ... } > public Address getAddress() { ... } } > > You can, from Velocity, access name and address as $name and $address > respectively. > > -------- > > I'm definitely in agreement on enabling VelocityTools to work > with WW2 > either by default or as a drop-in addon though I haven't had a moment > yet to do this. If you're interested in doing this, I would highly > encourage you :) > > M > > Jonas Eriksson wrote: > > > Hi! > > > > First, WebWork2 is looking really promising, great work! > > > > Second, I have not used WebWork1 but tried Struts a year > ago and when > > I > > read about WebWork I thought "this is easy, compared to > Struts". The > > decision fell on WebWork2 and the Velocity view. I feel > this combination > > is very powerful but where's the documentation... The ww1 > documentation > > serves as a good and basic understanding of how ww2 > (should/will) work > > and then there's the wiki which is good, sometimes ;). What > should be > > pointed out in some kind of documentation is: > > > > - What is contained in the velocity context after action > execution and > > after direct vm request? > > > > - Which functionality (tags and macros) are carried over > from ww1, and > > which are new? There is a JIRA issue concerning this (with MINOR > > priority, should be MAJOR IMO); > > http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-251 > > "Velocity view support" without good tags and helper classes is no > > Velocity support from a newcomer's point of view. > > > > No more whining... but I would like to know if anyone is > interested in > > using Velocity Tools, mostly the VelocityLayoutServlet, in ww2? > > I like the idea of using vm templates to build a page layout. Very > > simple but still powerful. I have made some ugly changes to > ww2 to make > > it work with Velocity Tools (not the ToolBox, yet). Is > there any chance > > at all there will be support for VelocityLayoutServlet (or similiar > > 2-pass rendering style) in ww2? > > > > One more thing... is there anything similar to the Velocity Tools > > ToolBox in ww2? (the ToolBox binds, via xml, > instances/values to the > > velocity context) > > > > Cheers! :-) > > > > Jonas > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Opensymphony-webwork mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork