One issue that comes up with this is how to deal with escaping. This is
in fact the last hurdle for the release tonight.

With JSP tags, <ww:property> was used, and so people could write UI
components that did escaping when they needed. Doing $property doesn't
give you that option.

My thought it that we should just add a #property macro to webwork.vm
that lets you choose to escape or not.

-Pat

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Dick Zetterberg
Sent: Sunday, November 16, 2003 2:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] velocity ui tags

I think it sounds great (I am not using velocity at the moment though).
The
current solution was never meant to be the final one as far as I know. I
have a memory of Scott talking about completing the implementation to
avoid
the RequestDispatcher, so I think it's great that you've done that now.

Cheers,

Dick

----- Original Message -----
From: "Hani Suleiman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 15, 2003 9:15 PM
Subject: [OS-webwork] velocity ui tags


> I've managed to get the velocity UI tags working decently in webwork
> 1.3, this means that a requestdispatcher is not used anymore for the
ui
> components. It's about 10x faster than the old way, but for me on
Orion
> at least, it's the same speed as using the jsp ui components.
>
> I'm enclosing a patch below that should be applied to get velocity ui
> stuff working, all you have to do is apply that and add
> webwork.ui.templateSuffix=vm
>   to your webwork.properties.
>
> What's the feeling on committing this? It does have a small hack
> (checking explicitly for .vm), but on the whole isn't too bad. Since
> there was a bit of controversy regarding when it came up the last time
> around I thought I'd ask first before committing. If nobody responds
> with any yay or nays, I'll commit in a day or two.
>
> --- src/main/webwork/view/taglib/ui/ComponentTag.java   9 Feb 2003
> 18:56:01 -0000       1.15
> +++ src/main/webwork/view/taglib/ui/ComponentTag.java   15 Nov 2003
> 20:10:38 -0000
> @@ -7,12 +7,14 @@
>   package webwork.view.taglib.ui;
>
>   import org.apache.commons.logging.*;
> +import org.apache.velocity.context.Context;
>   import webwork.config.Configuration;
>   import webwork.util.ContainUtil;
>   import webwork.util.BeanUtil;
>   import webwork.view.taglib.IncludeTag;
>   import webwork.view.taglib.ParamTag;
>   import webwork.view.taglib.WebWorkBodyTagSupport;
> +import webwork.view.velocity.VelocityHelper;
>
>   import javax.servlet.jsp.JspException;
>   import javax.servlet.jsp.JspTagException;
> @@ -172,7 +174,13 @@
>             String templatePath = "/" + getTemplateDir() + "/" +
> getTheme() + "/" + template;
>             if (log.isDebugEnabled())
>               log.debug("Using template:" + templatePath);
> -         IncludeTag.include(templatePath, pageContext);
> +         if(templatePath.endsWith(".vm"))
> +         {
> +           Context c =
> VelocityHelper.getContext(pageContext.getServletContext(),
> pageContext.getRequest(), pageContext.getResponse());
> +           VelocityHelper.merge(c, templatePath,
pageContext.getOut());
> +         }
> +         else
> +           IncludeTag.include(templatePath, pageContext);
>            return EVAL_PAGE;
>         } catch (Exception e) {
>            throw new JspTagException("Including component failed:" +
> toString(e));
>
>
>
> -------------------------------------------------------
> This SF. Net email is sponsored by: GoToMyPC
> GoToMyPC is the fast, easy and secure way to access your computer from
> any Web browser or wireless device. Click here to Try it Free!
>
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to