Hi all,
I have a problem where I want to use AJAX to re-render a part of the screen in webflow. I am in a view-state and use a transition "refresh" that will stay in the same view-state but needs to re-render the "part" tile of the view.
I have read many forum posts (and solutions) on this topic, but none of the solutions worked for me.
As soon as the AJAX call is sent (with the correct fragments parameters), I can see in the server logging that the fragments are correctly interpreted
But instead I get the complete page rendered as a 302 redirect response.Code:Flash scope = map['flowRenderFragments' -> array<String>['test']]
It seems that I have 2 problems. How can I disable this redirect (only for this ajax call) and how can I get only the necessary fragment.
I am using spring 3.0.5, webflow 2.3.0 and tiles 2.2.2
Some excerpts of my configuration:
main.jspCode:<bean id="tilesViewResolver" class="org.springframework.js.ajax.AjaxUrlBasedViewResolver"> <property name="viewClass" value="org.springframework.webflow.mvc.view.FlowAjaxTilesView"/> </bean>
part.jspCode:<tiles:insertAttribute name="part"/> <c:url value="/editor/editor.do?_eventId=refresh&_flowExecutionKey=${flowExecutionKey}&fragments=part" var="refreshAction"/> <input type="button" onclick="refresh();" value="refresh"/> <script type="text/javascript" language="JavaScript"> function refresh() { jQuery.get('${refreshAction}', function(data) { jQuery('#test').html(data); }); } </script>
tiles:Code:<div id="part"> <%= new java.util.Date() %> </div>
Code:<definition name=".main" template="/WEB-INF/jsp/main.jsp"> <put-attribute name="part" value=".part" /> </definition> <definition name=".part" template="/WEB-INF/part.jsp"/>


Reply With Quote