class type t =Inheritsobject
..end
method checkChange : unit Js.meth
Forces each field within the form panel to check if its value has changed.
method getForm : Ext_form_Basic.t Js.t Js.meth
Provides access to the Form which this Panel contains.
Returns:
Ext_form_Basic.t Js.t
The Form which this Panel contains.
method getRecord : Ext_data_Model.t Js.t Js.meth
Returns the currently loaded Ext.data.Model instance if one was loaded via loadRecord.
Returns:
Ext_data_Model.t Js.t
The loaded instance
method getValues : 'a.
bool Js.t Js.optdef ->
bool Js.t Js.optdef ->
bool Js.t Js.optdef -> bool Js.t Js.optdef -> 'a Js.t Js.meth
Convenience function for fetching the current value of each field in the form. This is the same as calling this.getForm().getValues().
Retrieves the fields in the form as a set of key/value pairs, using their getSubmitData() method to collect the values. If multiple fields return values under the same name those values will be combined into an Array. This is similar to getFieldValues except that this method collects only String values for submission, while getFieldValues collects type-specific data values (e.g. Date objects for date fields.)
Parameters:
bool Js.t
(optional)
If true, will return the key/value collection as a single URL-encoded param string.
Defaults to: falsebool Js.t
(optional)
If true, only fields that are dirty will be included in the result.
Defaults to: falsebool Js.t
(optional)
If true, the configured emptyText of empty fields will be used.
Defaults to: falsebool Js.t
(optional)
If true, the getModelData method is used to retrieve values from fields, otherwise the getSubmitData method is used.
Defaults to: falsemethod hasInvalidField : unit Js.meth
Convenience function to check if the form has any invalid fields. This is the same as calling this.getForm().hasInvalidField().
Returns true if the form contains any invalid fields. No fields will be marked as invalid as a result of calling this; to trigger marking of fields use isValid instead.
method initComponent : unit Js.meth
The initComponent template method is an important initialization step for a Component. It is intended to be implemented by each subclass of Ext.Component to provide any needed constructor logic. The initComponent method of the class being created is called first, with each initComponent method up the hierarchy to Ext.Component being called thereafter. This makes it easy to implement and, if needed, override the constructor logic of the Component at any step in the hierarchy.
The initComponent method must contain a call to callParent in order to ensure that the parent class' initComponent method is also called.
All config options passed to the constructor are applied to this
before initComponent is called,
so you can simply access them with this.someOption
.
The following example demonstrates using a dynamic string for the text of a button at the time of instantiation of the class.
Ext.define('DynamicButtonText', {
extend: 'Ext.button.Button',
initComponent: function() {
this.text = new Date();
this.renderTo = Ext.getBody();
this.callParent();
}
});
Ext.onReady(function() {
Ext.create('DynamicButtonText');
});
method isDirty : bool Js.t Js.meth
Convenience function to check if the form has any dirty fields. This is the same as calling this.getForm().isDirty().
Returns true
if any fields in this form have changed from their original values.
Note that if this BasicForm was configured with trackResetOnLoad then the Fields' original values are updated when the values are loaded by setValues or loadRecord.
method isValid : bool Js.t Js.meth
Convenience function to check if the form has all valid fields. This is the same as calling this.getForm().isValid().
Returns true if client-side validation on the form is successful. Any invalid fields will be marked as invalid. If you only want to determine overall form validity without marking anything, use hasInvalidField instead.
method load : 'b. 'b Js.t -> unit Js.meth
This is a proxy for the underlying BasicForm's Ext.form.Basic.load call.
Parameters:
_ Js.t
The options to pass to the action (see Ext.form.Basic.load and Ext.form.Basic.doAction for details)
method loadRecord : Ext_data_Model.t Js.t -> Ext_form_Basic.t Js.t Js.meth
Loads an Ext.data.Model into this form (internally just calls Ext.form.Basic.loadRecord) See also trackResetOnLoad.
Parameters:
Ext_data_Model.t Js.t
The record to load
Returns:
Ext_form_Basic.t Js.t
The Ext.form.Basic attached to this FormPanel
method startPolling : Js.number Js.t -> unit Js.meth
Start an interval task to continuously poll all the fields in the form for changes in their values. This is normally started automatically by setting the pollForChanges config.
Parameters:
Js.number Js.t
The interval in milliseconds at which the check should run.
method stopPolling : unit Js.meth
Stop a running interval task that was started by startPolling.
method submit : 'c. 'c Js.t -> unit Js.meth
This is a proxy for the underlying BasicForm's Ext.form.Basic.submit call.
Parameters:
_ Js.t
The options to pass to the action (see Ext.form.Basic.submit and Ext.form.Basic.doAction for details)
method updateRecord : Ext_data_Model.t Js.t Js.optdef -> Ext_form_Basic.t Js.t Js.meth
Persists the values in this form into the passed Ext.data.Model object in a beginEdit/endEdit block. If the record is not specified, it will attempt to update (if it exists) the record provided to loadRecord.
Parameters:
Ext_data_Model.t Js.t
(optional)
The record to edit
Returns:
Ext_form_Basic.t Js.t
The Ext.form.Basic attached to this FormPanel