On 28-10-2010 at 14:50, Nikolaos Giannopoulos wrote:
> We have the following:
> @UrlBinding("/share/{id}/{titleUrlified}/${event}")
>
> Where "id" is a Long and "titleUrlified" is a String
>
> When we test the following url:
> /share/0/anything/edit
>
> We get the following binding:
> id=0
> titleUrlified=anything/edit
>
> and the @DefaultHandler view() method gets invoked vs. the edit() method
>
> Why is titleUrlified NOT set to "anything"? Why is the binding so
> aggressive?
> Hopefully I am doing something silly. Anyone????This looks like the same difference as regular expressions have in greedy vs. reluctant operators. Since the event is optional and a String may contain a "/", it's possible for the String to bind everything. Several choices can be made here: - there can be at most one String parameter, and it must be the last (the current greedy binding then works as expected) - all parameters are required (AFAIK this is not the case now) - new syntax is added to allow reluctant binding (as opposed to greedy) - any combination of these (and others) I'm not sure what choice is the best, but in my experience using the first one is a workaround for the problem you're having now (although it may not be an option given your requirements). Oscar -- ,-_ Oscar Westra van Holthe - Kind http://www.xs4all.nl/~kindop/ /() ) (__ ( The haves and the have-nots can often be traced back to the =/ () dids and the did-nots.
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
