Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: Release 1.5
-
Fix Version/s: Release 1.6
-
Component/s: ActionBean Dispatching
-
Labels:None
Description
I've seen that STS-617 was closed but as far as I understand the comment in the ticket, the issue is not fixed but simply closed.
I needed this feature recently, so I have modified the stripes sources to match the URLs using Java-Regex-Patterns that are compiled from the @UrlBinding value.
While I understand that the current implementation is probably way better performance-wise since no regular expressions are used, it would be great if the URL-routing mechanism could be made more flexible/pluggable.
From my experience, it is not possible to change the current behaviour without having to modify stripes itself, since the class UrlBindingFactory is implemented as a singleton.
So even if there is no interest in having a more flexible URL routing mechanism in the core stripes distribution, it would be really great to refactor the core to that extend, that one can easily customize the URL -> ActionBean resolution.
I've come across a similar request for two reasons. For one, I would like this ${event} parameter to simply be excluded if one was not provided, rather than using the name from the default handler.
Secondly, I would like a little customization on the way parameters are bound. For example, if my binding is /search/date-{date}/query-{query}, I would prefer to remove the date- prefix if no parameter was found with the name date, rather than As leaving it intact. This causes a problem with multiple optional parameters and clean urls. As far as I understand, overriding this class is the only way to accomplish such a thing. Any chance it can be made customizable like most all other classes in Stripes?