質問

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

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回発行されていること、と私はなぜ見当もつかない。

役に立ちましたか?

解決

私はあなたがそれが解雇された後、トリガーを切断する必要がストラットと同じ問題を抱えていた、それは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>
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top