Announcement Announcement Module
Collapse
No announcement yet.
SWF-Tiles-Ajax Partial Rendering Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SWF-Tiles-Ajax Partial Rendering

    Is there a way to partial rend a web page using Spring Web Flow. I have tried several different ways and cannot seem to get it to work. I am using titles. My configuration is as follows;

    --------------------------------------------------------------------------------------------------
    (-servlet.xml file)

    <!-- FLOW HANDLER ADAPTER -->
    <bean class="org.springframework.webflow.mvc.servlet.Flo wHandlerAdapter">
    <property name="flowExecutor" ref="flowExecutor" />

    <!-- FLOW HANDLER MAPPING: -->
    <bean class="org.springframework.webflow.mvc.servlet.Flo wHandlerMapping">
    <property name="flowRegistry" ref="flowRegistry"/>
    <property name="order" value="-1"/>
    </bean>

    <!-- FLOW REGISTRY -->
    <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
    <webflow:flow-location id="checkOut" path="/WEB-INF/flows/checkOut/checkOut-flow.xml" />
    </webflow:flow-registry>

    <!-- FLOW BUILDER SERVICE -->
    <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="mvcViewFactoryCreator"/>

    <bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.Mvc ViewFactoryCreator">
    <property name="viewResolvers" ref="tilesViewResolver"/>
    </bean>

    <!-- FLOW EXECUTOR -->
    <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry"/>

    <!--TILES CONFIGURE -->
    <bean id="tilesViewConfigurer" class="org.springframework.web.servlet.view.tiles2 .TilesConfigurer">
    <property name="definitions" value="/WEB-INF/courseRegistration-tiles.xml"/>
    </bean>

    <!-- TILES RESOLVER -->
    <bean id="tilesViewResolver" class="org.springframework.js.ajax.AjaxUrlBasedVie wResolver">
    <property name="viewClass" value="org.springframework.webflow.mvc.view.FlowAj axTilesView"/>
    <property name="order" value="1"/>
    </bean>

    ------------------------------------------------------------------------------------------------------
    (Course Registration Tiles - courseRegistratio-tiles.xml)

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
    <tiles-definitions>

    <definition name="standardLayout" template="/WEB-INF/jsp/templates/wrcThreeColumn.jsp">
    <put-attribute name="sectionNavigation" value="/WEB-INF/jsp/templates/defaultSectionNavigation.jsp" />
    <put-attribute name="body" value="/WEB-INF/jsp/templates/defaultBody.jsp" />
    <put-attribute name="aside" value="/WEB-INF/jsp/templates/defaultAside.jsp" />
    </definition>

    <definition name="displaySelectedCourses" extends="standardLayout">
    <put-attribute name="body" value="/WEB-INF/jsp/checkOutViews/displaySelectedCourses.jsp" />
    </definition>

    </tiles-definitions>
    -----------------------------------------------------------------------------------------------------
    (wrcThreeColumn.jsp)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <!-- Include statement needs to be on the second line for I.E. to work -->
    <%@ page pageEncoding="UTF-8" %>
    <%@ include file="/WEB-INF/jsp/templates/include.jsp" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>University of Utah and University Health Care</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Expires" content="-1"/>
    <meta http-equiv="Content-Language" content="pl"/>
    <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, Post-Check=0, Pre-Check=0"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />

    <!-- Java Script Files -->
    <script type="text/javascript" src="<c:url value="/resources/dojo/dojo.js" />"></script>
    <script type="text/javascript" src="<c:url value="/resources/spring/Spring.js" />"></script>
    <script type="text/javascript" src="<c:url value="/resources/spring/Spring-Dojo.js" />"></script>

    <!-- Style Sheet Files -->
    <link type="text/css" rel="stylesheet" href="<c:url value="/resources/dijit/themes/tundra/tundra.css"/>"></link>
    <link type="text/css" rel="stylesheet" href="<c:url value="/resources/styles/templates/wrcThreeColumnLayout.css"/>"></link>
    <link type="text/css" rel="stylesheet" href="<c:url value="/resources/styles/templates/wrcThreeColumnStyles.css"/>"></link>



    </head>
    <body>
    <div id="container">
    <div id="header">
    <h1>Site name</h1>
    </div>
    <div id="navigation">
    <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Services</a></li>
    <li><a href="#">Contact us</a></li>
    </ul>
    </div>
    <div id="content-container">
    <div id="section-navigation">
    <tiles:insertAttribute name="sectionNavigation" />
    </div>
    <div id="content">
    <h2>Available Classes</h2>
    <tiles:insertAttribute name="body" />
    </div>
    <div id="aside">
    <h3>
    Aside heading
    </h3>
    <tiles:insertAttribute name="aside" />
    </div>
    <div id="footer">

    </div>
    </div>
    </div>
    </body>
    </html>
    ---------------------------------------------------------------------------------------------------------
    (checkOut-flow.xml)

    <flow xmlns="http://www.springframework.org/schema/webflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/webflow
    http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

    <view-state id="displaySelectedCourses">
    <transition on="nextForm" to="requestPersonalInfo"/>
    </view-state>


    <view-state id="requestPersonalInfo">
    <transition on="nextForm" to="displayPaymentRequest" />
    </view-state>

    </flow>
    ---------------------------------------------------------------------------------------------------

    When you enter the url http://..... checkOut.html it refreshes the complete page. How can I get it to just refresh the body part of the page?

  • #2
    Information about the subject:

    I found the following information about the issue. Not a solution at this point, however.

    http://stackoverflow.com/questions/3...or-async-flows

    Comment


    • #3
      This might work; however, I am not sure if I have to do it with each WebFlow entry.

      http://forum.springsource.org/showth...tiles-fragment

      Comment


      • #4
        https://jira.springsource.org/browse/SWF-660

        Comment

        Working...
        X