Widget that displays features attributes (fields) in a Ext.form.FormPanel. Only one feature can be displayed at a time in the form. Each attribute (field) that has to be displayed in the form must be defined in the options of the widget. In addition, the field must also be defined in the corresponding DataStore.
The FormPanel can be displayed in a Ext.Window if inWindow is set to true, else it can be normally added to an existing panel in the template.
The following widgets can use the FeaturePanel_Form widget (using the <featurepanel> tag) :
Sample configuration of the widget :
<featurepanel_form>
<name>W_FeaturePanelForm_GMapCities</name>
<options>
<inwindow>true</inwindow>
<windowoptions>
<title>GMap cities edition</title>
<autoScroll>true</autoScroll>
</windowoptions>
<defaults>
<width>150</width>
<listWidth>150</listWidth>
</defaults>
<fields>
<field>
<name>name</name>
<xtype>textfield</xtype>
</field>
<field>
<name>reg_code</name>
<xtype>textfield</xtype>
</field>
<field>
<name>pop_range</name>
<xtype>combo</xtype>
</field>
<field>
<name>capital</name>
<xtype>combo</xtype>
</field>
</fields>
</options>
</featurepanel_form>
In addition to the widget definition, the DataStore must have some <field> nodes defined. If a field has <values> then any combobox created will have these values. Example :
<datastore>
<name>DS_FS_DEV4G_GMAP_POPP</name>
<service>S_FS_DEV4G</service>
<params>
<layers>gmap_popp</layers>
<text>GMap Cities (FS)</text>
<fields>
<field>
<name>name</name>
<text>Name</text>
<type>string</type>
</field>
<field>
<name>reg_code</name>
<text>Reg #</text>
<type>integer</type>
</field>
<field>
<name>pop_range</name>
<text>Population</text>
<type>integer</type>
<values>
<value>
<value>1</value>
<text>Less than 10,000</text>
</value>
<value>
<value>2</value>
<text>More than 10,000</text>
</value>
<value>
<value>3</value>
<text>More than 50,000</text>
</value>
<value>
<value>4</value>
<text>More than 100,000</text>
</value>
<value>
<value>5</value>
<text>More than 250,000</text>
</value>
<value>
<value>6</value>
<text>More than 500,000</text>
</value>
</values>
</field>
<field>
<name>capital</name>
<text>Type</text>
<type>integer</type>
<values>
<value>
<value>0</value>
<text>City</text>
</value>
<value>
<value>1</value>
<text>National Capital</text>
</value>
<value>
<value>2</value>
<text>Province Capital</text>
</value>
<value>
<value>3</value>
<text>Territory Capital</text>
</value>
</values>
</field>
</fields>
</params>
</datastore>
N/A
inwindow: | Boolean. Default is ‘false’. Display the panel in a Ext.Window if set to ‘true’. |
---|---|
defaults: | The default properties of the ext items (fields) of the panel. Can be any Ext.form.’chosen_form_xtype’ properties. Here’s some possible useful tags :
|
See also
windowoptions: | The options used by the Ext.Window. Any property set will overwrite its corresponding default value. Possible tags can be any Ext.Window properties. Some possible useful tags :
|
---|
See also
fields: | contains <field> nodes |
---|---|
field: | Must be set in the <fields> node. Define each ExtJS property you want the field to have here. Possible tags can be any Ext.form.’chosen_field’ properties. Some are required :
|
featureserver
read