[AWS] AWS.Parameters.Get

Adrian Hoe 贺文耀 mailbox at adrianhoe.com
Tue May 18 03:09:55 CEST 2010


Hi Pascal and list,

I have a code snippet:


          --AWS.Parameters.Set.Reset ( Form_Data ) ;
          --AWS.Parameters.Set.Add   ( Form_Data, Column_Record_Id,  
Record_Id ) ;
          --AWS.Status.Set.Read_Header ( AWS.Status.Socket  
( Request ) , D ) ;
          --AWS.Status.Set.Parameters ( D, Form_Data ) ;

          AWS.Response.Set.Read_Header ( AWS.Status.Socket  
( Request ), D ) ;
          AWS.Response.Set.Add_Header ( D, Column_Record_Id,  
Record_Id ) ;
          AWS.Response.Send_Header ( AWS.Status.Socket ( Request ),  
D ) ;

          return AWS.Response.URL ( Location => Locations.Web_Record ) ;


I am trying to redirect to another web URI (Locations.Web_Record). I  
also need to pass some processed data to the URI as if parameters  
posted by <form> post action.

	Locations.Web_Record := "/record";
	Locations.Web_Record_Edit := "/record_edit";
	Locations.Web_Record_Save := "/record_save";

with actions:

	Dispatchers.Record.VIew'access
	Dispatchers.Record.Edit'access
	Dispatchers.Record.Save'access

respectively. The process flow is from View -> Edit -> Save -> View.  
The code snippety above is located in Save which it is supposed to  
process some data and then redirect back to View with parameter as if  
posted by a <form> post action.

I have tried both AWS,Status (commented) and AWS.Response. Both  
methods are trying to load the page but give me error:

Safari can’t open the page.
Safari can’t open the page “http://localhost:8080/record” because  
the server unexpectedly dropped the connection. This sometimes occurs  
when the server is busy. Wait for a few minutes, and then try again.




Am I missing something? Is my method correct? Can you/someone please  
enlighten me? Thanks

Best regards,








On May 17, 2010, at 8:19 PM, Adrian Hoe 贺文耀 wrote:

> Oo~ thank you.
>
> Can I use AWS.Parameters.Add to build a AWS.Parameters.List which is  
> later to be passed to another function via
>
>             return AWS.Response.URL ( Location =>  
> Locations.Web_Record ) ;
>
> where the List will be retrieved using AWS.Parameters.Get?
>
> Thanks again.
>
> On May 17, 2010, at 8:03 PM, Pascal Obry wrote:
>
>> Hi Adrian,
>>
>>> I am wondering if this is my overlook or it has been hidden. Where  
>>> can I
>>> find AWS.Parameters.Get as in:
>>>       Search_String  : constant String := AWS.Parameters.Get
>>>                                              ( Table => Form_Data,
>>>                                                Name  =>  
>>> "searchstr" ) ;
>>
>> In AWS.Containers.Tables:
>>
>>   function Get
>>     (Table : Table_Type;
>>      Name  : String;
>>      N     : Positive := 1) return String;
>>   --  Returns the Nth value associated with Key into Table. Returns
>>   --  the emptry string if key does not exist.
>>
>> Which is inherited in AWS.Parameters by:
>>
>>    type List is new AWS.Containers.Tables.Table_Type with private;
>>
>> Pascal.
>>
>> -- 
>>
>> --|------------------------------------------------------
>> --| Pascal Obry                           Team-Ada Member
>> --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
>> --|------------------------------------------------------
>> --|              http://www.obry.net
>> --| "The best way to travel is by means of imagination"
>> --|
>> --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
>>
>
> --
> "If you missed the rising sun and the morning dew, don't miss the  
> beautiful sunset." -- Adrian Hoe inspired by Michal Nowak, June 15  
> 2004
> http://adrianhoe.com
> http://adrianhoe.net
>
>

--
"If you missed the rising sun and the morning dew, don't miss the  
beautiful sunset." -- Adrian Hoe inspired by Michal Nowak, June 15 2004
http://adrianhoe.com
http://adrianhoe.net


-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/aws/attachments/20100518/911c2df3/attachment-0001.htm 


More information about the AWS mailing list