Announcement Announcement Module
Collapse
No announcement yet.
portlet webflow with portlet2.0 events Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • portlet webflow with portlet2.0 events

    Does anyone have an example of using portlet 2.0 events with spring webflow 2.1 and spring 3.x? I am trying trying to convert some portlets that use spring 3.0.5 with annotated controllers to webflow portlets while keeping the inter-portlet communication. so far ive just converted the controllers to service classes and all appears to be well but i dont see a way to use events.

    i was happy using portlet MVC without webflow but it appears that i need the conversation support to support multiple browser tabs.


    Thank you,
    montgomery

  • #2
    Hi,

    I'm working on something similar.

    To fire portlet-events from a webflow, I use a Custom-Action:
    Code:
    package myPackage;
    
    import javax.portlet.ActionResponse;
    import javax.xml.namespace.QName;
    
    import org.springframework.webflow.execution.Action;
    import org.springframework.webflow.execution.Event;
    import org.springframework.webflow.execution.RequestContext;
    
    public class FireCreateAccountEvent implements Action {
    /**
     * Fires portlet 2.0 event to initialize CreateAccount
     */
    	public Event execute(RequestContext context) throws Exception {
    		
    		System.out.println("Fire Account Event");
    		ActionResponse response = (ActionResponse) context.getExternalContext().getNativeResponse();
    		response.setEvent(new QName("http://myDomain/events", "x:showCreateAccount"), "");
    		return new Event(this ,"success");
    	}
    
    }
    Now, I'm looking for a solution to start Webflows based on a Event, I think, I have to modify the ViewFlowHandler-Bean, but I don't know how at tihs time.

    Regards,
    Michael

    Comment

    Working...
    X