You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Jack Axaopoulos <ja...@cisco.com> on 2002/01/23 01:06:45 UTC

Velocity Action overriding layouts?

Is it possible for a Velocity action which is called
to override which layout will be used?

I noticed that RunData implements setLayoutTemplate(),
but it doesn't seem to be used anywhere.

Here is what i'm trying to accomplish.

Say a user fills in some form data, but there is an error,
and you want to display the exact same form
but with a new error message being shown above the form in red.

I was hoping to dynamically switch to an ErrorMessageLayout.vm
which simply adds a $UserErrorMessage variable and contains
$screen_placeholder where the original screen/form would appear.

What is a typical Velocity pattern for handling this?


Im using Turbine 2.1 and Velocity 1.2.

Regards,

J


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


Re: Velocity Action overriding layouts?

Posted by Denis <ji...@respublica.fr>.
Jack,
You should be able to get an answer to this question on the Turbine 
User list. Velocity doesn't deal with things such as RunData and 
screens.

Cheers,
-- Denis.

On Wednesday, January 23, 2002, at 12:06  am, Jack Axaopoulos wrote:

>
> Is it possible for a Velocity action which is called
> to override which layout will be used?
>
> I noticed that RunData implements setLayoutTemplate(),
> but it doesn't seem to be used anywhere.
>
> Here is what i'm trying to accomplish.
>
> Say a user fills in some form data, but there is an error,
> and you want to display the exact same form
> but with a new error message being shown above the form in red.
>
> I was hoping to dynamically switch to an ErrorMessageLayout.vm
> which simply adds a $UserErrorMessage variable and contains
> $screen_placeholder where the original screen/form would appear.
>
> What is a typical Velocity pattern for handling this?
>
>
> Im using Turbine 2.1 and Velocity 1.2.
>
> Regards,
>
> J
>
>
> --
> To unsubscribe, e-mail:   <mailto:velocity-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:velocity-user-
> help@jakarta.apache.org>
>


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