[mapserver-users] itemquery and validation

2014-05-26 Thread Leehan
of course and thx.

here s the url : 
http://localhost/cgi-bin/mapserv.exe?map=C%3A%5COSGeo4W%5Capache%5Chtdocs%5Cpostgis.mapimgext=459919.257821+6611950.676783+660865.099955+6762581.441074imgxy=320+240layer=communeslayer=empriselayer=+mode=browsesubmit=Refreshzoom=1map_emprise_tolerance=%5Bemprise_tolerance%5Dqlayer=%5Bqlayer%5Dqitem=%5Bqitem%5Dqstring=%5Bqstring%5D

here s the part of the mapfile :
 LAYER
NAME emprise
STATUS on
TYPE POLYGON
CONNECTIONTYPE POSTGIS
CONNECTION host=10.3.1.51 dbname=xxx user=xxx
password=xxx port=5432
DATA geom from activite.emprise using unique gid using srid = 2154
TOLERANCE 1 #tampon autour du clic souris
TOLERANCEUNITS kilometers
VALIDATION 
numope ^[A-Z]{1}[0-9]{6}$
END #end validation 
CLASSITEM tpeope 

and here s part of template :
div align=centerMap Mode:br
select name=mode
  option value=browse [browse_select]Naviguer/option
  option value=query [query_select]Requete une couche, une
réponse/option
  option value=nquery [nquery_select]Requete une couche, n
réponses/option
  option value=itemquery [itemquery_select]Requete
attributaire/option
/select
  /div
...
 tr

  couche requetée (qlayer) :


  input type =text name=qlayer size=10 value=[qlayer]


  


  (qitem) :


  input type =text name=qitem size=10 value=[qitem]





   (qstring) :


  input type =text name=qstring size=10 value=[qstring]



Finally, i have no hidden mapserver variables defined (like for example :
input type=hidden name=map value=[map]) concerning queryitem.

Does it help ?



Eichner, Andreas - SID-NLKM wrote
 Can you post the URL of your request and at least the relevant MAP file
 part? Enabling the debug options is probably a good idea.
 
 I  did set mode = itemquery like i did for query and nquery.
 These 2 work fine.
 ___
 mapserver-users mailing list

 mapserver-users@.osgeo

 http://lists.osgeo.org/mailman/listinfo/mapserver-users





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Re-post-to-be-accepted-tp5142386p5142486.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] itemquery and validation

2014-05-26 Thread Eichner, Andreas - SID
 here s the part of the mapfile :
  LAYER
   NAME emprise
   STATUS on
   TYPE POLYGON
   CONNECTIONTYPE POSTGIS
   CONNECTION host=10.3.1.51 dbname=xxx user=xxx
 password=xxx port=5432
   DATA geom from activite.emprise using unique gid using srid = 2154
   TOLERANCE 1 #tampon autour du clic souris
   TOLERANCEUNITS kilometers
   VALIDATION
   numope ^[A-Z]{1}[0-9]{6}$
   END #end validation
   CLASSITEM tpeope
 

According to the source you need to define a validation pattern for qstring on 
LAYER or in WEB section, too.
This looks a bit weird to me as you specify the QITEM. Therefore a single 
validation pattern for QSTRING must cover all possible QITEM values... I've 
never used such modes but may be some else can shed some light on this.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users