Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Chris forum
Hi Thomas,

Thx a lot for the explanation, I have chosen to use the nosubmit=1
parameter.

First field works now, the query is not launched anymore when a suggested
street name is clicked:
definition type=suggest connectiontype=db minlength=1 startleft=1
sort=asc *nosubmit=1*


So I am a step further, there is still a problem though with the second
field: it doesn't suggest anything:
definition type=suggest connectiontype=db sort=asc minlength=1
dependfld=lastname

Did you manage to test my data? Does it work on your system?
Here, if I choose the street name Abeilles and then type 2 in the
second field, nothing is proposed while the numbers 23 , 25, 27 and
29 are in the db (the one I sent you).

Sorry to insist...

Chris




On Tue, Apr 2, 2013 at 6:05 PM, Thomas RAFFIN traf...@sirap.fr wrote:

 OK, it is due to bad configuration.

 You could do one of those:
 - Unactivate auto submit for suggested fields == set
 PM.suggestLaunchSearch = false; in js_config.php (applies to all
 suggested fields!)
 - keep PM.suggestLaunchSearch = true; and add to each definition where
 it is needed the nosubmit parameter to 1 like this for instance:
 definition type=suggest connectiontype=db minlength=1 startleft=1
 sort=asc nosubmit=1

 Bye

 Thomas

 Le 02/04/2013 15:43, Chris forum a écrit :

  Hi Thomas,

 Please find attached the necessary files to reproduce my environment.

 Thanx a lot!
 Chris




--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Thomas RAFFIN
Hi,

With your data and this search definition it worked yesterday:

searchitem name=goeland_adresses description=Adresses -Suggest 
Suggest PGSQL-
layer type=postgis name=goeland_addresse_lausanne
   field type=s name=lastname description=Rue wildcard=2
 definition type=suggest connectiontype=db 
minlength=1 startleft=1 sort=asc nosubmit=1
dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT lastname FROM 
test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY 
lastname/sql
!--eventsonchange=$('#pmsfld_numero').val('').flushCache()/events--
/definition
 /field

 field type=n name=numero description=No wildcard=2
  definition type=suggest connectiontype=db sort=asc 
minlength=0 dependfld=lastname
 dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT numero FROM 
test.goeland_addresse_lausanne WHERE numero::text ~* '^[search]' and 
lastname = '[dependfldval]' ORDER BY numero/sql
  /definition
   /field
/layer
/searchitem

Take a look on the dsn that don't need to be re-specified. But it 
requires 1 character or more.
The table is in the test schema here.

Le 03/04/2013 10:06, Chris forum a écrit :
 Hi Thomas,

 Thx a lot for the explanation, I have chosen to use the nosubmit=1 
 parameter.

 First field works now, the query is not launched anymore when a 
 suggested street name is clicked:
 definition type=suggest connectiontype=db minlength=1 
 startleft=1 sort=asc *nosubmit=1*


 So I am a step further, there is still a problem though with the 
 second field: it doesn't suggest anything:
 definition type=suggest connectiontype=db sort=asc 
 minlength=1 dependfld=lastname

 Did you manage to test my data? Does it work on your system?
 Here, if I choose the street name Abeilles and then type 2 in the 
 second field, nothing is proposed while the numbers 23 , 25, 27 
 and 29 are in the db (the one I sent you).

 Sorry to insist...

 Chris




 On Tue, Apr 2, 2013 at 6:05 PM, Thomas RAFFIN traf...@sirap.fr 
 mailto:traf...@sirap.fr wrote:

 OK, it is due to bad configuration.

 You could do one of those:
 - Unactivate auto submit for suggested fields == set
 PM.suggestLaunchSearch = false; in js_config.php (applies to all
 suggested fields!)
 - keep PM.suggestLaunchSearch = true; and add to each definition
 where it is needed the nosubmit parameter to 1 like this for
 instance:
 definition type=suggest connectiontype=db minlength=1
 startleft=1 sort=asc nosubmit=1

 Bye

 Thomas

 Le 02/04/2013 15:43, Chris forum a écrit :

 Hi Thomas,

 Please find attached the necessary files to reproduce my
 environment.

 Thanx a lot!
 Chris





--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Chris forum
Still no luck here...
I copy/paste your search above, replacing the test shema with public one,
but the second field is still not proposing anything.

Here under the content of the pm_debug.log, with 'abe'-Abeilles and '2'
values used in the fields.

Looking at the last line of the log, I have tried to replace
'[dependfldval]' with 'Abeilles' in search.xml, and the second field this
time proposed me values to choose from!

Shouldn't the last line of the log contain 'Abeilles' instead of
'[dependfldval]'? It looks like the substitution is not done.


[03-Apr-2013 13:44:46] P.MAPPER debug info
 Validation of search.xml file succeeded
[03-Apr-2013 13:44:49] P.MAPPER debug info
XML-//definition
 SimpleXMLElement Object
(
[@attributes] = Array
(
[type] = suggest
[connectiontype] = db
[minlength] = 1
[startleft] = 1
[sort] = asc
[nosubmit] = 1
)

[dsn] = @
[sql] = SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne
WHERE lastname IS NOT NULL ORDER BY lastname
[comment] = SimpleXMLElement Object
(
)

)

[03-Apr-2013 13:44:49] P.MAPPER debug info
XML-//definition
 SimpleXMLElement Object
(
[@attributes] = Array
(
[type] = suggest
[connectiontype] = db
[sort] = asc
[minlength] = 0
[dependfld] = lastname
)

[dsn] = @
[sql] = SELECT DISTINCT numero FROM public.goeland_addresse_lausanne
WHERE numero::text ~* '^[search]' and lastname = '[dependfldval]' ORDER BY
numero
)

[03-Apr-2013 13:44:51] P.MAPPER debug info
request
 Array
(
[searchitem] = goeland_adresses
[fldname] = lastname
[q] = abe
[limit] = 0
[timestamp] = 1364989492518
)

[03-Apr-2013 13:44:51] P.MAPPER debug info
Parameters for attribute search file: suggest.php function: __construct
 Array
(
[type] = db
[sort] = asc
[minlength] = 1
[regexleft] =
[startleft] = 1
[dsn] = pgsql://user:pass@localhost:5432/goeland
[encoding] = UTF-8
[sql] = SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne
WHERE lastname IS NOT NULL ORDER BY lastname
[dependFields] = Array
(
)

)

[03-Apr-2013 13:44:51] P.MAPPER debug info
 SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne WHERE
lastname IS NOT NULL ORDER BY lastname

[03-Apr-2013 13:45:39] P.MAPPER debug info
request
 Array
(
[searchitem] = goeland_adresses
[fldname] = numero
[q] = 2
[limit] = 0
[timestamp] = 1364989540505
[dependfldval] = Abeilles
)

[03-Apr-2013 13:45:39] P.MAPPER debug info
Parameters for attribute search file: suggest.php function: __construct
 Array
(
[type] = db
[sort] = asc
[minlength] = 0
[regexleft] =
[startleft] = 0
[dsn] = pgsql://user:pass@localhost:5432/goeland
[encoding] = UTF-8
[sql] = SELECT DISTINCT numero FROM public.goeland_addresse_lausanne
WHERE numero::text ~* '^[search]' and lastname = '[dependfldval]' ORDER BY
numero
[dependFields] = Array
(
)

)

[03-Apr-2013 13:45:39] P.MAPPER debug info
 SELECT DISTINCT numero FROM public.goeland_addresse_lausanne WHERE
numero::text ~* '^2' and lastname = '[dependfldval]' ORDER BY numero


On Wed, Apr 3, 2013 at 11:05 AM, Thomas RAFFIN traf...@sirap.fr wrote:

  Hi,

 With your data and this search definition it worked yesterday:

 searchitem name=goeland_adresses description=Adresses -Suggest Suggest
 PGSQL-
layer type=postgis name=goeland_addresse_lausanne
   field type=s name=lastname description=Rue wildcard=2

 definition type=suggest connectiontype=db minlength=1
 startleft=1 sort=asc nosubmit=1
dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT lastname FROM
 test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname/sql

 !--eventsonchange=$('#pmsfld_numero').val('').flushCache()/events--
/definition
 /field

 field type=n name=numero description=No wildcard=2
  definition type=suggest connectiontype=db sort=asc
 minlength=0 dependfld=lastname

 dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT numero FROM
 test.goeland_addresse_lausanne WHERE numero::text ~* '^[search]' and
 lastname = '[dependfldval]' ORDER BY numero/sql
  /definition
   /field
/layer
 /searchitem

 Take a look on the dsn that don't need to be re-specified. But it requires
 1 character or more.
 The table is in the test schema here.

 Le 03/04/2013 10:06, Chris forum a écrit :

   Hi Thomas,

 Thx a lot for the explanation, I have chosen to use the nosubmit=1
 parameter.

  First field works now, the query is not launched anymore when a suggested
 street name is clicked:
 definition type=suggest connectiontype=db minlength=1 startleft=1
 sort=asc *nosubmit=1*


  So I am a step further, there is still a problem though with the second
 field: it doesn't suggest 

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Thomas RAFFIN
The compress js version is certainly not up-to-date.

Try to change your configuration like this:
pm_javascript_locationjavascript/src/pm_javascript_location

Armin, could you update the js compress files please?

Le 03/04/2013 14:35, Chris forum a écrit :
 Still no luck here...
 I copy/paste your search above, replacing the test shema with public 
 one, but the second field is still not proposing anything.

 Here under the content of the pm_debug.log, with 'abe'-Abeilles and 
 '2' values used in the fields.

 Looking at the last line of the log, I have tried to replace 
 '[dependfldval]' with 'Abeilles' in search.xml, and the second field 
 this time proposed me values to choose from!

 Shouldn't the last line of the log contain 'Abeilles' instead of 
 '[dependfldval]'? It looks like the substitution is not done.


 [03-Apr-2013 13:44:46] P.MAPPER debug info
  Validation of search.xml file succeeded
 [03-Apr-2013 13:44:49] P.MAPPER debug info
 XML-//definition
  SimpleXMLElement Object
 (
 [@attributes] = Array
 (
 [type] = suggest
 [connectiontype] = db
 [minlength] = 1
 [startleft] = 1
 [sort] = asc
 [nosubmit] = 1
 )

 [dsn] = @
 [sql] = SELECT DISTINCT lastname FROM 
 public.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY 
 lastname
 [comment] = SimpleXMLElement Object
 (
 )

 )

 [03-Apr-2013 13:44:49] P.MAPPER debug info
 XML-//definition
  SimpleXMLElement Object
 (
 [@attributes] = Array
 (
 [type] = suggest
 [connectiontype] = db
 [sort] = asc
 [minlength] = 0
 [dependfld] = lastname
 )

 [dsn] = @
 [sql] = SELECT DISTINCT numero FROM 
 public.goeland_addresse_lausanne WHERE numero::text ~* '^[search]' and 
 lastname = '[dependfldval]' ORDER BY numero
 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
 request
  Array
 (
 [searchitem] = goeland_adresses
 [fldname] = lastname
 [q] = abe
 [limit] = 0
 [timestamp] = 1364989492518
 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
 Parameters for attribute search file: suggest.php function: __construct
  Array
 (
 [type] = db
 [sort] = asc
 [minlength] = 1
 [regexleft] =
 [startleft] = 1
 [dsn] = pgsql://user:pass@localhost:5432/goeland
 [encoding] = UTF-8
 [sql] = SELECT DISTINCT lastname FROM 
 public.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY 
 lastname
 [dependFields] = Array
 (
 )

 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
  SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne WHERE 
 lastname IS NOT NULL ORDER BY lastname

 [03-Apr-2013 13:45:39] P.MAPPER debug info
 request
  Array
 (
 [searchitem] = goeland_adresses
 [fldname] = numero
 [q] = 2
 [limit] = 0
 [timestamp] = 1364989540505
 [dependfldval] = Abeilles
 )

 [03-Apr-2013 13:45:39] P.MAPPER debug info
 Parameters for attribute search file: suggest.php function: __construct
  Array
 (
 [type] = db
 [sort] = asc
 [minlength] = 0
 [regexleft] =
 [startleft] = 0
 [dsn] = pgsql://user:pass@localhost:5432/goeland
 [encoding] = UTF-8
 [sql] = SELECT DISTINCT numero FROM 
 public.goeland_addresse_lausanne WHERE numero::text ~* '^[search]' and 
 lastname = '[dependfldval]' ORDER BY numero
 [dependFields] = Array
 (
 )

 )

 [03-Apr-2013 13:45:39] P.MAPPER debug info
  SELECT DISTINCT numero FROM public.goeland_addresse_lausanne WHERE 
 numero::text ~* '^2' and lastname = '[dependfldval]' ORDER BY numero


 On Wed, Apr 3, 2013 at 11:05 AM, Thomas RAFFIN traf...@sirap.fr 
 mailto:traf...@sirap.fr wrote:

 Hi,

 With your data and this search definition it worked yesterday:

 searchitem name=goeland_adresses description=Adresses -Suggest
 Suggest PGSQL-
layer type=postgis name=goeland_addresse_lausanne
   field type=s name=lastname description=Rue wildcard=2

 definition type=suggest connectiontype=db
 minlength=1 startleft=1 sort=asc nosubmit=1
dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT lastname FROM
 test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname/sql
 
 !--eventsonchange=$('#pmsfld_numero').val('').flushCache()/events--
/definition
 /field

 field type=n name=numero description=No wildcard=2
  definition type=suggest connectiontype=db sort=asc
 minlength=0 dependfld=lastname

 dsn encoding=UTF-8@/dsn
 sqlSELECT DISTINCT numero FROM
 test.goeland_addresse_lausanne WHERE numero::text ~* '^[search]'
 and lastname = '[dependfldval]' ORDER BY numero/sql
  /definition
   /field
/layer
 /searchitem

 Take a look on the dsn that don't need to be 

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Chris forum
Well done! \o/
Works perfectly now : ))

Thank you so much Thomas!

Should I dare asking a last question?
Do I better use this, what is it actually doing?
eventsonchange=$('#pmsfld_numero').val('').flushCache()/events



On Wed, Apr 3, 2013 at 3:28 PM, Thomas RAFFIN traf...@sirap.fr wrote:

  The compress js version is certainly not up-to-date.

 Try to change your configuration like this:
 pm_javascript_locationjavascript/src/pm_javascript_location

 Armin, could you update the js compress files please?

 Le 03/04/2013 14:35, Chris forum a écrit :

   Still no luck here...
  I copy/paste your search above, replacing the test shema with public one,
 but the second field is still not proposing anything.

  Here under the content of the pm_debug.log, with 'abe'-Abeilles and '2'
 values used in the fields.

  Looking at the last line of the log, I have tried to replace
 '[dependfldval]' with 'Abeilles' in search.xml, and the second field this
 time proposed me values to choose from!

 Shouldn't the last line of the log contain 'Abeilles' instead of
 '[dependfldval]'? It looks like the substitution is not done.


 [03-Apr-2013 13:44:46] P.MAPPER debug info
  Validation of search.xml file succeeded
 [03-Apr-2013 13:44:49] P.MAPPER debug info
 XML-//definition
  SimpleXMLElement Object
 (
 [@attributes] = Array
 (
 [type] = suggest
 [connectiontype] = db
 [minlength] = 1
 [startleft] = 1
 [sort] = asc
 [nosubmit] = 1
 )

 [dsn] = @
 [sql] = SELECT DISTINCT lastname FROM
 public.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname
 [comment] = SimpleXMLElement Object
 (
 )

 )

 [03-Apr-2013 13:44:49] P.MAPPER debug info
 XML-//definition
  SimpleXMLElement Object
 (
 [@attributes] = Array
 (
 [type] = suggest
 [connectiontype] = db
 [sort] = asc
 [minlength] = 0
 [dependfld] = lastname
 )

 [dsn] = @
 [sql] = SELECT DISTINCT numero FROM public.goeland_addresse_lausanne
 WHERE numero::text ~* '^[search]' and lastname = '[dependfldval]' ORDER BY
 numero
 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
 request
  Array
 (
 [searchitem] = goeland_adresses
 [fldname] = lastname
 [q] = abe
 [limit] = 0
 [timestamp] = 1364989492518
 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
 Parameters for attribute search file: suggest.php function: __construct
  Array
 (
 [type] = db
 [sort] = asc
 [minlength] = 1
 [regexleft] =
 [startleft] = 1
 [dsn] = pgsql://user:pass@localhost:5432/goeland
 [encoding] = UTF-8
 [sql] = SELECT DISTINCT lastname FROM
 public.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname
 [dependFields] = Array
 (
 )

 )

 [03-Apr-2013 13:44:51] P.MAPPER debug info
  SELECT DISTINCT lastname FROM public.goeland_addresse_lausanne WHERE
 lastname IS NOT NULL ORDER BY lastname

 [03-Apr-2013 13:45:39] P.MAPPER debug info
 request
  Array
 (
 [searchitem] = goeland_adresses
 [fldname] = numero
 [q] = 2
 [limit] = 0
 [timestamp] = 1364989540505
 [dependfldval] = Abeilles
 )

 [03-Apr-2013 13:45:39] P.MAPPER debug info
 Parameters for attribute search file: suggest.php function: __construct
  Array
 (
 [type] = db
 [sort] = asc
 [minlength] = 0
 [regexleft] =
 [startleft] = 0
 [dsn] = pgsql://user:pass@localhost:5432/goeland
 [encoding] = UTF-8
 [sql] = SELECT DISTINCT numero FROM public.goeland_addresse_lausanne
 WHERE numero::text ~* '^[search]' and lastname = '[dependfldval]' ORDER BY
 numero
 [dependFields] = Array
 (
 )

 )

 [03-Apr-2013 13:45:39] P.MAPPER debug info
  SELECT DISTINCT numero FROM public.goeland_addresse_lausanne WHERE
 numero::text ~* '^2' and lastname = '[dependfldval]' ORDER BY numero


 On Wed, Apr 3, 2013 at 11:05 AM, Thomas RAFFIN traf...@sirap.fr wrote:

  Hi,

 With your data and this search definition it worked yesterday:

 searchitem name=goeland_adresses description=Adresses -Suggest
 Suggest PGSQL-
layer type=postgis name=goeland_addresse_lausanne
   field type=s name=lastname description=Rue wildcard=2

 definition type=suggest connectiontype=db minlength=1
 startleft=1 sort=asc nosubmit=1
 dsn encoding=UTF-8@/dsn
  sqlSELECT DISTINCT lastname FROM
 test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY
 lastname/sql

 !--eventsonchange=$('#pmsfld_numero').val('').flushCache()/events--
/definition
 /field

 field type=n name=numero description=No wildcard=2
  definition type=suggest connectiontype=db sort=asc
 minlength=0 dependfld=lastname

 dsn encoding=UTF-8@/dsn
  sqlSELECT DISTINCT numero FROM
 test.goeland_addresse_lausanne WHERE numero::text ~* 

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Armin Burger
On 04/03/2013 03:28 PM, Thomas RAFFIN wrote:
 The compress js version is certainly not up-to-date.

 Armin, could you update the js compress files please?

Hi Thomas

I updated now the compressed JS files to SVN trunk. I was believing you 
were also committing these ones to SVN. It means that the pmapper 4.3 
release will very likely have outdated files as well since I just 
exported it from SVN trunk...

Armin

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Armin Burger
On 04/03/2013 03:55 PM, Chris forum wrote:
 Should I dare asking a last question?
 Do I better use this, what is it actually doing?
 eventsonchange=$('#pmsfld_numero').val('').flushCache()/events


that resets the text input field and empties the auto-complete cache of 
the  suggest, so usually it is recommended to be set. You need to adapt 
the xyz part of '#pmsfld_xyz' to the suggest field name.





--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users