[Cartoweb-users] I: Problem with insert feature

Oliver Christen oliver.christen at camptocamp.com
Wed Jun 18 03:56:03 EDT 2008


Hi

thats because you can NOT access a select ID with such syntax.

you need to do some modifications
read the "edit plugin with iexplore" thread there http://lists.maptools.org/pipermail/cartoweb-users/2008-May/thread.html#3651
it's all explained and solved

regards
Oliver
  ----- Original Message ----- 
  From: Giovanni Virdis 
  To: cartoweb-users at lists.maptools.org 
  Sent: Monday, June 16, 2008 1:50 PM
  Subject: [Cartoweb-users] I: Problem with insert feature 


  Hi someone know how solve this problem.

   

  Why id the field is the input item it's ok but when the same field is a select item the line 

   

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

   

  generate an error?

   

  I print the name that the file dhtmledit.js create for each item present in the list of  edit attributes of the map file and it's all right.

   

   

   


------------------------------------------------------------------------------

  Da: Giovanni Virdis 
  Inviato: lunedì 16 giugno 2008 11.27
  A: 'cartoweb-users at lists.maptools.org'
  Oggetto: Problem with insert feature 

   

  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|string,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?

   

   



------------------------------------------------------------------------------


  _______________________________________________
  Cartoweb-users mailing list
  Cartoweb-users at lists.maptools.org
  http://lists.maptools.org/mailman/listinfo/cartoweb-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080618/2ab57a76/attachment.html


More information about the Cartoweb-users mailing list