Oscar Westra van Holthe - Kind <[EMAIL PROTECTED]> writes:

- The only thing I'm a bit uncertain of is configuration in
- combination with default behaviour.
- 
- At the moment, the interceptor auto-configures itself in reasonable
- behaviour based on the assumption that the JSTL is used and one parameter
- (or its absence).
- 
- In order to keep this property, I propose to make the interceptor's
- superclass abstract, and to create subpackages for each implementation.
- We can then wage a holy war on which one becomes the default ;)

Well, what I had in mind was that everything works as before, really.
If you want to use the JSTL interceptor, you configure your app to use
it, just like you did before. If you want to use your own interceptor,
you subclass BundleInterceptor and configure your app to use that instead.
And there is peace in the land :)

Essentially, BundleInterceptor does the common work and has protected
methods for subclasses to adapt the behavior as needed, both A) for
configuration and B) for putting the resource bundle in the request.
Then, the JSTL interceptor overrides A) the configuration for its
JSTL-specific stuff as well as B) for using the JSTL's constant and
LocalizationContext object for putting the bundle in the request.

In my case, the BundleInterceptor subclass doesn't do any JSTL-specific
configuration and just uses a plain key and ResourceBundle for putting the
bundle in the request.

Let me know what you think. Or, I could commit the code in the StripesStuff
SVN repository and you can have a look, and rip it apart ;)

Cheers,
Freddy
http://www.stripesbook.com



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to