This is why I think all templating portlet functions should be commonly held in something like the MVCPortlet I've proposed. (http://www.kuebler.org/MVCPortlet/MVCPortlet.html) Actions, templates, etc should be handled the same way for all, which to me means a common portlet doing the handling.


-tk


At 01:53 PM 3/6/2003 -0500, Weaver, Scott wrote:
Yup, it works ;)

In the same vein...

I have also noticed inconsistencies between the VelocityPortlet and JspPortlet in terms of overriding the template. VelocityPortlet uses a per request template override via Context, which is initialized every request. On the other hand JspPortlet is using per-session template override via PortletSessionState.setAttribute. This kind of threw when I restored from by custom jsp portlet customizer and the customize screen was there instead of the default template that, IMOHO, should have been there.

I think it should be decided on which way this should work for all types of template-based portlets, either per-request or per-session. It could easily work both ways depending on the portlet developer's intention by allowing the developer to specify a "template.override.ttl" in the registry on a per-portlet basis. Values could be either "request" or "session" and should default to "request" as it is what most developers will be used to.

My $0.02,
Scott



> -----Original Message-----
> From: Mark Orciuch [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 06, 2003 1:39 PM
> To: Jetspeed Developers List
> Subject: RE: Question about JspAction
>
> Scott,
>
> Either I didn't think about doing it this way OR it didn't work (I don't
> remember now but most likely I didn't think about it). Have you tried
> using
> your method? It seems that it should work though...
>
> Best regards,
>
> Mark Orciuch - [EMAIL PROTECTED]
> Jakarta Jetspeed - Enterprise Portal in Java
> http://jakarta.apache.org/jetspeed/
>
> > -----Original Message-----
> > From: Weaver, Scott [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 06, 2003 12:29 PM
> > To: 'Jetspeed Developers List'
> > Subject: Question about JspAction
> >
> >
> > Why was setTemplate(RunData data, String template) deprecated and
> > public void setTemplate(RunData data, Portlet portlet, String template)
> > added?  The same functionality could have been achieved like this
> > with out deprecating the existing method signature and adding a new one:
> >
> > public void setTemplate(RunData data, String template)
> > {
> >   Portlet portlet = (Portlet) data.getRequest().getAttribute("portlet");
> >   if(template != null)
> >   {
> >     PortletSessionState.setAttribute(portlet, data,
> > JspPortlet.TEMPLATE,
> >     template);
> >   }
> >   else
> >   {
> >     PortletSessionState.clearAttribute(portlet, data,
> > JspPortlet.TEMPLATE);
> >   }
> >
> > }
> >
> > The Portlet is ALWAYS placed in the request by the
> > JspPortlet.getContent() prior ActionLoader.exec().  Is there
> > something I am missing here that is blatantly obvious?  Is there
> > a chance that JspAction.setTemplate() is invoked prior to
> > JspPortlet.getContent()?
> >
> > Thanks,
> > Scott
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to