History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: STS-597
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Ben Gunter
Reporter: Andrew Jaquith
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Stripes

Public UrlBindingFactory method to create UrlBinding prototypes

Created: 11/Aug/08 08:15 AM   Updated: 26/Nov/08 02:30 PM
Component/s: ActionBean Dispatching
Affects Version/s: Release 1.5.1
Fix Version/s: Release 1.6, Release 1.5.1

Environment: All


 Description  « Hide
I'd like to propose creation of a public method in UrlBindingFactory that would allow creation of URLBinding prototypes. The method would be similar to parseUrlBinding(Class<? extends ActionBean>), but would take a String parameter instead.

Example:

UrlBinding prototype = UrlBindingFactory.parseUrlBinding(String);

Callers could use this prototype could then be used for any purpose, for example added to the URLBindingFactory in a custom ActionResolver. The use case for this particular request, FYI, is a file-based ActionResolver implementation that would read URLBindings from a file. This would permit URLBindings to be configurable rather than welded to classes as annotations.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Ben Gunter - 26/Nov/08 12:52 PM
Hi, Andrew. I couldn't provide parseUrlBinding(String) because every UrlBinding must be associated with an ActionBean class. Instead, I added parseUrlBinding(Class, String) so you can pass in your own pattern along with the ActionBean class you want to associate it with. Hope this is sufficient for your needs.

Andrew Jaquith - 26/Nov/08 02:30 PM
Re-reading my hastily-typed request several months later, it's clear that I forgot the Class parameter. :)

Thanks for this enhancement. The project I'm working on (JSPWiki) will make good use of this new method. I intend to create a "FileActionResolver" implementation with it, which I will contribute back to Stripes once it's done.

Ben, I don't know if you are American or not, but if you are, Happy Thanksgiving.