FieldInterface

public interface FieldInterface<T, E> extends FormAwareInterface

This provides a consitent way of dealing with the different views provided by android.

Methods

getForm

FormInterface getForm()

The form instance this field is attached to.

Returns:form

getName

String getName()

A name that uniquely identify the view. this is use when you need to pull a specific field from the form instance.

Returns:name

getValue

E getValue()

Returns the value of the view

Throws:
Returns:

Object

getView

T getView()

The actual view object(s) we are operating on.

Note this may return a list of view objects in case of CollectionField

Throws:
  • FormException – in case it not possible to retrieve the view object
Returns:

a view instance

isEditable

boolean isEditable()

Is the view editable, this tells the form not to set values for the view and also tells the populator not to populate it.

Returns:true if editable, false otherwise

setValue

void setValue(E o)

Set view value.

Parameters:
  • o
Throws: