1

我想以类似于如何通过重新加载 YUI DataTable 的方式重新加载 YUI ScrollView 的内容

myDataTable.showTableMessage("Loading...");
myDataTable.getDataSource().sendRequest('', { success:  myDataTable.onDataReturnInitializeTable, scope: myDataTable });

(摘自How can I refresh a YUI dataTable with a button?

是否有类似的机制来重新加载 YUI ScrollView?

4

1 回答 1

0

Not directly, however you could use the node io plugin to reload the contents of the scroll view based on a timer or a user action. Something like this.

Y.one('content-node-selector').load('url', 'selector', function(){
//do something if needed
scrollView.syncUI();
});

Or you could just get the contentBox attribute and set the content that way (calling syncUI and handling any scroll changes you may need to make

Info on load Info on contentBox inherited from widget

于 2012-11-29T21:07:30.770 回答