Announcement Announcement Module
No announcement yet.
Using XSLT with Spring Web Flow Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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

    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.



    • #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.



      • #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.


        • #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
          org.springframework.webflow.mvc.builder.FlowResour ceFlowViewResolver.resolveView(FlowResourceFlowVie
          org.springframework.webflow.mvc.view.AbstractMvcVi ewFactory.getView(
          org.springframework.webflow.engine.ViewState.resum e(
          org.springframework.webflow.engine.impl.FlowExecut ionImpl.resume(
          org.springframework.webflow.executor.FlowExecutorI mpl.resumeExecution(
          org.springframework.webflow.mvc.servlet.FlowHandle rAdapter.handle(
          org.springframework.web.servlet.DispatcherServlet. doDispatch(
          org.springframework.web.servlet.DispatcherServlet. doService(
          org.springframework.web.servlet.FrameworkServlet.p rocessRequest(
          org.springframework.web.servlet.FrameworkServlet.d oGet(
          javax.servlet.http.HttpServlet.service(HttpServlet .java:693)
          javax.servlet.http.HttpServlet.service(HttpServlet .java:806