[Image] EchoPoint
Helping you build truly dynamic and stateful web applications!

JspTemplatePanel   Click here for complete JavaDoc

The JspTemplatePanel component allows a JSP page to be used as a template to contain other echo components.

Components are added to the panel with a "constraints" name.  The JSP markup itself canb use a special tag inside (that uses the constraints name) to indicate where the embedded component should be rendered within the JSP.

This special taglib takes the form <app:echoComp name="namevalue">

Also a JspBeanGenerator interface can be used to allow custom JSP output to be generated.  The JspBeanGenerator object is called to generate an value.  The JspBeanGenerator is added using Request scope and hence can be called in the form <%= request.getAttribute("namevalue") %>

The actual JSP markup template will be compiled using the standard application server JSP capbilities and hence will run very fast after the initial request.

It is fully discuss in the article Using The HtmlTemplatePanel and JspTemplatePanel Components.


jspComp =
new JspTemplatePanel("/jsp/jsp_example.jsp");

// bean is put in request scope with this name

this, "jsp_example_bean");

// The name jsplabel will be used
//by the JSP/tag to identify

// and render this component
// within the JSP.

new Label("A Label"), "jsplabel)");


JSP Template Source


<!-- This bean was passed in by the JspComponent -->
<b>A time string is passed by Echo as a bean from
the JspComponent and rendered using JSTL:</b>
<%= request.getAttribute("jsp_example_bean") %>

<!-- This Label Component was created in echo and
added as child of this JspComponent -->
<app:echoComp name="jsplabel"/>

Client Browser Support :

All clients supported by the Echo Framework.


SourceForge Logo

The EchoPoint project is kindly hosted by SourceForge