From GeoMedia Smart Client
Jump to: navigation, search
GMSC 2013/2014 Javascript API Overview Form Events Types Utility Functions client-side Validation Conditions Interaction with SmartClient Cookbook Cheatsheet
Form Models BaseModel FormModel TabModel GroupModel Field Models ActionModel
Field Models AutoComplete CheckBox ComboBox DatePicker DateTimePicker EditableComboBox Editor FilePicker Grid Hyperlink Image Label Password Radio TextArea TextField

Field Model

a field model represents the actual form field (text box, datepicker widget,...) where the user enters content. The FieldModel serves as "base class" for all the more specialized field model types listed in the navigation bar. So each field model implements the following methods in addition to the ones from BaseModel:


getActionByName (actionName)

find a child action of this tab based on its name. GMSC 2013


{String} groupName The id of the child action to be retrieved


{GroupModel} the retrieved action model

clear ()

clears the field from its input. GMSC 07

fill (value)

fills the field with value/list-of-values(lov). Note that this is not identical to setValue for lov-Fields like Comboboxes or Grids, as fill() does not select a new value from the existing ones, but rather re-populates the entire widget with new values. GMSC 07


sets the value of the field to the given value. For lov-Widgets, value has to correspond to the id of one existing lov value. GMSC 07

getValue ()

returns the current value of the widget GMSC 07


returns true if the field has been populated with some value. GMSC 2013


returns true if the field has NOT been populated with some value GMSC 2013


the label of the field (this actuallly not a method, but an observable property for technical reasons) GMSC 2013


reload the field by re-fetching the last saved value from the server GMSC 07


is this field required or not? (i.e. does the user need to complete it for form submission) (this actuallly not a method, but an observable property for technical reasons) GMSC 07