Announcement Announcement Module
No announcement yet.
Webflow returns full page instead of tiles fragment Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Webflow returns full page instead of tiles fragment

    Dear Forum,

    I'm trying to get a demo webflow/tiles application to render a tiles fragment, but without success. Basically, instead of getting a fragment response, the full page is returned to the browser. As I understand it, this usually occurs if the request is NOT made using ajax, but looking at firebug, the request is being made as an ajax request.

    I've created as simple a demo as possible - a template contains a left hand menu, body and footer. There are links in the menu that are meant to trigger an async event that refreshes the body tile.

    Here's the template:

      <definition name="welcome" template="/WEB-INF/jsp/template.jsp">
          <put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp"/>
          <put-attribute name="body" value="/WEB-INF/jsp/welcome.jsp"/>
          <put-attribute name="footer" value="/WEB-INF/jsp/defaultFooter.jsp"/>
    Here's the webflow definition:

    <flow ...>
    	<view-state id="start" view="welcome_page">
    		<transition on="changePage">
    			<render fragments="body" />
    Here's the template.jsp:

              <td id="left"><tiles:insertAttribute name="menu" /></td>
              <td id="right"><tiles:insertAttribute name="body" /></td>
              <td colspan="2" id="bottom"><tiles:insertAttribute name="footer" /></td>
    Here's the welcome.jsp for the body tile:

    <div id="body">
        Main area
    The menu.jsp contains the links that are meant to refresh the body, here's that code:

    <form:form method="POST" id="page1Form">
    <a id="page1" href="#">Page 1</a>
    </form:form> <script type="text/javascript"> Spring.addDecoration(new Spring.AjaxEventDecoration({ elementId: "page1", formId: "page1Form", event: "onclick", params: { _eventId: "changePage" } })); </script>
    For the sake of completeness, here's the form element after translation:

    <form id="page1Form" action="/tiles-webflow-test/results?execution=e1s1" method="POST">
    <a id="page1" href="#">Page 1</a>

    Unfortunately, as I said, the whole page gets returned. I'd really appreciate any help in identifying the problem