2

情况如下:在一个页面中,我使用 ajax 将数据发送到后端。这一切都很好,它将信息按应有的方式存储在数据库中。现在,当我按下浏览器上的刷新按钮时,它仍然包含旧数据(我没有手动更新表单)。我认为这是因为我的转换从未被触发,因为刷新不是流程的一部分。如何强制重新加载表单?你如何在流xml中定义这样的?

下面是 webflow xml 的一部分

<action-state id="showProposal">
    <evaluate expression="portfolioAction.showProposalFormAction" />
    <transition on="success" to="showProposalView" />       
</action-state>

<view-state id="showProposalView" view="/swf/proposal/proposal">
    <transition on="storeProposal" to="storeProposalView" >
        <evaluate expression="portfolioAction.storeProposalFormAction" />
    </transition>
    <transition on="applySelection" to="showProposalView">
        <evaluate expression="portfolioForm.bindAndValidate" />
        <evaluate expression="portfolioAction.showProposalFormAction" />
    </transition>
</view-state>
4

1 回答 1

4

Could you put your logic in the on-render section of your view-state?

Use the on-render element to execute one or more actions before view rendering. Render actions are executed on the initial render as well as any subsequent refreshes, including any partial re-renderings of the view.

于 2012-03-14T18:58:47.613 回答