Re: [OS-webwork] Velocity Views

2003-02-07 Thread Rickard Öberg
Scott Farquhar wrote: Rickard Öberg wrote: He never said that he wasn't using the WebworkVelocityServlet. The method he describes is mostly just to get access to the action as a Velocity object. Otherwise it would be impossible to call methods, as he described. I'm confused. Isn't the action

Re: [OS-webwork] Velocity Views

2003-02-07 Thread Scott Farquhar
Rickard Öberg wrote: He never said that he wasn't using the WebworkVelocityServlet. The method he describes is mostly just to get access to the action as a Velocity object. Otherwise it would be impossible to call methods, as he described. I'm confused. Isn't the action at the top of the va

Re: [OS-webwork] Velocity Views

2003-02-07 Thread Rickard Öberg
Scott Farquhar wrote: What advantage does this have over the included WebworkVelocityServlet? He never said that he wasn't using the WebworkVelocityServlet. The method he describes is mostly just to get access to the action as a Velocity object. Otherwise it would be impossible to call methods

Re: [OS-webwork] Velocity Views

2003-02-07 Thread Scott Farquhar
What advantage does this have over the included WebworkVelocityServlet? In this model, you don't have access to the valuestack? Cheers, Scott Marco Papini wrote: I'm actually using Velocity for everything. For data retrieving, I created a generic Action class (that extends ActionSupport) which

Re: [OS-webwork] Velocity Views

2003-02-07 Thread Marco Papini
I'm actually using Velocity for everything. For data retrieving, I created a generic Action class (that extends ActionSupport) which is extended by all actions. I've placed a getAction() method that returns the action itself so it can be accessed from the velocity template as $action. For instanc

Re: [OS-webwork] Velocity Views

2003-02-07 Thread Joseph Ottinger
On Fri, 7 Feb 2003, Kelvin Tan wrote: > Interesting. > > I happen to come from the Turbine + hardcore Velocity (JSP sucks, > mostly) camp, so would be interested to know why you choose JSP + Velocity, and > not either. > Does it have anything to do with WebWork support for either? Probably has

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Rickard Öberg
Kelvin Tan wrote: Interesting. I happen to come from the Turbine + hardcore Velocity (JSP sucks, mostly) camp, so would be interested to know why you choose JSP + Velocity, and not either. Does it have anything to do with WebWork support for either? I'm currently using Velocity for about 9

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Patrick Lightbody
No, my choice of using JSP or Velocity is just how I feel that day, no real reason :) -Pat - Original Message - From: "Kelvin Tan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 10:29 PM Subject: Re: [OS-webwork] Velocity Views >

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
a la OSWorkflow) 3) use >actiong chaining > >-Pat > >- Original Message - >From: "Kelvin Tan" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 >10:11 PM Subject: Re: [OS-webwork] Velocity Views > > >> >>

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Patrick Lightbody
) use actiong chaining -Pat - Original Message - From: "Kelvin Tan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 10:11 PM Subject: Re: [OS-webwork] Velocity Views > > > On Thu, 6 Feb 2003 21:44:46 -0800, Patrick Lightbody

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
On Thu, 6 Feb 2003 21:44:46 -0800, Patrick Lightbody said: >I use both. This is a total guess, but I'd say maybe 25% use >velocity. > >-pat > So for V, do you use view logic in a separate action and action-chain, or do you just place everything in one action (business + view logic)? What about

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Patrick Lightbody
I use both. This is a total guess, but I'd say maybe 25% use velocity. -pat - Original Message - From: "Kelvin Tan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 6:01 PM Subject: Re: [OS-webwork] Velocity Views > Than

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
IL PROTECTED]> To: [EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 >5:46 PM Subject: Re: [OS-webwork] Velocity Views > > >>Not really. Velocity templates are dumb. They don't retrieve data >>to >display >>(not in the original push model at least. Turbine

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Patrick Lightbody
Yup, makes sense. Sounds like you need action chaining possibly. - Original Message - From: "Kelvin Tan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 5:46 PM Subject: Re: [OS-webwork] Velocity Views > Not really. Velocity templ

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
Not really. Velocity templates are dumb. They don't retrieve data to display (not in the original push model at least. Turbine and Scarab came up with a Pull model), they display data given to them in the context. I see Velocity templates as containing presentation logic, not view logic. Maybe I'm

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Patrick Lightbody
> I've found that its often advantageous, when working with templating engines > especially (which require two components- servlet + template), to separate view > logic (retrieval of data to display) from action logic (which actually does > something, ie modify data, etc). Wondering how WebWork sup

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
I have checked them out, but the context is no different from the stack. At some point, the objects you need have to be placed on the stack. The question is, what is the best practice for where these objects should be added? In the action? I've found that its often advantageous, when working with

Re: [OS-webwork] Velocity Views

2003-02-06 Thread Scott Farquhar
Kelvin, See the velocity examples that ship with webwork, and also compare the velocity templates (in /template/xhtml) with the JSP templates in the same directory. Velocity uses the velocity servlet, which allows the values to be looked up on the stack if they are not found in the context. Y

[OS-webwork] Velocity Views

2003-02-06 Thread Kelvin Tan
For JSP views, its simple enough to simply forward to them, since they are able to retrieve the required data to render. Velocity templates are dumb and operate on a push-basis (except for the use of velocity tools), in the sense that they require objects to be placed in the context for them. What

RE: [OS-webwork] Velocity Views

2002-12-11 Thread Aapo Laakkonen
>> From what I understand, you have to drop >> a NumberFormat object into the context. >> Should this be done at startup of the >> application? > > That's not even possible since a new context > is created for each rendering. In fact it is possible. Look at the simple example I attached to this m

Re: [OS-webwork] Velocity Views

2002-12-11 Thread Rickard Öberg
Blake Day wrote: I'm actually thinking about using Velocity for some of my views. Could anyone on the list comment on how simple things like number formatting is accomplished? From what I understand, you have to drop a NumberFormat object into the context. Should this be done at startup of the

[OS-webwork] Velocity Views

2002-12-11 Thread Blake Day
I'm actually thinking about using Velocity for some of my views. Could anyone on the list comment on how simple things like number formatting is accomplished? From what I understand, you have to drop a NumberFormat object into the context. Should this be done at startup of the application? Than