Parameters to Natural Ajax application

Hi,

Is it possible to pass parameters to Natural Ajax application? I need to receive the user code sent by a Java program through a URL.

Alexandre

Hi Alexandre,

if you want to pass parameters when your Natural Ajax application is started, you can easily add them to the xciParameters.natparamext url parameter.

Example:
Pass an initial value “examplename” for the HELLOW-P program of the Natural Ajax Demos.

http://server:port/cisnatural/servlet/StartCISPage?PAGEURL=/cisnatural/NatLogon.html&xciParameters.natsession=mysession&xciParameters.natparamext=stack=(LOGON SYSEXNJX;HELLOW-P examplename)

In the Natural program you can then use the INPUT statement to read the parameter and assign it to the field you want.
Example:
01 MYPARAM (A30)

INPUT MYPARAM

When creating the URL from within your Java program be sure to url encode the URL.

Does this meet your requirement?

Best Regards,
Christine

Hi Christine,

Thanks… It worked.

Alexandre Oliveira