Opened 14 years ago

Closed 14 years ago

#183 closed task (fixed)

FeaturePanel_AttributeForm

Reported by: adube Owned by: adube
Priority: critical Milestone:
Component: widgets Version:
Keywords: Cc:

Description

Brief description

This will be an new "FeaturePanel" widget that will automatically build the form fields from the attributes of the vector features it wants to edit.

Some features

  • supported by both XML and DB configs
  • Only textboxes
  • No pre-defined values
  • No field validation
  • No read-only

Less flexibility, more magic and simplicity.

More details

  • The !FeaturePanel_Form would be too hard to implement in the PGSQLMapContextConfig driver. That is the main reason for this new widget.
  • If we had a WFS service, we could have used the GeoExt.data.AttributeStore to automatically populate the fields with a standard DescribeFeatureType request instead. Since it's not the case, we'll leave that for later.

Change History (4)

comment:1 by adube, 14 years ago

Issue

Unfortunately, it won't be possible to always auto-detect the fields. For already existing features it's working, but for new features, the attribute array is empty. They need to be specified somehow.

If we used WFS, we could do a DescribeFeatureType request, but we're using FeatureServer and there is no such equivalent thing we can use. For that reason, we can't use the 'auto-detect' fields feature.

Solution

It's out of the question to switch for WFS for now, so we'll have to specify the fields in the Resource. In the PGSQLMapContextConfig, it's already supported, but no in XML. We'll have to add it.

comment:2 by adube, 14 years ago

r965, featuring :

  • XMLConfig driver now supporting the 'fields' tag inside the resources :
        <resource>
          <name>R_GMAP_ROAD</name>
          <datastores>
            <datastore>DS_WMS_DEV4G_GMAP_ROAD</datastore>
            <datastore>DS_FS_DEV4G_GMAP_ROAD</datastore>
          </datastores>
          <widgets>
            <widget>W_CreateLineString</widget>
            <widget>W_Update</widget>
            <widget>W_Delete</widget>
            <widget>W_FeaturePanelAttributeForm</widget>
          </widgets>
          <fields>
            <field>
              <name>name_e</name>
              <title>Road name</title>
              <options/>
            </field>
            <field>
              <name>length</name>
              <title>Length</title>
              <options/>
            </field>
          </fields>
        </resource>
    

comment:3 by adube, 14 years ago

r967, featuring :

  • new featurepanel_attributeform widget
  • sample added that shows the use of the widget (xml config)

to do

  • i18n
  • documentation
  • support in PGSQLMapContextConfig driver
  • popup positioning with GeoExt.Popup widget
  • popup width and height configurable, auto-scroll, etc.
  • small bug fix to do : vector feature disappear after commit

comment:4 by adube, 14 years ago

Resolution: fixed
Status: newclosed

r980, featuring :

  • i18n

remaining things - won't do

  • Documentation and PGSQLMapContextConfig driver support are already completed.
  • popup options : since no one currently use this widget, we'll leave it in this current state
  • small bug : isn't related to this widget

Completed.

Note: See TracTickets for help on using tickets.