> I seem to remember attempting to use > data.getRequest().setAttribute(JspPortlet.TEMPLATE, template) to achieve > per-request scope but I ran into problems. If I remember correctly, with > multiple JspPortlets on the same page, overriding template this way > changed > the template for ALL JspPortlets. Isn't the request object shared between > all instances of JspPortlet on single pane whereas each VelocityPortlet > gets > its own context object? Please set me straight on that.
Yes, all VelocityPortlets get their own context. I am going try using HashMap request attribute "templateMap" keyed by portlet id to overcome this. I am also going attempt break the template logic into a single, separate component that can be used by VelocityPortlets and JspPortlets. That way when changes happen, the impact on both types of portlets will be more apparent. I think I am one of those rare exceptions that use both Velocity AND jsp portlets. Scott > -----Original Message----- > From: Mark Orciuch [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 06, 2003 2:06 PM > To: Jetspeed Developers List > Subject: RE: Question about JspAction > > > > > Yup, it works ;) > > > > Cool, I'll make the change and un-deprecate the original method signature. > > > 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 seem to remember attempting to use > data.getRequest().setAttribute(JspPortlet.TEMPLATE, template) to achieve > per-request scope but I ran into problems. If I remember correctly, with > multiple JspPortlets on the same page, overriding template this way > changed > the template for ALL JspPortlets. Isn't the request object shared between > all instances of JspPortlet on single pane whereas each VelocityPortlet > gets > its own context object? Please set me straight on that. > > > 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. > > > > I agree. You can log that as an enhancement in Bugzilla. > > Best regards, > > Mark Orciuch - [EMAIL PROTECTED] > Jakarta Jetspeed - Enterprise Portal in Java > http://jakarta.apache.org/jetspeed/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
