What I did to get around buildNormalContext() changing my context values, was
to add the following to the beginning of the buildNormalContext method:

protected void buildNormalContext(VelocityPortlet portlet, Context context,
                        RunData rundata) throws Exception {
    if
(getTemplate(context).toString().equals(PortletConfigState.getConfigParameter(
portlet, "template", "")))
    {
        [...]

I am assuming you call doProcess from a diffent template as the one originally
loaded by the portlet. I don't know if it's the best way, but it works hehe.

Hope it helps
Regards
Ruy
        

--- "Peter F." <[EMAIL PROTECTED]> wrote:

> Hello All,
> 
> I have my action class extended from VelocityPortletAction.
> 
> It has method doProcess(Rundata rundata, Context context) which process some
> user
> input. And I want to store some data to be displayed then on VM-page.
> 
> I used the following: context.put("key", myData);
> 
> But this doesn't work. As I found, After that method
> buildNormalContext(VelocityPortlet portlet, Context context, RunData
> rundata) is invoked and this method get QUITE DIFFERENT context
> object. Does that make sense ? Or I'm wrong ?
> 
> And what is the best way to store some data into 'context' from my
> doProcess(...) method to get access to them later in VM-template ?
> 
> 
> 
> 
> -- 
> Best regards,
>  Peter                          mailto:[EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



                
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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

Reply via email to