Announcement Announcement Module
Collapse
No announcement yet.
Using XSLT with Spring Web Flow Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using XSLT with Spring Web Flow

    Does anyone know how to use XSLT to render a page in Spring Web Flow? There is a way we can do it using AbstractXSLTView in Spring MVC, is there something similar in SWF where I can use view states to look up the XSLT source or the translet to render the HTML. Can someone please help!!

  • #2
    Hello,

    you can use your XSLT view like in Spring MVC (if you are running SWF inside Spring MVC). SWF is *just* a controller inside the Spring MVC stack, so you can use the ViewResolvers and View from the Spring MVC framework.

    regards
    agim

    Comment


    • #3
      If I use Spring MVC's Abstract XSLT view, I will end up hard coding my View Names in the class that I extend AbstractXSLTView.

      I would have to do return new ModelAndView("viewName", map);

      This way I am hardcoding my navigation into my class files and cannot use the SWF transition. This is what I want to avoid doing.

      Thanks.

      Comment


      • #4
        Here's how to use XSLT views with SWF

        Attached is a description of a solution which works.

        I have been puzzling about this for some time. Although documentation for Spring MVC covers using XSLT views in enough detail, SWF is rather different in the way the model is handled and further documentation is definitely required. My attached example might form a basis.

        Comment


        • #5
          XSLT View Resolver issue with SWF

          Thank you for posting the solution to use XSLT with SWF. I am trying to follow steps you have posted in your attachment for using XSLT based views using SWF. I am getting the following exception. Any clues? For some reason, the Webflow view resolver doesn't seem to recognize the XSLTViewResolver or ResourceBundleViewResolver specified in the context file. I have attached the application context and flow xml file for your reference. Please clarify....


          java.lang.IllegalArgumentException: Unsupported view type /WEB-INF/page1 only types supported by this FlowViewResolver implementation are [.jsp] and [.jspx]
          org.springframework.webflow.mvc.builder.FlowResour ceFlowViewResolver.getViewInternal(FlowResourceFlo wViewResolver.java:94)
          org.springframework.webflow.mvc.builder.FlowResour ceFlowViewResolver.resolveView(FlowResourceFlowVie wResolver.java:72)
          org.springframework.webflow.mvc.view.AbstractMvcVi ewFactory.getView(AbstractMvcViewFactory.java:80)
          org.springframework.webflow.engine.ViewState.resum e(ViewState.java:193)
          org.springframework.webflow.engine.Flow.resume(Flo w.java:545)
          org.springframework.webflow.engine.impl.FlowExecut ionImpl.resume(FlowExecutionImpl.java:259)
          org.springframework.webflow.executor.FlowExecutorI mpl.resumeExecution(FlowExecutorImpl.java:163)
          org.springframework.webflow.mvc.servlet.FlowHandle rAdapter.handle(FlowHandlerAdapter.java:183)
          org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:875)
          org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:807)
          org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:571)
          org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:501)
          javax.servlet.http.HttpServlet.service(HttpServlet .java:693)
          javax.servlet.http.HttpServlet.service(HttpServlet .java:806

          Comment

          Working...
          X