Roo.util.Observable Roo.form.BasicForm Roo.form.Form
Package: | Roo.form |
Defined In: | Roo/form/Form.js. |
Class: | Form |
Extends: | Roo.form.BasicForm |
Options | Defined By | |
---|---|---|
baseParams : Object
Parameters to pass with all requests.
Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}.
|
Roo.form.BasicForm | |
buttonAlign : String
Valid values are "left," "center" and "right" (defaults to "center")
Valid values are "left," "center" and "right" (defaults to "center")
|
Roo.form.Form | |
errorReader : DataReader
An Roo.data.DataReader (e.g.
An Roo.data.DataReader (e.g. {link Roo.data.XmlReader}) to be used to read data when reading validation errors on "submit" actions.
This is completely optional as there is built-in support for processing JSON. |
Roo.form.BasicForm | |
fileUpload : Boolean
Set to true if this form is a file upload.
Set to true if this form is a file upload.
|
Roo.form.BasicForm | |
itemCls : String
A css class to apply to the x-form-item of fields.
A css class to apply to the x-form-item of fields. This property cascades to child containers.
|
Roo.form.Form | |
labelAlign : String
Valid values are "left," "top" and "right" (defaults to "left").
Valid values are "left," "top" and "right" (defaults to "left").
This property cascades to child containers if not set. |
Roo.form.Form | |
labelWidth : Number
The width of labels.
The width of labels. This property cascades to child containers.
|
Roo.form.Form | |
listeners : Object
list of events and functions to call for this object,
For example :
list of events and functions to call for this object,
For example :
|
Roo.util.Observable | |
method : String
The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
|
Roo.form.BasicForm | |
minButtonWidth : Number
Minimum width of all buttons in pixels (defaults to 75)
Minimum width of all buttons in pixels (defaults to 75)
|
Roo.form.Form | |
monitorPoll : Number
The milliseconds to poll valid state, ignored if monitorValid is not true (defaults to 200)
The milliseconds to poll valid state, ignored if monitorValid is not true (defaults to 200)
|
Roo.form.Form | |
monitorValid : Boolean
If true the form monitors its valid state client-side and
fires a looping event with that state.
If true the form monitors its valid state client-side and
fires a looping event with that state. This is required to bind buttons to the valid state using the config value formBind:true on the button. |
Roo.form.Form | |
progressUrl : String
- Url to return progress data
- Url to return progress data
|
Roo.form.Form | |
reader : DataReader
An Roo.data.DataReader (e.g.
An Roo.data.DataReader (e.g. {link Roo.data.XmlReader}) to be used to read data when executing "load" actions.
This is optional as there is built-in support for processing JSON. |
Roo.form.BasicForm | |
timeout : Number
Timeout for form actions in seconds (default is 30 seconds).
Timeout for form actions in seconds (default is 30 seconds).
|
Roo.form.BasicForm | |
trackResetOnLoad : Boolean
If set to true, form.reset() resets to the last loaded
or setValues() data instead of when the form was first created.
If set to true, form.reset() resets to the last loaded
or setValues() data instead of when the form was first created. |
Roo.form.BasicForm | |
url : String
The URL to use for form actions if one isn't supplied in the action options.
The URL to use for form actions if one isn't supplied in the action options.
|
Roo.form.BasicForm |
Method | Defined By | |
---|---|---|
new Roo.form.Form
(Object config)
Create a new Roo.form.Form
Create a new Roo.form.Form
|
||
add
(Field field1, Field field2)
:
Form
Add Roo.form components to the current open container (e.g.
Add Roo.form components to the current open container (e.g. column, fieldset, etc.). Fields added via this method
can also be passed with an additional property of fieldLabel, which if supplied, will provide the text to display as the label of the field.
|
Roo.form.Form | |
Adds a button to the footer of the form - this must be called before the form is rendered.
Adds a button to the footer of the form - this must be called before the form is rendered.
|
Roo.form.Form | |
addEvents
(Object object)
Used to define events on this Observable
Used to define events on this Observable
|
Roo.util.Observable | |
addForm
(Roo.form.Form form)
Add a secondary form to this one,
Used to provide tabbed forms.
Add a secondary form to this one,
Used to provide tabbed forms. One form is primary, with hidden values which mirror the elements from the other forms.
|
Roo.form.BasicForm | |
Appends an event handler to this component
Appends an event handler to this component
|
Roo.util.Observable | |
addxtype
(Object config)
Adds a series of form elements (using the xtype property as the factory method.
Adds a series of form elements (using the xtype property as the factory method.
Valid xtypes are: TextField, TextArea .... Button, Layout, FieldSet, Column, (and 'end' to close a block)
|
Roo.form.Form | |
applyIfToFields
(Object values)
:
BasicForm
Calls {link ExtapplyIf} for all field in this form with the passed object.
Calls {link ExtapplyIf} for all field in this form with the passed object.
|
Roo.form.BasicForm | |
applyToFields
(Object values)
:
BasicForm
Calls {link Extapply} for all fields in this form with the passed object.
Calls {link Extapply} for all fields in this form with the passed object.
|
Roo.form.BasicForm | |
clearInvalid
()
:
BasicForm
Clears all invalid messages in this form.
Clears all invalid messages in this form.
|
Roo.form.BasicForm | |
column
(Object config, Field field1, Field field2, Field etc)
:
Opens a new {link Roo.form.Column} container in the layout stack.
Opens a new {link Roo.form.Column} container in the layout stack. If fields are passed after the config, the
fields are added and the column is closed. If no fields are passed the column remains open until end() is called.
|
Roo.form.Form | |
container
(Object config, Field field1, Field field2, Field etc)
:
Opens a new {link Roo.form.Layout} container in the layout stack.
Opens a new {link Roo.form.Layout} container in the layout stack. If fields are passed after the config, the
fields are added and the container is closed. If no fields are passed the container remains open until end() is called.
|
Roo.form.Form | |
Performs a predefined action (submit or load) or custom actions you define on this form.
Performs a predefined action (submit or load) or custom actions you define on this form.
|
Roo.form.BasicForm | |
end
()
:
Form
Closes the current open container
Closes the current open container
|
Roo.form.Form | |
fieldset
(Object config, Field field1, Field field2, Field etc)
:
Opens a new {link Roo.form.FieldSet} container in the layout stack.
Opens a new {link Roo.form.FieldSet} container in the layout stack. If fields are passed after the config, the
fields are added and the fieldset is closed. If no fields are passed the fieldset remains open until end() is called.
|
Roo.form.Form | |
findField
(String id)
:
Find a Roo.form.Field in this form by id, dataIndex, name or hiddenName
Find a Roo.form.Field in this form by id, dataIndex, name or hiddenName
|
Roo.form.BasicForm | |
findbyId
(String id)
:
Element
Find any element that has been added to a form, using it's ID or name
This can include framesets, columns etc.
Find any element that has been added to a form, using it's ID or name
This can include framesets, columns etc. along with regular fields..
|
Roo.form.Form | |
Fires the specified event with the passed parameters (minus the event name).
|
Roo.util.Observable | |
getFieldValues
()
:
Object
Returns the fields in this form as an object with key/value pairs.
Returns the fields in this form as an object with key/value pairs.
This differs from getValues as it calls getValue on each child item, rather than using dom data.
|
Roo.form.BasicForm | |
Roo.form.BasicForm | ||
hasChanged
()
:
Returns true if any fields in this form have changed since their original load.
Returns true if any fields in this form have changed since their original load. (New version)
|
Roo.form.BasicForm | |
Roo.util.Observable | ||
isDirty
()
:
DEPRICATED Returns true if any fields in this form have changed since their original load.
DEPRICATED Returns true if any fields in this form have changed since their original load.
|
Roo.form.BasicForm | |
isValid
()
:
Returns true if client-side validation on the form is successful.
Returns true if client-side validation on the form is successful.
|
Roo.form.BasicForm | |
load
(Object options)
:
BasicForm
Shortcut to do a load action.
Shortcut to do a load action.
|
Roo.form.BasicForm | |
loadRecord
(Record record)
:
BasicForm
Loads an Roo.data.Record into this form.
Loads an Roo.data.Record into this form.
|
Roo.form.BasicForm | |
markInvalid
(Array/Object errors)
:
BasicForm
Mark fields in this form invalid in bulk.
Mark fields in this form invalid in bulk.
|
Roo.form.BasicForm | |
Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
|
Roo.util.Observable | |
purgeListeners
()
Removes all listeners for this object
Removes all listeners for this object
|
Roo.util.Observable | |
remove
(Field field)
:
BasicForm
Removes a field from the items collection (does NOT remove its markup).
Removes a field from the items collection (does NOT remove its markup).
|
Roo.form.BasicForm | |
Roo.util.Observable | ||
render
(String/HTMLElement/Element container)
:
Form
Render this form into the passed container.
Render this form into the passed container. This should only be called once!
|
Roo.form.Form | |
reset
()
:
BasicForm
Resets this form.
Resets this form.
|
Roo.form.BasicForm | |
resetHasChanged
()
:
Resets all hasChanged to 'false' -
The old 'isDirty' used 'original value.
Resets all hasChanged to 'false' -
The old 'isDirty' used 'original value..' however this breaks reset() and a few other things. So hasChanged storage is only to be used for this purpose
|
Roo.form.BasicForm | |
setValues
(Array/Object values)
:
BasicForm
Set values for fields in this form in bulk.
Set values for fields in this form in bulk.
|
Roo.form.BasicForm | |
start
(Object container)
:
Form
Opens the passed container in the layout stack.
Opens the passed container in the layout stack. The container can be any {link Roo.form.Layout} or subclass.
|
Roo.form.Form | |
startMonitoring
()
Starts monitoring of the valid state of this form.
Starts monitoring of the valid state of this form. Usually this is done by passing the config
option "monitorValid" |
Roo.form.Form | |
stopMonitoring
()
Stops monitoring of the valid state of this form
Stops monitoring of the valid state of this form
|
Roo.form.Form | |
submit
(Object options)
:
BasicForm
Shortcut to do a submit action.
Shortcut to do a submit action.
|
Roo.form.BasicForm | |
Roo.util.Observable | ||
updateRecord
(Record record)
:
BasicForm
Persists the values in this form into the passed Roo.data.Record object in a beginEdit/endEdit block.
Persists the values in this form into the passed Roo.data.Record object in a beginEdit/endEdit block.
|
Roo.form.BasicForm |
Event | Defined By | |
---|---|---|
actioncomplete (Form this, Action action)
Fires when an action is completed.
Fires when an action is completed.
|
Roo.form.BasicForm | |
actionfailed (Form this, Action action)
Fires when an action fails.
Fires when an action fails.
|
Roo.form.BasicForm | |
beforeaction (Form this, Action action)
Fires before any action is performed.
Fires before any action is performed. Return false to cancel the action.
|
Roo.form.BasicForm | |
clientvalidation (Form this, Boolean valid)
If the monitorValid config option is true, this event fires repetitively to notify of valid state
If the monitorValid config option is true, this event fires repetitively to notify of valid state
|
Roo.form.Form | |
rendered (Roo.form.Form form)
Fires when the form is rendered
Fires when the form is rendered
|
Roo.form.Form |