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

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


  public Binding bind(final Widget widget, final String property, final Converter converter) {
    validatePropertyExpr(property);

    int dotPos = property.indexOf(".");
    if (dotPos > 0) {
      DataBinder nested = createNestedBinder(property);
      nested.bind(widget, property.substring(dotPos + 1), converter);
      Binding binding = new Binding(property, widget, converter, null);
      bindings.put(property, binding);
      return binding;
    }
View Full Code Here


    validatePropertyExpr(property);

    int dotPos = property.indexOf(".");
    if (dotPos > 0) {
      String bindableProperty = property.substring(0, dotPos);
      DataBinder binder = binders.get(bindableProperty);
      if (binder != null) {
        binder.unbind(property.substring(dotPos + 1));
      }
    }
    binding.removeHandler();
    bindings.remove(property, binding);
View Full Code Here

      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);
          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

    validatePropertyExpr(property);

    int dotPos = property.indexOf(".");
    if (dotPos > 0) {
      String bindableProperty = property.substring(0, dotPos);
      DataBinder binder = binders.get(bindableProperty);
      if (binder != null) {
        binder.unbind(property.substring(dotPos + 1));
        return;
      }
    }

    knownValues.remove(property);
View Full Code Here

    validatePropertyExpr(property);

    int dotPos = property.indexOf(".");
    if (dotPos > 0) {
      String bindableProperty = property.substring(0, dotPos);
      DataBinder binder = binders.get(bindableProperty);
      if (binder != null) {
        binder.unbind(property.substring(dotPos + 1));
      }
    }

    bindings.remove(property);
    converters.remove(property);
View Full Code Here

      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);
          proxy.set(property, nestedBinder.getModel());
        }
        updateWidgetAndFireEvent(property, knownValue, actualValue);
      }
    }
  }
View Full Code Here

  public Binding bind(final Widget widget, final String property, final Converter converter) {
    validatePropertyExpr(property);

    int dotPos = property.indexOf(".");
    if (dotPos > 0) {
      DataBinder nested = createNestedBinder(property);
      nested.bind(widget, property.substring(dotPos + 1), converter);
      Binding binding = new Binding(property, widget, converter, null);
      bindings.put(property, binding);
      return binding;
    }
View Full Code Here

    validatePropertyExpr(property);

    int dotPos = property.indexOf(".");
    if (dotPos > 0) {
      String bindableProperty = property.substring(0, dotPos);
      DataBinder binder = binders.get(bindableProperty);
      if (binder != null) {
        binder.unbind(property.substring(dotPos + 1));
      }
    }
    binding.removeHandler();
    bindings.remove(property, binding);
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.