In one of the Jetspeed demo portlets there is one portlet where you can add new portlets. You can look at that code to get an idea of how that is accomplished. If I'm not mistaken if you get the distribution Jetspeed war...login in as admin, jetspeed, navigate to the Admin tab there is a portlet called "Portlet Browser" which can be used to add portlets.
-----Original Message----- From: Nicolas MAYEUR [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 8:28 AM To: Jetspeed Users List Subject: Adding a portlet by API 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
