0

私は道場のトピックで公開しています:

dojo.event.topic.publish("publishThisTarget");

そしてJSPにはlistenTopicsがあります:

<s:url var="url2publish" action="MyAction" namespace="/public" />
    <sx:div showLoadingText="false" indicator="ajaxIndicator"
        id="content" href="%{url2publish}" theme="ajax"
        listenTopics="publishThisTarget" preload="false"
                    afterNotifyTopics="/ajaxAfter">
</sx:div>

問題は、私のアクションが 2 回公開され、その理由がわからないことです。

4

1 に答える 1

1

トリガーが起動された後にトリガーを切断する必要があるストラットにも同じ問題があり、div コンテンツの更新によって再構成されます。

Javascript :

dojo.event.topic.subscribe("/clearMsg", function(date, type, request) {
    dojo.event.topic.destroy('publishThisTarget');
});

JSP:

<s:url var="url2publish" action="MyAction" namespace="/public" />
    <sx:div showLoadingText="false" indicator="ajaxIndicator"
            id="content" href="%{url2publish}" theme="ajax"
            listenTopics="publishThisTarget" preload="false"
            beforeNotify="/clearMsg" afterNotifyTopics="/ajaxAfter">
</sx:div>
于 2010-02-09T14:16:21.217 に答える