Examples of ValueChangedEvent


Examples of com.goodow.realtime.store.ValueChangedEvent

  }

  private void putAndFireEvent(String key, JsonArray newValue, String sessionId, String userId) {
    assert null != newValue;
    Object newObject = JsonSerializer.deserializeObject(newValue, model.objects);
    ValueChangedEvent event =
        new ValueChangedEventImpl(event(sessionId, userId).set("property", key).set("oldValue",
            get(key)).set("newValue", newObject));
    if (snapshot.has(key)) {
      JsonArray oldValue = snapshot.getArray(key);
      model.addOrRemoveParent(oldValue, id, false);
View Full Code Here

Examples of com.goodow.realtime.store.ValueChangedEvent

  }

  private void removeAndFireEvent(String key, String sessionId, String userId) {
    assert has(key);
    JsonArray oldValue = snapshot.getArray(key);
    ValueChangedEvent event =
        new ValueChangedEventImpl(event(sessionId, userId).set("property", key).set("oldValue",
            get(key)).set("newValue", null));
    snapshot.remove(key);
    model.addOrRemoveParent(oldValue, id, false);
    fireEvent(event);
View Full Code Here

Examples of jcurses.event.ValueChangedEvent

  */
  public void setValue(boolean value) {
    boolean oldValue = _checked;
    _checked = value;
    if (oldValue != _checked) {
      _listenerManager.handleEvent(new ValueChangedEvent(this));
    }
    paint();
  }
View Full Code Here

Examples of jcurses.event.ValueChangedEvent

        }
        menu.show();
        if ((menu.getSelectedIndex()!=-1) && (menu.getSelectedIndex()!=getSelectedIndex())) {
          _selectedIndex = menu.getSelectedIndex();
          paint();
          _listenerManager.handleEvent(new ValueChangedEvent(this));
         
        }
      }
       
      return true;
View Full Code Here

Examples of jcurses.event.ValueChangedEvent

     }
    
     //event abschicken
   
    if (dispatchEvent) {
      _listenerManager.handleEvent(new ValueChangedEvent(this));
    }
    
    
  }
View Full Code Here

Examples of net.sourceforge.aprog.events.AtomicVariable.ValueChangedEvent

  public static final void fireUpdate(final Context context, final String variableName) {
    final Object value = context.get(variableName);
    final AtomicVariable<Object> variable = cast(AtomicVariable.class, context.getVariable(variableName));
   
    if (variable != null) {
      variable.new ValueChangedEvent(value, value).fire();
    }
  }
View Full Code Here

Examples of org.apache.cocoon.forms.event.ValueChangedEvent

                } catch (Exception exc) {
                    throw Context.reportRuntimeError(exc.getMessage());
                }
            }
        } else if (e instanceof ValueChangedEvent) {
            ValueChangedEvent vce = (ValueChangedEvent)e;
            Object obj = super.get("onChange", this);
            if (obj instanceof Function) {
                try {
                    Function fun = (Function)obj;
                    Object[] args = new Object[2];
                    Scriptable scope = getTopLevelScope(this);
                    Scriptable thisObj = scope;
                    Context cx = Context.getCurrentContext();
                    args[0] = vce.getOldValue();
                    args[1] = vce.getNewValue();
                    fun.call(cx, scope, thisObj, args);
                } catch (Exception exc) {
                    throw Context.reportRuntimeError(exc.getMessage());
                }
            }
View Full Code Here

Examples of org.apache.cocoon.forms.event.ValueChangedEvent

                } catch (Exception exc) {
                    throw Context.reportRuntimeError(exc.getMessage());
                }
            }
        } else if (e instanceof ValueChangedEvent) {
            ValueChangedEvent vce = (ValueChangedEvent)e;
            Object obj = super.get("onChange", this);
            if (obj instanceof Function) {
                try {
                    Function fun = (Function)obj;
                    Object[] args = new Object[2];
                    Scriptable scope = getTopLevelScope(this);
                    Scriptable thisObj = scope;
                    Context cx = Context.getCurrentContext();
                    args[0] = vce.getOldValue();
                    args[1] = vce.getNewValue();
                    fun.call(cx, scope, thisObj, args);
                } catch (Exception exc) {
                    throw Context.reportRuntimeError(exc.getMessage());
                }
            }
View Full Code Here

Examples of org.apache.cocoon.forms.event.ValueChangedEvent

            } else {
                this.enteredValue = null;
            }

            if (callListeners) {
                getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, newValue));
            }
            getForm().addWidgetUpdate(this);
        }
    }
View Full Code Here

Examples of org.apache.cocoon.forms.event.ValueChangedEvent

        }
        if (!ObjectUtils.equals(value, object)) {
            Object oldValue = value;
            value = object;
            if (hasValueChangedListeners() || getForm().hasFormHandler()) {
                getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, value));
            }
            getForm().addWidgetUpdate(this);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.