Hi,
I've created an action which extends from VelocityPortletAction. The template is
test.vm and it's located in templates/vm/portlets/html/irportal/. It's working fine
except that in the event of exception, it's supposed to call ShowError.vm (located in
templates/vm/screens/html/) but instead it's still displaying test.vm. >From the
printout on the console, I can see that it's correctly fetching ShowError from TR.p
but why is it not displaying it? Any advise is greatly appreciated :)
The code is as follows:
protected void buildNormalContext(VelocityPortlet portlet, Context context, RunData
rundata) {
try {
........ // some processing codes
}
catch (Exception e) {
Log.error(e);
rundata.setMessage("Error in Submit Resources: " + e.toString());
rundata.setStackTrace(org.apache.turbine.util.StringUtils.stackTrace(e),
e);
System.out.println("template = " +
JetspeedResources.getString("template.error"));
rundata.setScreenTemplate(JetspeedResources.getString("template.error"));
}
}
Thanks in advance!
Cheers,
Andy