Lines Matching refs:state

7  * that return the user to the current application state, even in an Ajax
16 * Provides global state management backed by an object, but with no browser
32 * changes, even if there is no associated state change. Default is `false`.
37 * Initial state to set, as an object hash of key/value pairs. This will be
38 * merged into the current global state.
99 * Constant used to identify state changes originating from the
110 * Constant used to identify state changes originating from the
184 * changes, even if there is no associated state change.
193 * Resolved initial state: a merge of the user-supplied initial state
194 * (if any) and any initial state provided by a subclass. This may
196 * nor a subclass supplies an initial state, this property will be
208 * Fired when the state changes. To be notified of all state changes
221 * Object hash of state items that have been added or changed. The
231 * Object hash of key/value pairs of all state items after the
237 * Object hash of key/value pairs of all state items before the
243 * Object hash of key/value pairs of state items that have been
259 // If initialState was provided, merge it into the current state.
268 * Adds a state entry with new values for the specified keys. By default,
269 * the new state will be merged into the existing state, and new values will
272 * new state entry.
275 * @param {Object} state Object hash of key/value pairs.
281 * If <code>true</code> (the default), the new state will be merged
282 * into the existing state. New values will override existing values,
284 * removed from the state.
288 * If <code>false</code>, the existing state will be discarded as a
289 * whole and the new state will take its place.
302 * Adds a state entry with a new value for a single key. By default, the new
303 * value will be merged into the existing state values, and will override an
306 * be removed from the new state entry.
316 var state = {};
317 state[key] = value;
318 return this._change(SRC_ADD, state, options);
322 * Returns the current value of the state parameter specified by <i>key</i>,
323 * or an object hash of key/value pairs for all current state parameters if
328 * @return {Object|String} Value of the specified state parameter, or an
329 * object hash of key/value pairs for all current state parameters.
332 var state = GlobalEnv._state,
333 isObject = _isSimpleObject(state);
336 return isObject && Obj.owns(state, key) ? state[key] : undefined;
338 return isObject ? Y.mix({}, state, true) : state; // mix provides a fast shallow clone.
345 * the new state.
348 * @param {Object} state Object hash of key/value pairs.
362 * with the new state.
372 var state = {};
373 state[key] = value;
374 return this._change(SRC_REPLACE, state, options);
380 * Changes the state. This method provides a common implementation shared by
381 * the public methods for changing state.
386 * @param {Object} state Object hash of key/value pairs.
392 _change: function (src, state, options) {
395 if (options.merge && _isSimpleObject(state) &&
397 state = Y.merge(GlobalEnv._state, state);
400 this._resolveChanges(src, state, options);
405 * Called by _resolveChanges() when the state has changed. This method takes
548 * state and fires appropriate events if things have changed.
554 * new state
606 * Stores the specified state. Don't call this method directly; go through
612 * @param {Object} newState new state to store
629 * @param {EventFacade} e state change event facade