春季webflow转换空响应
问题描述:
在我的页面我有一个选择列表,当选择一个选项时,触发我的webflow中的事件。春季webflow转换空响应
<transition on="triggeredChange">
<evaluate expression="myClass.myMethod(flowScope.myData)"
result="flowScope.myData.item.property" />
<render fragments="idOfDivToRender" />
</transition>
该事件被触发,如果我在myClass.myMethod设置调试点看来,执行没有错误,但在页面我得到这个错误:
Received empty response with no Spring redirect headers. If this is intentional set the response status code to 204 or 205.
如果我手动刷新页面我可以看到flowScope.myData.item.property
具有新值(如预期的那样),所以看起来错误在片段呈现中。
我错过了什么?
如需更多信息,id="idOfDivToRender"
的div位于<th:block th:fragment="firstFragment">
之内,因为页面非常长且复杂(他们需要这种方式,我无法简化),为了便于阅读,我们选择创建一个主页面很多<th:block th:replace="pages/firstFragment:: firstFragment"></th:block>
在里面。
答
听起来像你没有正确配置thymeleaf + webflow +片段。请发布您的config +版本。
或者您没有进行正确的ajax调用来触发要返回的片段。确保在请求中传递以下必需的参数以触发仅返回片段html。
_eventId=idOfDivToRender
和
ajaxSource=true
使用类似萤火虫或任何测试工具来测试响应被正确的返回(状态200片段的预期内容)
如果你还在没有收到您的预期回应,我怀疑您的配置不正确。
发布您的thymeleaf + webflow配置+片段配置 – Selwyn