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

List:       jetspeed-user
Subject:    Re: Persisting Portlet's Params Programmatically
From:       "Tim O'Donnell" <timo () verity ! com>
Date:       2003-04-29 16:10:57
[Download RAW message or body]

Hi Scott,

Thanks for the advice. It worked like a champ! Can't tell ya what a 
relief it is to wake up this morning and have that working. 'Twas a 
LONG night. =)

Thanks again,

-Tim

On Tuesday, April 29, 2003, at 06:44  AM, Weaver, Scott wrote:

> Tim,
>
> Instead of directly using the PortletInstance, try using 
> PortletConfigState.setInstanceParameter().
>
> hth,
> *===================================*
> * Scott T Weaver                    *
> * Jakarta Jetspeed Portal Project   *
> * weaver@apache.org                 *
> *===================================*
>  
>
>
>> -----Original Message-----
>> From: Tim O'Donnell [mailto:timo@verity.com]
>> Sent: Tuesday, April 29, 2003 5:21 AM
>> To: jetspeed-user@jakarta.apache.org
>> Subject: Persisting Portlet's Params Programmatically
>>
>> Hi all,
>>
>> My apologies if this came through already -- having email troubles
>> tonight.
>>
>> I'm looking to mimic the functionality of the portlet's customize page
>> from within the portlet's action class. For example, if we have a 
>> basic
>> stock quote portlet, I want to be able to set (and persist to psml) 
>> the
>> stocks to list from within the portlet's action class -- not the
>> customizer screen. The question I have is, how is this accomplished
>> programmatically? None of the "setInitParameter/setParameter" methods
>> seem to actually persist the new values to psml like the customizer
>> screen does.
>>
>> I looked at the CustomizeAction class and saw the following:
>>
>> PortletInstance instance = PersistenceManager.getInstance(p, rundata);
>> ...
>> instance.setAttribute(name,newValue);
>> ...
>> ((JetspeedRunData) rundata).getCustomizedProfile().store();
>>
>> However, that doesn't seem to work either (NPE on the last line) when
>> using it within the action class. What's the proper way of
>> accomplishing this?
>>
>> Much thanks for any advice!
>>
>> -Tim
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


---------------------------------------------------------------------
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