Loading ...
Sorry, an error occurred while loading the content.

TabView - refresh tab with cached data

Expand Messages
  • steven.ford
    I am using TabView and I want the data in the tabs cached. however, I want to provide a button to refresh one of the tabs. I have tried this:
    Message 1 of 2 , Feb 26 11:57 AM
    • 0 Attachment
      I am using TabView and I want the data in the tabs cached. however, I
      want to provide a button to refresh one of the tabs.
      I have tried this:
      YAHOO.widget.Tab.prototype.reload = function () {
      if(this.get('dataSrc')){
      this._dataConnect();
      }
      }

      then I have a function that set the active tab and calls reload on
      that tab. I also want it to get the loading class so the spinner will
      show?

      Any suggestions would be greatly appreciated
    • Matt Sweeney
      ... Hi Steven, You can set the cacheData attribute to false at any point and that Tab instance will refresh its data. - Matt
      Message 2 of 2 , Feb 27 10:09 AM
      • 0 Attachment
        steven.ford wrote:
        > I am using TabView and I want the data in the tabs cached. however, I
        > want to provide a button to refresh one of the tabs.
        > I have tried this:
        > YAHOO.widget.Tab.prototype.reload = function () {
        > if(this.get('dataSrc')){
        > this._dataConnect();
        > }
        > }
        >
        > then I have a function that set the active tab and calls reload on
        > that tab. I also want it to get the loading class so the spinner will
        > show?
        >
        > Any suggestions would be greatly appreciated
        >
        >
        >
        >
        Hi Steven,

        You can set the "cacheData" attribute to false at any point and that Tab
        instance will refresh its data.

        - Matt
      Your message has been successfully submitted and would be delivered to recipients shortly.