Form.js

Summary
Form.js
Constants
i18n_form_button_commit_text{String} Button text
i18n_form_button_commit_tooltip{String} Button tooltip
i18n_form_button_cancel_text{String} Button text
i18n_form_button_cancel_tooltip{String} Button tooltip
Properties
DEFAULT_WINDOW_OFFSET{Object} The default offset value in pixels of the window.
DEFAULT_WINDOW_OPTIONS{Object} The default options of the window to be opened
DEFAULT_DEFAULTS{String} Default default properties of the items of this FormPanel
window{Ext.Window} The window container created if if this.inwindow=true
commiting{Boolean} Used to validate commits made from this FormPanel.
Functions
addOwnerCalled right after this FeaturePanel has been added to an owner.
getActiveOwnerReturn the current activated owner (OpenLayers.Control).
setSingleFeatureSet the singlefeature property.
showFeaturePanelCalled by an owner.
hideFeaturePanelCalled by an owner.
parseFeatureAttributesToFormFieldsCopy each feature attributes in this form if it has a corresponding form field.
parseFormFieldsToFeatureAttributesCopy each form field value to its corresponding feature attribute.
parseFormFieldsToFeatureAttributesCalled when the user click this form “Commit” button.

Constants

i18n_form_button_commit_text

{String} Button text

i18n_form_button_commit_tooltip

{String} Button tooltip

i18n_form_button_cancel_text

{String} Button text

i18n_form_button_cancel_tooltip

{String} Button tooltip

Properties

DEFAULT_WINDOW_OFFSET

{Object} The default offset value in pixels of the window.

DEFAULT_WINDOW_OPTIONS

{Object} The default options of the window to be opened

DEFAULT_DEFAULTS

{String} Default default properties of the items of this FormPanel

window

{Ext.Window} The window container created if if this.inwindow=true

commiting

{Boolean} Used to validate commits made from this FormPanel.

Functions

addOwner

addOwner: function(owner)

Called right after this FeaturePanel has been added to an owner.  The owner is added to this.owners.

Parameters

Owner{<OpenLayers.Control.*>} Can be :
  • EditFeature_Create
  • EditFeature_Update

getActiveOwner

getActiveOwner: function()

Return the current activated owner (OpenLayers.Control).

Returns activeOwner - {<OpenLayers.Control.*>} Can be :

  • EditFeature_Create
  • EditFeature_Update

setSingleFeature

setSingleFeature: function(singlefeature)

Set the singlefeature property.  Can be true or false.  Set by owner.

Parameters

singlefeature{boolean}

showFeaturePanel

showFeaturePanel: function(features)

Called by an owner.  Displays this panel.  If it’s in a window, display it.

N.B. currently supports only ONE feature

Parameters

features{Array(<OpenLayers.Vector.Feature>)}

hideFeaturePanel

hideFeaturePanel: function()

Called by an owner.  Reset the form and hide this.window (if container is a window.

parseFeatureAttributesToFormFields

parseFeatureAttributesToFormFields: function(feature)

Copy each feature attributes in this form if it has a corresponding form field.

N.B. currently supports only ONE feature

Parameters

feature{<OpenLayers.Vector.Feature>} The feature to be edited

parseFormFieldsToFeatureAttributes

parseFormFieldsToFeatureAttributes: function(feature)

Copy each form field value to its corresponding feature attribute.

N.B. currently supports only ONE feature

Parameters

feature{<OpenLayers.Vector.Feature>} The feature that was edited

parseFormFieldsToFeatureAttributes

Called when the user click this form “Commit” button.  Get the current selected feature, apply the modified attribute values and call this.owner.commit function.

N.B. currently supports only ONE feature

addOwner: function(owner)
Called right after this FeaturePanel has been added to an owner.
getActiveOwner: function()
Return the current activated owner (OpenLayers.Control).
setSingleFeature: function(singlefeature)
Set the singlefeature property.
showFeaturePanel: function(features)
Called by an owner.
hideFeaturePanel: function()
Called by an owner.
parseFeatureAttributesToFormFields: function(feature)
Copy each feature attributes in this form if it has a corresponding form field.
parseFormFieldsToFeatureAttributes: function(feature)
Copy each form field value to its corresponding feature attribute.
Close