3
4

1 に答える 1

4

ircに関するrichardとの話し合いの結果、間に微妙な違いがありdojox.data.QueryReadStore、ストアがまだ実行していない場合にウォッチコールバックが起動されないdijit.form.FilteringSelectことがわかりました。実用的な解決策は、最初に実行してから、コールバックでウィジェットを作成することでした-http://jsfiddle.net/neonstalwart/dEC7M/を参照してください"value"fetchfetchonComplete

関連する部分は

customerAddressesPairsView.fetch({
    onComplete: function() {
        var w = new dijit.form.FilteringSelect({
            name: 'source_address_id',
            required: true,
            store: customerAddressesPairsView,
            searchAttr: "name",
            style: "width: 40ex;"
        }, 'sourceAddress');

        var handle = w.watch(function(property, oldValue, newValue) {
            console.log(property, oldValue, newValue);
        });

        w.set("value", value1);
        console.debug('Value set to ' + value1);
        console.debug('Immediate get returns:', w.get('value'));
        console.debug('Direct access returns: ' + w.value);
    }
});
于 2012-03-24T02:11:38.267 に答える