11 Replies Latest reply on Oct 27, 2008 6:51 AM by M Chan

    Page level communication on JSR286 portlets

    M Chan Newbie

      Hi, I am using the bundled version of JBP 2.7 CR.1. And have been trying out event publishing / processing. However, it seems that one event could not be published from one portal page to another. The following is the code snippet of process action:

      
       public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException {
      
       QName qName = new QName("test.events", "TestEvent", "test");
       log.info("Qname namespace: " + qName.getNamespaceURI());
       log.info("Qname localpart: " + qName.getLocalPart());
       log.info("The Qname object: " + qName);
       String value1 = (String)request.getParameter("value1");
       String value2 = (String)request.getParameter("value2");
       log.info("v1: " + value1 + " v2: " + value2);
      
       TestEvent testEvent = new TestEvent();
       testEvent.setTestValue1(value1);
       testEvent.setTestValue2(value2);
       log.info("now publishing events...");
       response.setEvent(qName, testEvent);
       response.sendRedirect("/portal/test/page2");
       }