Package org.jboss.errai.databinding.client.api

Examples of org.jboss.errai.databinding.client.api.DataBinder


      Object actualValue = proxy.get(property);

      if ((knownValue == null && actualValue != null) ||
          (knownValue != null && !knownValue.equals(actualValue))) {

        DataBinder nestedBinder = binders.get(property);
        if (nestedBinder != null) {
          nestedBinder.setModel(actualValue, InitialState.FROM_MODEL, true);
          proxy.set(property, nestedBinder.getModel());
        }
        updateWidgetsAndFireEvent(property, knownValue, actualValue);
      }
    }
  }
View Full Code Here


  public <P> void addPropertyChangeHandler(String property, PropertyChangeHandler<P> handler) {
    validatePropertyExpr(property);

    int dotPos = property.indexOf(".");
    if (dotPos > 0) {
      DataBinder nested = createNestedBinder(property);
      nested.addPropertyChangeHandler(property.substring(dotPos + 1), handler);
    }
    else if (property.equals("*")) {
      propertyChangeHandlerSupport.addPropertyChangeHandler(handler);
    }
    else if (property.equals("**")) {
      for (DataBinder nested : binders.values()) {
        nested.addPropertyChangeHandler(property, handler);
      }
      propertyChangeHandlerSupport.addPropertyChangeHandler(handler);
    }

    propertyChangeHandlerSupport.addPropertyChangeHandler(property, handler);
View Full Code Here

    validatePropertyExpr(property);

    int dotPos = property.indexOf(".");
    if (dotPos > 0) {
      String bindableProperty = property.substring(0, dotPos);
      DataBinder nested = binders.get(bindableProperty);
      if (nested != null) {
        nested.removePropertyChangeHandler(property.substring(dotPos + 1), handler);
      }
    }
    else if (property.equals("*")) {
      propertyChangeHandlerSupport.removePropertyChangeHandler(handler);
    }
    else if (property.equals("**")) {
      for (DataBinder nested : binders.values()) {
        nested.removePropertyChangeHandler(property, handler);
      }
      propertyChangeHandlerSupport.removePropertyChangeHandler(handler);
    }

    propertyChangeHandlerSupport.removePropertyChangeHandler(property, handler);
View Full Code Here

      Object oldValue = other.knownValues.get(property);

      if ((curValue == null && oldValue != null) ||
          (curValue != null && !curValue.equals(oldValue))) {

        DataBinder nestedBinder = binders.get(property);
        DataBinder otherNestedBinder = (DataBinder) other.binders.get(property);
        if (nestedBinder != null && otherNestedBinder != null) {
          BindableProxyAgent nestedAgent = ((BindableProxy<T>) nestedBinder.getModel()).getAgent();
          BindableProxyAgent otherNestedAgent = ((BindableProxy<T>) otherNestedBinder.getModel()).getAgent();
          nestedAgent.fireChangeEvents(otherNestedAgent);
        }

        firePropertyChangeEvent(property, oldValue, curValue);
      }
View Full Code Here

TOP

Related Classes of org.jboss.errai.databinding.client.api.DataBinder

Copyright © 2018 www.massapicom. 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.