On Request and _form

View: New views
2 Messages — Rating Filter:   Alert me  

On Request and _form

by AppleII717 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In the "On Request" handler, is there a reason why you can't populate  
the _form collection when parameter mode is set to default, even if  
read only?

I'm experimenting with the http PUT and DELETE actions which I don't  
think are implemented on any web server. I was trying the trick of  
setting a hidden field, "_method",  to the action, which is what RoR  
uses to implement the Restful concept.

I have “parameter mode” set to default and only one parameter in On  
Request. That makes _query populated. Dumping the _form collection to  
the console, I get an empty collection - which the documentation  
implies that you can have one or the other. Setting parameter mode to  
form variables works, but not in fusebox. Setting it to query params  
also works, but probably is not the best approach.

My work around is to add a query parameter to the post action url, but  
I was just wondering why the restriction of only having either _query  
or _form.

Steve Alex
_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: On Request and _form

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> In the "On Request" handler, is there a reason why you can't  
> populate the _form collection when parameter mode is set to default,  
> even if read only?

Because the sole purpose for the On Request handler is to allow you to  
modify the URL so you can design your own URL scheme. I only allow  
_query/_form to be read write within On Request.

Regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/