class ValueBoxEditor implements IsWidget, LeafAttributeEditor<T> {

    void onValueChanged(final T value) {
        // Check value is not same one as current.
        if (this.value != null && this.value.equals(value)) return;
        
        // Clear error messages on the view.
        view.clearError();
                
        // Set the new value.
        T before = this.value;
        this.value = value;

        // Fire the value change event.
        valueChangeEvent.fire(new org.dashbuilder.common.client.event.ValueChangeEvent<T>(this, before, this.value));
        
    }

    @Inject public  ValueBoxEditor(final View<T> view,
                          final Event<org.dashbuilder.common.client.event.ValueChangeEvent<T>> valueChangeEvent);

}