You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by tim <ti...@timodonnell.com> on 2003/04/29 11:17:43 UTC

Persisting Portlet's Params Programmatically

Hi all,

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