Hi,

I'm not sure if that is possible actually. The question is how would you render 
the JSP template to
a String which the Panel can return. If you know of a way you can create a 
custom Panel to achieve
that. One route might be to create a custom HttpServletResponse using a 
ByteArray which you then
forward to the container's JSP engine. Once it returns the byteArray should 
contain the content.

Bob


On 2011/03/03 04:14 AM, Ari wrote:
> Minor corrections to my own question...
> 
> 1) userLinks is a List<PageLink>, not an array.
> 
> 2) I've overridden the Panel's getTemplate(), not the Page's.  The page 
> merely includes the Panel
> like any other component.
> 
> Thanks again for any suggestions as to what might be wrong.
> 
> Ari
> 
> On Wed, Mar 2, 2011 at 4:40 PM, Ari <[email protected] 
> <mailto:[email protected]>>
> wrote:
> 
>     Hi,
> 
>     I wondered if someone might have a working example of a Panel being used 
> with a JSP as its view
>     template.  JSPs work ok for me with regular Click Pages, but when I try 
> to use a Panel, I get
>     errors of this nature:
> 
>     [Click] [error] Velocity: Parser Exception:
>     
> /mypath/mypanel-template.jsporg.apache.velocity.runtime.parser.ParseException:
>  Encountered
>     ":length(userLinks)}\n<div>
> 
>     userLinks is an Array<PageLink> which I've defined in my Panel.java 
> subclass, and am referencing
>     in the JSP as shown in the error, so it is reaching the JSP.  But it 
> seems like Click is trying
>     to interpret the template as Velocity instead of JSP, even though I've 
> overridden the Page's
>     getTemplate() method to return a jsp file name (as demonstrated by the 
> fact that it reaches the
>     jsp!).
> 
>     Any advice or examples would be much appreciated.
> 
>     Thanks,
>     Ari
> 
> 

Reply via email to