On 3/12/07, Enrique Perez <[EMAIL PROTECTED]> wrote:
I think you can create an action URL in *portletB* (with the method "createActionURL" in the "RenderResponse" object). Set the parameters you want for this portlet when it'd be invoked (portlet mode and window state):PortletURL portletB_URL = response.createActionURL(); portletB_URL.setPortletMode(PortletMode.EDIT); portletB_URL.setWindowState(WindowState.NORMAL); ... and then propagate the actionURL object created to all the portlets in the application as an attribute session (with APPLICATION_SCOPE): request.getPortletSession().setAttribute("portletB_URL", portletB_URL, PortletSession.APPLICATION_SCOPE); Once you have done this, you can retrieve the portletB_URL object from *portletA*: PortletURL portletB_URL = (PortletURL) request.getPortletSession().getAttribute("portletB_URL", PortletSession.APPLICATION_SCOPE); so you can use it as target for a link or a form: <FORM ACTION=\""+portletB_URL.toString()+"\" METHOD=\"post\"> I've never checked this code but I think it might work... =D Hope that helps.
I'm not sure, but I don't think that portlet URLs (especially action URLs) are meant to be used in this manner (ie. shared amongst portlets). If this does indeed work, I would think you would be exploiting something specific to the Jetspeed implementation. If I am wrong, someone please correct me. What I would think you would do instead is this: 1. In portlet A, you display an ACTION url, say called "show add". 2. In processAction for portlet A, you set a portlet session attribute that is PORTLET_APPLICATION in scope, perhaps called "SHOW_ADD" and set it to true. 3. in doView for portlet B, you are always check to see if there is a portlet session attribute called "SHOW_ADD". If true, then you display the add interface. The action phase for the invoked URL is always processed before the render of any portlets on the page, so your session attribute will be guaranteed to have a value when portlet B checks for it. -aaron --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
