[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jetspeed-user
Subject:    Re: [Jetspeed 2] Process Action
From:       David Sean Taylor <david () bluesunrise ! com>
Date:       2004-12-30 19:23:37
Message-ID: 41D455B9.9070600 () bluesunrise ! com
[Download RAW message or body]

LOMBART Christophe wrote:
> I'm using the GenericVelocityPortlet and I want to change the velocity template in \
> the processAction method. Since the processAction in the GenericServletPortlet is \
> not complete (see @task in the code), I'm just wondering what should be the best \
> way to select another template when processing some actions. 
> This problem should be the same for other portlet types (jsp, jsf, ...).
> 

The base class, GenericServletPortlet checks for the view page as a 
request attribute:

String reqViewPage = (String) request.getAttribute(PARAM_VIEW_PAGE);

Which doesn't do you any good since attributes are not passed from 
action to render phase.

We could propose changing the GenericServletPortlet to look at a render 
parameter, and then in your action you would call setRenderParameter.

Also take a look at the GenericFrameworkPortlet which nicely abstracts 
the concept of multiple views per portlet.

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic