Four Js Development Tools Forum

Discussions by product => GAS and GBC => Topic started by: yap b. on September 02, 2009, 10:59:22 pm



Title: Passing Parameter (arguments) in uri
Post by: yap b. on September 02, 2009, 10:59:22 pm
How do i access parameter values passed in URI when accessing a GWC application in Genero?
For example, accessing the application using http://myserver.com/gas/wa/r/myapp?Arg=john&Arg=doe

how can i access the values "john" and "doe"?
is that the correct way to pass parameter in URI using the same "Arg" as key?

Thanks very much in advance!

regards, BY
 


Title: Re: Passing Parameter (arguments) in uri
Post by: Reuben B. on September 02, 2009, 11:44:46 pm
How do i access parameter values passed in URI when accessing a GWC application in Genero?
For example, accessing the application using http://myserver.com/gas/wa/r/myapp?Arg=john&Arg=doe

how can i access the values "john" and "doe"?
is that the correct way to pass parameter in URI using the same "Arg" as key?

Thanks very much in advance!

regards, BY
 

That is the correct way to pass parameters.  (see example 4 https://4js.com/techdocs/genero/gas/devel/DocRoot/User/URI.html#URI_EXAMPLES)

You can access them using the base.Application methods https://4js.com/techdocs/genero/fgl/devel/DocRoot/User/ClassApplication.html#cmd-line-args

What I suspect you also need to do as it is not immediately obvious and I get asked the question a few times is configure the .xcf file to allow parameters to be passed, that is done with the AllowURLParameteres attribute in the EXECUTION component https://4js.com/techdocs/genero/gas/devel/DocRoot/User/ASAppList.html#APPLICATION_EXECUTION


Title: Re: Passing Parameter (arguments) in uri
Post by: yap b. on September 03, 2009, 03:36:12 pm
Reuben,
  Thank you very much!