taylor 01/06/04 00:46:23
Modified: src/java/org/apache/jetspeed/portal/portlets
VelocityPortlet.java
Log:
updated VelocityPortlet to use template locator
Revision Changes Path
1.3 +5 -1
jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/VelocityPortlet.java
Index: VelocityPortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/VelocityPortlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- VelocityPortlet.java 2001/05/31 17:11:07 1.2
+++ VelocityPortlet.java 2001/06/04 07:46:23 1.3
@@ -64,6 +64,7 @@
import org.apache.jetspeed.portal.Portlet;
import org.apache.jetspeed.portal.portlets.AbstractPortlet;
import org.apache.jetspeed.portal.PortletException;
+import org.apache.jetspeed.services.Profiler;
// Ecs stuff
import org.apache.ecs.ConcreteElement;
@@ -136,7 +137,10 @@
try
{
- s = TurbineVelocity.handleRequest(context, "portlets/" + template +
".vm");
+ if (-1 == template.indexOf(".vm"))
+ template = template + ".vm";
+ String templatePath = Profiler.locatePortletTemplate(rundata, template);
+ s = TurbineVelocity.handleRequest(context, templatePath);
}
catch( Exception e)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]