Announcement Announcement Module
Collapse
No announcement yet.
Idea for SWF/Tapestry integration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Idea for SWF/Tapestry integration

    I've just started reading about Tapestry which looks like a really cool framework. Only problem is I want to use SWF too ! I heard there's an integration coming, but meanwhile I had a thought about a quick way to make them work together:

    public class TapestryFlowController extends FlowController {

    private IEngine engine;

    public void setEngine(IEngine engine) { this.engine=engine; }

    public void afterPropertiesSet()
    {
    super.afterPropertiesSet();
    ((Map)engine.getGlobal()).put (
    "FlowExecutionManager",getFlowExecutionManager ());
    }

    protected ModelAndView handleRequestInternal(HttpServletRequest request,
    HttpServletResponse response) throws Exception
    {
    engine.service( new ServletWebRequest(request,response), new
    ServletWebResponse(response));
    return null;
    }
    }

    This assumes that it's possible to configure and inject an "IEngine" object using Spring configuration files, rather than the HiveMind configuration files which Tapestry's ApplicationServlet uses. Could be a bit tricky, and I haven't looked into it yet. But if it was possible, we could copy the following lines into a class pasted from ListenerMethodInvokerImpl, and inject it into the engine via it's "infrastructure.listenerMapSource" propery:

    if (methodResult instanceof Event)
    {
    FlowExecutionManager f = (FlowExecutionManager)
    ((Map)(cycle.getEngine().getGlobal())).get("FlowEx ecutionManager");
    try { cycle.activate( cycle.getPage( f.onEvent((Event)
    methodResult).getViewName())); return; }
    catch (Exception ex) { /* TODO */ }
    }

    This means that the Tapestry listener, instead of returning a Tapestry page, could return a SWF event which gets mapped to a Tapestry page (view) by the flow definition. The next step would be working out how to get Tapestry to access the flow scope. And then there's also the problem that the getGlobal method is deprecated, so the FlowExecutionManager should really be held somewhere else.

    Has anyone tried anything like this ? Could it work ? Has anyone tried configuring a Tapestry engine using Spring instead of HiveMind ?
    Last edited by ibw; Nov 11th, 2005, 01:01 PM.

  • #2
    I was also having some similar kind of problems. While searching I came to find out a very good company: Technosoft solutions. They deal in Tapestry. As they provide free technical consultancy also I was able to gather quite a lot of info from them.

    If you want you can visit their website and get more info or perhaps contact them at:
    http://www.techno-soft.com/index.php?/request-rfp

    I hope this helps...

    Comment

    Working...
    X