Class fvaswing.components.forms.FvFormField

Description

Abstract implementation for FvForm fields.

New fields can be implemented using this abstract class.

Take a look at fvaswing.components.forms package to see concrete field implementations.

See Also

Method Index

clear(), getCaption(), getContainer(), getLabelWidth(), getValue(), init(), isFieldValid(), setCaption(), setRenderStateHandler(), setValue(), showInvalidState(), showValidState(), toString()

Method Detail

init

public function init(w:Number, scopeMethod, renderingMethod:Function):Void

Inits fields

Don't use it in our development
triggered when field is added to form component.

setRenderStateHandler

public function setRenderStateHandler(scopeMethod, renderingMethod:Function):Void

Delegates field state rendering method to passed-in renderingMethod function.

Parameters

scopeMethodContext where function is call.
renderingMethodFunction implementation to render field state

setCaption

public function setCaption(str:String):Void

getCaption

public function getCaption():String

Returns field's label.

getContainer

public function getContainer():Container

Returns AsWing field container.

getLabelWidth

public function getLabelWidth():Number

Returns current label width.

setValue

public function setValue(value):Void

Sets field value.
Must be override by subclass.

getValue

public function getValue()

Returns field value.
Must be override by subclass.

isFieldValid

public function isFieldValid():Boolean

Returns true is current field is valid.

Validation process is defined throw class instanciation
Take a look at constructor definition.

showValidState

public function showValidState():Void

Shows visual indication for a valid field state.

Usually the 'normal' state of field.

showInvalidState

public function showInvalidState():Void

Shows visual indication for an invalid field state.

Default use a red background for target component.

clear

public function clear():Void

Reset field to default value.
Must be override by subclass.

toString

public function toString():String

Returns string representation.