Author: tmjee Date: Wed Jun 14 06:48:08 2006 New Revision: 414249 URL: http://svn.apache.org/viewvc?rev=414249&view=rev Log: - added javadoc & snippet to reflect the fact that if JSP template is being used, it should resides in the webapp not the classpath as JSP is not capable of being picked up from classpath unlike Freemarker or Velocity
see http://forums.opensymphony.com/thread.jspa?threadID=33869&tstart=0 Modified: struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/GenericUIBean.java Modified: struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/GenericUIBean.java URL: http://svn.apache.org/viewvc/struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/GenericUIBean.java?rev=414249&r1=414248&r2=414249&view=diff ============================================================================== --- struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/GenericUIBean.java (original) +++ struts/action2/trunk/core/src/main/java/org/apache/struts/action2/components/GenericUIBean.java Wed Jun 14 06:48:08 2006 @@ -47,6 +47,7 @@ * <!-- START SNIPPET: example --> * JSP * <a:component template="/my/custom/component.vm"/> + * * or * * <a:component template="/my/custom/component.vm"> @@ -63,8 +64,30 @@ * #param( "key1" "value1" ) * #param( "key2" "value2" ) * #end + * + * Freemarker + * <@saf.component template="/my/custom/component.ftl" /> + * + * or + * + * <@saf.component template="/my/custom/component.ftl"> + * <@saf.param name="key1" value="value1" /> + * <@saf.param name="key2" value="value2" /> + * </@saf.component> + * * <!-- END SNIPPET: example --> * </pre> + * + * <p/> + * + * <b>NOTE:</b> + * <!-- START SNIPPET: note --> + * + * If Jsp is used as the template, the jsp template itself must lie within the + * webapp itself and not the classpath. Unlike Freemarker or Velocity, JSP template + * could not be picked up from the classpath. + * + * <!-- END SNIPPET: note --> * * @a2.tag name="component" tld-body-content="JSP" tld-tag-class="org.apache.struts.action2.views.jsp.ui.ComponentTag" * description="Render a custom ui widget"