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