X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..05ce1c11e98b33f14ddee184493bd5a60dc947e2:/docs/output/Ext.layout.FormLayout.html diff --git a/docs/output/Ext.layout.FormLayout.html b/docs/output/Ext.layout.FormLayout.html index cb36965c..d13bedb8 100644 --- a/docs/output/Ext.layout.FormLayout.html +++ b/docs/output/Ext.layout.FormLayout.html @@ -1,58 +1,37 @@ -
ContainerLayout - AnchorLayout - FormLayout
Package: | Ext.layout |
Defined In: | FormLayout.js |
Class: | FormLayout |
Extends: | AnchorLayout |
This layout manager is specifically designed for rendering and managing child Components of forms. -It is responsible for rendering the labels of Fields.
-This layout manager is used when a Container is configured with the layout:'form' layout config, -and should generally not need to be created directly via the new keyword. In an application, -it will usually be preferrable to use a FormPanel (which automatically uses FormLayout as its layout -class) since it also provides built-in functionality for loading, validating and submitting the form.
-Note that when creating a layout via config, the layout-specific config properties must be passed in via -the layoutConfig object which will then be applied internally to the layout.
-The Container using the FormLayout can also accept the following layout-specific config -properties: +
ContainerLayout AnchorLayout FormLayout
Package: | Ext.layout |
Defined In: | FormLayout.js |
Class: | FormLayout |
Extends: | AnchorLayout |
This layout manager is specifically designed for rendering and managing child Components of +forms. It is responsible for rendering the labels of +Fields.
+This layout manager is used when a Container is configured with the layout:'form' +layout config option, and should generally not need to be created directly +via the new keyword. See Ext.Container.layout for additional details.
+In an application, it will usually be preferrable to use a FormPanel +(which is configured with FormLayout as its layout class by default) since it also provides built-in +functionality for loading, validating and submitting the form.
+A Container using the FormLayout layout manager (e.g. +Ext.form.FormPanel or specifying layout:'form') can also accept the following +layout-specific config properties:
+Any Component (including Fields) managed by FormLayout accepts the following as a config option:
Any type of components can be added to a FormLayout, but items that inherit from Ext.form.Field -can also supply the following field-specific config properties: +
Any Component managed by FormLayout may be rendered as a form field (with an associated label) by +configuring it with a non-null fieldLabel. Components configured +in this way may be configured with the following options which affect the way the FormLayout renders them:
Example usage:
// Required if showing validation messages
Ext.QuickTips.init();
@@ -60,91 +39,148 @@ Ext.QuickTips.init();
// you should usually use a FormPanel to also get its form functionality
// since it already creates a FormLayout internally.
var form = new Ext.form.FormPanel({
- labelWidth: 75,
title: 'Form Layout',
- bodyStyle:'padding:15px',
+ bodyStyle: 'padding:15px',
width: 350,
- labelPad: 10,
defaultType: 'textfield',
defaults: {
// applied to each contained item
width: 230,
msgTarget: 'side'
},
- layoutConfig: {
- // layout-specific configs go here
- labelSeparator: ''
- },
items: [{
fieldLabel: 'First Name',
name: 'first',
- allowBlank: false
+ allowBlank: false,
+ labelSeparator: ':' // override labelSeparator layout config
},{
fieldLabel: 'Last Name',
name: 'last'
- },{
- fieldLabel: 'Company',
- name: 'company'
},{
fieldLabel: 'Email',
name: 'email',
vtype:'email'
+ }, {
+ xtype: 'textarea',
+ hideLabel: true, // override hideLabels layout config
+ name: 'msg',
+ anchor: '100% -53'
}
],
- buttons: [{
- text: 'Save'
- },{
- text: 'Cancel'
- }]
-});
Config Options | -Defined By | -|
---|---|---|
- |
-
- extraCls : String
-
- An optional extra CSS class that will be added to the container (defaults to ''). This can be useful for adding custo...
-
- An optional extra CSS class that will be added to the container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.
- |
- ContainerLayout | -
- |
-
- labelSeparator : String
-
- The standard separator to display after the text of each form label (defaults to a colon ':'). To turn off separators...
-
- The standard separator to display after the text of each form label (defaults to a colon ':'). To turn off separators for all fields in this layout by default specify empty string '' (if the labelSeparator value is explicitly set at the field level, those will still be displayed).
- |
- FormLayout | -
- |
-
- renderHidden : Boolean
- True to hide each contained item on render (defaults to false).
- |
- ContainerLayout | -
Config Options | Defined By | |
---|---|---|
anchor : String This configuation option is to be applied to child items of a container managed by
+this layout (ie. configured with ... This configuation option is to be applied to child items of a container managed by +this layout (ie. configured with layout:'anchor'). + This value is what tells the layout how an item should be anchored to the container. items +added to an AnchorLayout accept an anchoring-specific config property of anchor which is a string +containing two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%'). +The following types of anchor values are supported:
| AnchorLayout | |
extraCls : String An optional extra CSS class that will be added to the container. This can be useful for adding
+customized styles to t... An optional extra CSS class that will be added to the container. This can be useful for adding +customized styles to the container or any of its children using standard CSS rules. See +Ext.Component.ctCls also. +Note: extraCls defaults to '' except for the following classes +which assign a value by default: +
+ | ContainerLayout | |
fieldTpl : Ext.Template A compiled Ext.Template for rendering
+the fully wrapped, labeled and styled form Field. Defaults to:new Ext.Template(... A compiled Ext.Template for rendering
+the fully wrapped, labeled and styled form Field. Defaults to:
+This may be specified to produce a different DOM structure when rendering form Fields. +A description of the properties within the template follows:
Also see getTemplateArgs | FormLayout | |
labelSeparator : String See Ext.form.FormPanel.labelSeparator. Configuration
+of this property at the container level takes precedence. | FormLayout | |
renderHidden : Boolean True to hide each contained item on render (defaults to false). | ContainerLayout | |
trackLabels : Boolean True to show/hide the field label when the field is hidden. Defaults to false. | FormLayout |
Property | Defined By | |
---|---|---|
fieldTpl : Ext.Template The Ext.Template used by Field rendering layout classes (such as
+Ext.layout.FormLayout) to create the DOM structure o... The Ext.Template used by Field rendering layout classes (such as
+Ext.layout.FormLayout) to create the DOM structure of a fully wrapped,
+labeled and styled form Field. A default Template is supplied, but this may be
+overriden to create custom field structures. The template processes values returned from
+Ext.layout.FormLayout.getTemplateArgs. | ContainerLayout | |
labelStyle : String Read only. The CSS style specification string added to field labels in this layout if not
+otherwise specified by each... Read only. The CSS style specification string added to field labels in this layout if not
+otherwise specified by each contained field. | FormLayout |
Method | Defined By | |
---|---|---|
getTemplateArgs( field The )
+ :
+ AnProvides template arguments for rendering the fully wrapped, labeled and styled form Field.
+This method returns an ob... Provides template arguments for rendering the fully wrapped, labeled and styled form Field. +This method returns an object hash containing properties used by the layout's fieldTpl +to create a correctly wrapped, labeled and styled form Field. This may be overriden to +create custom layouts. The properties which must be returned are:
Parameters:
| FormLayout |