GET /myapp/search/:q controllers.Searcher(q: String)
GET /myapp/search/:q controllers.Searcher(q: String, price.min: Int ?= 0,price.max: Option[Int], color: Option[String], ...)
String id = params.get("id");
GET /myapp/search/:q controllers.Searcher(q: String)
and then access your parameters using a form, the same was as if they
were POST params with bindFromRequest()
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/W9S_H72WSeQJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
You can do the binding of complex objects as well with play. Check for querystringBindable.
On 9 avr. 2012, at 14:25, Lars Grote <lag...@gmail.com> wrote:
Ahh cool. Didn't know that. Thanks very much.That would work for me than. I still like the way Stripes handles binding of complex objects, but that's another topic.Cheers, Lars--
On Monday, April 9, 2012 1:15:14 PM UTC+1, Kevin Bosman wrote:bindFromRequest also binds from GET params, so you could use your simple route:GET /myapp/search/:q controllers.Searcher(q: String)
and then access your parameters using a form, the same was as if they
were POST params with bindFromRequest()
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/W9S_H72WSeQJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
You can do the binding of complex objects as well with play. Check for querystringBindable.
On 9 avr. 2012, at 14:25, Lars Grote <lag...@gmail.com> wrote:
Ahh cool. Didn't know that. Thanks very much.That would work for me than. I still like the way Stripes handles binding of complex objects, but that's another topic.Cheers, Lars--
On Monday, April 9, 2012 1:15:14 PM UTC+1, Kevin Bosman wrote:bindFromRequest also binds from GET params, so you could use your simple route:GET /myapp/search/:q controllers.Searcher(q: String)
and then access your parameters using a form, the same was as if they
were POST params with bindFromRequest()
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/W9S_H72WSeQJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
On Tue, Apr 10, 2012 at 12:21 AM, Lars Grote <lag...@gmail.com> wrote:
> This sound very interesting, and very promising. I can find the API doc, but
> do you know of any example?
> I looked around but didn't find anything.
>
> Thanks, Lars
>
>
> On Monday, April 9, 2012 9:18:55 PM UTC+1, Guillaume Bort wrote:
>>
>> You can do the binding of complex objects as well with play. Check for
>> querystringBindable.
>>
>> On 9 avr. 2012, at 14:25, Lars Grote <lag...@gmail.com> wrote:
>>
>> Ahh cool. Didn't know that. Thanks very much.
>> That would work for me than. I still like the way Stripes handles binding
>> of complex objects, but that's another topic.
>>
>> Cheers, Lars
>>
>> On Monday, April 9, 2012 1:15:14 PM UTC+1, Kevin Bosman wrote:
>>>
>>> bindFromRequest also binds from GET params, so you could use your simple
>>> route:
>>>
>>> GET /myapp/search/:q controllers.Searcher(q: String)
>>>
>>> and then access your parameters using a form, the same was as if they
>>> were POST params with bindFromRequest()
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "play-framework" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/play-framework/-/W9S_H72WSeQJ.
>> To post to this group, send email to play-fr...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> play-framewor...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/play-framework?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/fiDYcAl-LtoJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
That's quite straightforward. I don't suppose you have a Java example
to complement that though?
The Java interface's bind method simply returns T, so what would be
the correct way to return an equivalent of Left("Article not found")
if the article is not found?
Should it just throw a RuntimeException?
>> To post to this group, send email to play-framework@googlegroups.com.
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> http://groups.google.com/group/play-framework?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/fiDYcAl-LtoJ.
>
> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to
Indeed, I don’t ;)
> The Java interface's bind method simply returns T, so what would be
> the correct way to return an equivalent of Left("Article not found")
> if the article is not found?
> Should it just throw a RuntimeException?
Yes, just throw an exception e and Play will produce a Left(e.getMessage()).
Great, thanks. I'll give it a bash.
>> To post to this group, send email to play-framework@googlegroups.com.
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> http://groups.google.com/group/play-framework?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/fiDYcAl-LtoJ.
>
> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to
Not with PathBindable (because you can only bind your resulting object
only from one value), but with QueryStringBindable, yes (since you can
make use of all the query string parameters).
Something like this (untested):
https://gist.github.com/2344517#gistcomment-248124