google-code-export / activeweb

Automatically exported from code.google.com/p/activeweb
0 stars 0 forks source link

Support flag paramters without values #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes I want to be able to just make a request with a value-less parameter. 
This is handy for flags.

request().integrateViews().param("foo").get("/")

-> http://whatever.com/?foo

Setting up like...

request().integrateViews().param("foo", "").get("/")

-> http://whatever.com/?foo=

seems okay but it would a slightly nicer call.

On the other side of the controller I'd like to be able to just check if a 
param exists without having to do any casting of params and Map's or what have 
you...

paramPresent("foo")

-> true (whether there is a value or not)

or something like that

Original issue reported on code.google.com by Just...@gmail.com on 1 Mar 2012 at 8:44

GoogleCodeExporter commented 9 years ago
So param("foo") is null if it's not present in the request, so that effectively 
does what I needed in the controller.

Original comment by Just...@gmail.com on 1 Mar 2012 at 8:47

GoogleCodeExporter commented 9 years ago
fixed, added param(String) method to tests, and exists(String) to HttpSupport - 
available to controllers and filters

Original comment by ipolevoy@gmail.com on 5 Mar 2012 at 7:49