w2sidebar.refresh

Refreshes the object without completely re-inserting it.
refresh([id])
id string, id of the element
Returns number of milliseconds it took to refresh.

Description

This method is common for all w2ui widgets. It has slight differences from widget to widget. In general the render() method is called once during the initial creation and rendering of the object. The refresh() method is called when you need to update content if you have changed object's properties.
If no arguments provided, the entire widget will be refreshed. However, for some widget an optional second parameter can be specified to refresh that portion only.
For w2layout it is the panel: For w2sidebar it is id of the node: For w2tabs it is id of the tab: For w2toolbar it is id of the toolbar item:

User Comments

comments powered by Disqus