BoxRefresh Class Definition =========================
961893
function (element, options) {
    this.element  = element;
    this.options  = options;
    this.$overlay = $(options.overlayTemplate);

    if (options.source === '') {
      throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.');
    }

    this._setUpListeners();
    this.load();
  }
838688
function() {
      inputEx.MultiAutoComplete.superclass.renderComponent.call(this);
      
      this.ddlist = new inputEx.widget.DDList({parentEl: this.fieldContainer});
      this.ddlist.itemRemovedEvt.subscribe(function() {
         this.setClassFromState();
         this.fireUpdatedEvt();
      }, this, true);
      this.ddlist.listReorderedEvt.subscribe(this.fireUpdatedEvt, this, true);
   }
123509
public void refresh() {
        this.refreshLock.writeLock().lock();

        if (!this.canRefresh()) {
            this.refreshLock.writeLock().unlock();
            throw new IllegalStateException("The BoxAPIConnection cannot be refreshed because it doesn't have a "
                + "refresh token.");
        }

        URL url = null;
        try {
            url = new URL(this.tokenURL);
        } catch (MalformedURLException e) {
            this.refreshLock.writeLock().unlock();
            assert false : "An invalid refresh URL indicates a bug in the SDK.";
            throw new RuntimeException("An invalid refresh URL indicates a bug in the SDK.", e);
        }

        String urlParameters = String.format("grant_type=refresh_token&refresh_token=%s&client_id=%s&client_secret=%s",
            this.refreshToken, this.clientID, this.clientSecret);

        BoxAPIRequest request = new BoxAPIRequest(this, url, "POST");
        request.shouldAuthenticate(false);
        request.setBody(urlParameters);

        String json;
        try {
            BoxJSONResponse response = (BoxJSONResponse) request.send();
            json = response.getJSON();
        } catch (BoxAPIException e) {
            this.notifyError(e);
            this.refreshLock.writeLock().unlock();
            throw e;
        }

        JsonObject jsonObject = JsonObject.readFrom(json);
        this.accessToken = jsonObject.get("access_token").asString();
        this.refreshToken = jsonObject.get("refresh_token").asString();
        this.lastRefresh = System.currentTimeMillis();
        this.expires = jsonObject.get("expires_in").asLong() * 1000;

        this.notifyRefresh();

        this.refreshLock.writeLock().unlock();
    }
914808
function () {
            // clean
            this._data.templates = [];
            this._data.modules = [];
            this._data.dataFragments = [];
            // refresh

            var startTemplates = this._data.templates;
            var startModules = this._data.modules;
            var startDatas = this._data.dataFragments;

            // this two should change if not null, as new objects are created.
            var selectedTemplate = this._data.selectedTemplate;
            var selectedModule = this._data.selectedModule;

            // The previous way of retrieving elements was to recursively look in the DOM
            // But a problem appeared with this when event delegation was implemented (because DOM elements
            // do not have any more a reference to the widget instance object until the getDom() method on the widget is
            // called, which may not happen at all, so we cannot recognize corresponding widgets).
            // We now use the hierarchies from the refresh manager.

            var refreshMgr = this.bridge.getAriaPackage().templates.RefreshManager;
            if (refreshMgr != null) {
                refreshMgr.updateHierarchies();
                var hierarchies = refreshMgr.getHierarchies();
                this._convertRefreshMgrHierarchies(hierarchies, startTemplates, startModules, startDatas);
            }

            // not used now, but could be used later to display customizations in the inspector
            // this._data.customizations = this.bridge.getAriaPackage().environment.Environment.getCustomizations();

            // if not -> nullify
            if (selectedTemplate == this._data.selectedTemplate) {
                this._data.selectedTemplate = null;
            }
            if (selectedModule == this._data.selectedModule) {
                this._data.selectedModule = null;
            }

            this.$raiseEvent("contentChanged");
        }
133869
function()
	{
		var view = this;
		while(view.parentView)
		{
			view = view.parentView;
		}

		if(view.dispatcher !== null)
		{
			view.dispatcher.trigger({ type: 'refresh' });
			this._pendingRefreshRoot = false;
		}
	}
766610
function() {

		if (this._is_inDOM) {

			if (this._container) {

				this._is_dirty = true;

				if (!this._is_queued_for_refresh) {

					Lava.view_manager.scheduleViewRefresh(this);
					this._is_queued_for_refresh = true;

				}

			} else if (this._parent_with_container) {

				this._parent_with_container.trySetDirty();

			}

		}

	}
119064
def refresher(name, refreshers=CompletionRefresher.refreshers):
    """"""
    def wrapper(wrapped):
        refreshers[name] = wrapped
        return wrapped
    return wrapper
322056
function _setRefreshTime() 
    {
        if (is_null($this->_lifeTime)) {
            $this->_refreshTime = null;
        } else {
            $this->_refreshTime = time() - $this->_lifeTime;
        }
    }
160362
public final void onRefreshEvent(RefreshEvent event) {
        Map<String, Object> changes = event.getSource();
        if (changes == RefreshEvent.ALL_KEYS) {
            disposeOfAllBeans();
            refreshAllConfigurationProperties();
        } else {
            disposeOfBeanSubset(changes.keySet());
            refreshSubsetOfConfigurationProperties(changes.keySet());
        }
    }
445384
function backgroundRefresh() {
    var keys = Object.keys(refreshKeys);
    keys.forEach(function(key) {
      var data = refreshKeys[key];
      if(data.expiration - Date.now() < this.backgroundRefreshMinTtl){
        data.refresh(key, handleRefreshResponse.bind(this, key, data));
      }
    }, self);
  }
808970
function () {
      var eventDict = element.$blaze_events;
      if (! eventDict)
        return;
      // newHandlerRecs has only one item unless you specify multiple
      // event types.  If this code is slow, it's because we have to
      // iterate over handlerList here.  Clearing a whole handlerList
      // via stop() methods is O(N^2) in the number of handlers on
      // an element.
      for (var i = 0; i < newHandlerRecs.length; i++) {
        var handlerToRemove = newHandlerRecs[i];
        var info = eventDict[handlerToRemove.type];
        if (! info)
          continue;
        var handlerList = info.handlers;
        for (var j = handlerList.length - 1; j >= 0; j--) {
          if (handlerList[j] === handlerToRemove) {
            handlerToRemove.unbind();
            handlerList.splice(j, 1); // remove handlerList[j]
          }
        }
      }
      newHandlerRecs.length = 0;
    }
1288473
public void refresh() {
        QueryCache.instance().purgeTableCache(metaModelLocal);
        Model fresh = ModelDelegate.findById(this.getClass(), getId());
        if (fresh == null) {
            throw new StaleModelException("Failed to refresh self because probably record with " +
                    "this ID does not exist anymore. Stale model: " + this);
        }
        fresh.copyTo(this);
        dirtyAttributeNames.clear();
    }
1221430
function (target, prop, receiver) {
        if (isBoxedState(target)) {
            if (prop === BOXED_GET_THIS) return target;
            if (prop === target.saveBoxedProp) return target.saveBoxed;
            if (prop === target.cancelBoxedProp) return target.cancelBoxed;
            if (prop === target.boxOptionsProp) return target.boxOptions;
            return target.getBoxed()[prop];
        }
        throw new TypeError("BoxedStateHandler: IllegalArgument expected BoxedState target");
    }
302715
void fireUpdated(Object source) {
		if (updateDisable) {
			return;
		}
		
		if (source == maxSpinner) {
			if (getMax() < getMin()) {
				setMin(getMax());
			}
		}
		if (source == minSpinner) {
			if (getMax() < getMin()) {
				setMax(getMin());
			}
		}
		
		for (int i=0;i<listeners.size();i++) {
			((InputPanelListener) listeners.get(i)).minMaxUpdated(this);
		}
	}
216799
function()
	{
		if(this._isRunning && !this._isSuspended)
		{
			var shouldRefresh = true;
			if(typeof this.shouldRefresh === 'function') shouldRefresh = this.shouldRefresh();
			if(shouldRefresh)
			{
				if(typeof this.refresh === 'function') this.refresh();
				if(this._collectionBinder)
				{
					this._collectionBinder.refreshBoundViews();
					this._collectionBinder.refreshAll();
				}
				else
				{
					this._rebindCursors();
					this._refreshOwnBinders();
					if(this.subviews !== null)
					{
						for(var i = 0, l = this.subviews.length; i < l; i++) this.subviews[i].refreshAll();
					}
				}
			}
			this._pendingRefresh = false;
		}
	}
110550
def refresh(self, records):
        
        self._loaded = True
        
        if self.isLoading():
            return
        
        # load the information
        if RecordSet.typecheck(records):
            table = records.table()
            self.setTableType(table)
            
            if self.order():
                records.setOrder(self.order())
            
            # load specific data for this record box
            if self.specifiedColumnsOnly():
                records.setColumns(map(lambda x: x.name(),
                                       self.specifiedColumns()))
            
            # load the records asynchronously
            if self.isThreadEnabled() and table:
                try:
                    thread_enabled = table.getDatabase().isThreadEnabled()
                except AttributeError:
                    thread_enabled = False
                
                if thread_enabled:
                    # ensure we have a worker thread running
                    self.worker()
                    
                    # assign ordering based on tree table
                    if self.showTreePopup():
                        tree = self.treePopupWidget()
                        if tree.isSortingEnabled():
                            col = tree.sortColumn()
                            colname = tree.headerItem().text(col)
                            column = table.schema().column(colname)
                            
                            if column:
                                if tree.sortOrder() == Qt.AscendingOrder:
                                    sort_order = 'asc'
                                else:
                                    sort_order = 'desc'
                                
                                records.setOrder([(column.name(), sort_order)])
                    
                    self.loadRequested.emit(records)
                    return
        
        # load the records synchronously
        self.loadingStarted.emit()
        curr_record = self.currentRecord()
        self.blockSignals(True)
        self.setUpdatesEnabled(False)
        self.clear()
        use_dummy = not self.isRequired() or self.isCheckable()
        if use_dummy:
            self.addItem('')
        self.addRecords(records)
        self.setUpdatesEnabled(True)
        self.blockSignals(False)
        self.setCurrentRecord(curr_record)
        self.loadingFinished.emit()
79951
public function handleRefreshState()
	{
		$this->findSessionValues();
		$this->findDefaultFilter();
		$this->findDefaultSort();
		$this->findDefaultPerPage();

		$this->getPresenter()->payload->_datagrid_url = $this->refresh_url;
		$this->redrawControl('non-existing-snippet');
	}