portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weaver, Scott" <Swea...@rippe.com>
Subject RE: Question about JspAction
Date Thu, 06 Mar 2003 18:53:00 GMT
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:mark_orciuch@yahoo.com]
> 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 - morciuch@apache.org
> Jakarta Jetspeed - Enterprise Portal in Java
> http://jakarta.apache.org/jetspeed/
> 
> > -----Original Message-----
> > From: Weaver, Scott [mailto:Sweaver@rippe.com]
> > 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: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message