Errai 3.0.1-SNAPSHOT

org.jboss.errai.databinding.client.api
Interface Converter<M,W>

Type Parameters:
M - The type of the model value (field type of the model)
W - The type of the widget value (e.g. String for a TextBox (=HasValue<String>) or Boolean for a Checkbox (=HasValue<Boolean>)))
All Known Implementing Classes:
Bound.NO_CONVERTER

public interface Converter<M,W>

Contract for converters that perform model value to widget value transformations and vice versa.

Author:
Christian Sadilek

Method Summary
 M toModelValue(W widgetValue)
          Converts the provided widget value to a model value of type <M>.
 W toWidgetValue(M modelValue)
          Converts the provided model value to a value usable by widgets of type HasValue<W>.
 

Method Detail

toModelValue

M toModelValue(W widgetValue)
Converts the provided widget value to a model value of type <M>.

Parameters:
widgetValue - the widget value to convert, may be null.
Returns:
converted value for the model.

toWidgetValue

W toWidgetValue(M modelValue)
Converts the provided model value to a value usable by widgets of type HasValue<W>.

Parameters:
modelValue - the model value to convert, may be null.
Returns:
converted value for the widget.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.