[Cartoweb-users] Problem with insert feature

Giovanni Virdis g.virdis at riteco.it
Mon Jun 16 05:27:00 EDT 2008


Hi, I have this layer in my file .map 

 

LAYER

    NAME "Esposti_PPC"

    STATUS ON

    TYPE POLYGON

    CONNECTIONTYPE POSTGIS

    CONNECTION 'dbname=iwork_ppc user=iwork_ppc password=colapasta
host=10.0.0.3'

    DATA 'geometria from (select geometria, oid, id_esposto,ds_esposto
as descrizione, ubicazione, n_civico, rectel, popolazione,non_autosuf,
num_nonautosuf, note, tpe_fun_id_funuso, tpe_id_tipesposti from
ppc_esposti) as foo using unique "id_esposto" using srid=-1'

    TEMPLATE 'ttt'

    TRANSPARENCY 50

    LABELITEM "ds_esposto"

    CLASS

      NAME "class"

      STYLE

        COLOR 50 50 255

        OUTLINECOLOR 255 50 50

      END

      LABEL

        TYPE TRUETYPE

        FONT "Vera"

        SIZE 7

        COLOR 0 0 0

        POSITION cc

        BACKGROUNDCOLOR 245 235 235

        BACKGROUNDSHADOWCOLOR 55 55 55

        BACKGROUNDSHADOWSIZE 1 1

      END

    END

    LABELMAXSCALE 50000

    METADATA

              'id_attribute_string' 'id_esposto' # query

      'query_returned_attributes' 'id_esposto ds_esposto ubicazione
n_civico rectel popolazione non_autosuf num_nonautosuf note
tpe_fun_id_funuso tpe_id_tipesposti'

      'edit_table' 'ppc_esposti' # PostGIS table

      'edit_geometry_column' 'geometria' # PostGIS geometry column

      'edit_geometry_type' 'polygon' # PostGIS geometry type

      'edit_srid' '-1'

              'edit_attributes'
'id_esposto,ds_esposto|string,ubicazione|string,n_civico|string,rectel|s
tring,popolazione|integer,non_autosuf|string,num_nonautosuf|integer,note
|string,tpe_fun_id_funuso|integer,tpe_id_tipesposti|string' # list of
the editable fields

      'edit_filter' '' # mapserver filter

    END

  END

 

The value of tpe_fun_id_funuso ,tpe_id_tipesposti are get from a select.

When I insert a new geometry and select a value for this field from a
select I have this error 'value' is null

I have debug the file dhtmlinit.js and the error is generate when it's
execute this 

 

var input = eval("myform['edit_feature_" + aFeature.id + "[" +
mainmap.editAttributeNames[j] + "]']");

 

 

inpu is undefined . Non exist the
"myform['edit_feature_numberooffeature[tpe_fun_id_funuso]) 

I must define this field in map file in different mode to integer or
string or I override the dhtmlinit.js file to get the vcalue from a
select?

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080616/8973f4f2/attachment.html


More information about the Cartoweb-users mailing list