1

I would like to reload the content of a YUI ScrollView in a similar manner to how a YUI DataTable can be reloaded via

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

(snippet courtesy of How can I refresh a YUI dataTable with a button?)

Is there a similar mechanism for reloading a YUI ScrollView?

Community
  • 1
  • 1
Nathan
  • 1,897
  • 2
  • 15
  • 16
  • Short answer: no. You can change the content of the scrollview however you want (DOM, innerHTML, templates) and then call `syncUI` on the scrollview and that should work. Someone will probably give you more details in an answer – juandopazo Nov 29 '12 at 21:03

1 Answers1

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

Kevin
  • 632
  • 4
  • 7