You might try this (psuedo code):
profile = data.getProfile(); rootSet = profile.getDocument().getRootSet(); rootSet.addPortlet(newPortlet); profile.store();
Jeremy Ford [EMAIL PROTECTED]
From: Nicolas MAYEUR <[EMAIL PROTECTED]> Reply-To: "Jetspeed Users List" <[EMAIL PROTECTED]> To: Jetspeed Users List <[EMAIL PROTECTED]> Subject: Adding a portlet by API Date: Tue, 24 Aug 2004 15:28:06 +0200
I would like to add a portlet on a given user action in another portlet.
How could I do this ?
I tried to do this in an action event of an action class, but nothing much changed !
public void doGo(RunData rundata, Portlet portlet) throws Exception { Portlet newPortlet = null; try { newPortlet = new JetspeedPortletFactoryService().getPortlet( "PersonPortlet", JetspeedIdGenerator.getNextPeid()); } catch (PortletException e1) { logger.error("Exception", e1); } PortletSet set = portlet .getPortletConfig().getPortletSet(); set.addPortlet(newPortlet); portlet.getPortletConfig().setPortletSet(set); }
Thanx,
Nicolas Mayeur
*** Ce message et toutes les pi�ces jointes (ci-apr�s le "message") sont �tablis � l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le d�truire et d'en avertir imm�diatement l'exp�diteur. Toute utilisation de ce message non conforme � sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'int�grit� de ce message, le groupe Itras d�cline toute responsabilit� au titre de ce message, dans l'hypoth�se o� il aurait �t� modifi�. ***
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Get ready for school! Find articles, homework help and more in the Back to School Guide! http://special.msn.com/network/04backtoschool.armx
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
