Re: [Stripes-users] Clean URLs and Localization

2010-05-06 Thread Nikolaos Giannopoulos
Rick, I would say that the concept you propose is VERY interesting to me except that in order to work for us would need to allow for: @ResouceBundle( "MyResourceBundleName" ) @UrlBinding( "/${bundleKey}/${event}/{$id} ) Notice NO "/m" on the UrlBinding i.e. that the root URI prefix is not

Re: [Stripes-users] Clean URLs and Localization

2010-05-06 Thread Rick Grashel
I really think including localization use cases in the UrlBinding is bad. However, if it absolutely must be done, then it should be done according to appropriate Java standards. Hardcoding localization strings in compiled code is really not appropriate. If it absolutely had to be done, then the f

Re: [Stripes-users] Clean URLs and Localization

2010-05-06 Thread KR
Ben, Is this not just a problem of limiting the possibilities of URL bindings for an action bean? We could limit those binding by adding extra UrlBinding constraints. For example: @UrlBinding("/{$member}/{$event}/{$id}") @UrlBindingParamRange("member", {"member", "miembro", "membro"}) The URL

Re: [Stripes-users] Clean URLs and Localization

2010-05-05 Thread Nikolaos Giannopoulos
Ben, You are correct. Using an array of UrlBindings would not solve my problem as the reverse mapping requires locale context. I'm going to go with the UrlRewriter solution that Rick suggested and will write back if I end up revisiting this decision. Thanks, --Nikolaos Ben Gunter wrote

Re: [Stripes-users] Clean URLs and Localization

2010-05-04 Thread Ben Gunter
Stripes has to map an ActionBean to a URL whenever or or or RedirectResolution(Class) or various other constructs are used. It is required a lot. While it would be quite simple just to use the first URL specified, that wouldn't be a complete solution, and then we'd have to have a conversation a

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Nikolaos Giannopoulos
Rick, I don' think you are missing anything. I think I finally see the light and you really are suggesting a VERY good solution. Appreciate the well thought out discussion and the fact that you continued in this lengthy discussion. Much appreciated. We will still always have our RP layer

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Rick Grashel
Nikolaos, > OK it would work for Forward resolutions but what about mapping back to > localized Redirect resolutions. No matter how you cut it localization starts > becoming more and more something the web app needs to know about > OR at least a piece of information needs to be retained befor

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Nikolaos Giannopoulos
Ben, Comments in-line Ben Gunter wrote: True, that would be a change we could make that would retain backwards compatibility. OK. The problem with adding multiple URL bindings, though, isn't with resolving a URL to an ActionBean; it's doing the reverse. The Stripes UrlBuilder class and

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Nikolaos Giannopoulos
Rick, Comments in-line Rick Grashel wrote: Nikolaos, To my eyes, this seems to be a situation where you are trying to use Stripes for something that it isn't intended to do. Nor should it perform this function. The moment I saw your requirement, I instantly thought : "URL Rewriting".

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Ben Gunter
True, that would be a change we could make that would retain backwards compatibility. The problem with adding multiple URL bindings, though, isn't with resolving a URL to an ActionBean; it's doing the reverse. The Stripes UrlBuilder class and the JSP tags that use it depend on a one-to-one associat

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Rick Grashel
Nikolaos, To my eyes, this seems to be a situation where you are trying to use Stripes for something that it isn't intended to do. Nor should it perform this function. The moment I saw your requirement, I instantly thought : "URL Rewriting". You really should take a look at the URL rewrite filt

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Nikolaos Giannopoulos
So another option is the following: public class MemberActionBean extends BaseActionBean { @UrlBinding("/member/${event}/{id}") public class MemberActionBeanEN extends MemberActionBean {} @UrlBinding("/miembro/${event}/{id}") public class MemberActionBeanES extends MemberActionBean

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Nikolaos Giannopoulos
Ross, Comments in-line Ross Sargant wrote: Yup. No doubt that the solution completely breaks down if you need to use it with several different parent prefixes. I was able to get away with something similar b/c I had a very limited set of mapped functions that were handled by a small numbe

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Aaron Porter
Hi Nikolaos, If it was me I'd probably change @UrlBinding to take String[] value instead of String value. Then you could do @UrlBinding({ "/member/{$event}/{id}", "/miembro/{$event}/{id}", "/membre/{$event}/{id}", "/membro/{$event}/{id}"}) That shouldn't be a

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Ross Sargant
Yup. No doubt that the solution completely breaks down if you need to use it with several different parent prefixes. I was able to get away with something similar b/c I had a very limited set of mapped functions that were handled by a small number of action beans. It actually had nothing to do with

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Ross Sargant
Hi, Not totally "clean" but what about just parameterizing the first component under a common parent prefix? @UrlBinding("/m/${member}/{$event}/{id}") public class MemberActionBean extends BaseActionBean { private String member; public String getMember(){ } public void setMem

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Nikolaos Giannopoulos
Ross, That's an interesting suggestion unfortunately it won't meet the requirements as the URLs are set... and in fact /m/ is already used for the "mobile" webapp... and then what about /member and /membership... do we go with /m1/ and /m2/??? Gets ugly pretty fast when you need to "re-engin

Re: [Stripes-users] Clean URLs and Localization

2010-05-03 Thread Nikolaos Giannopoulos
Hi, I might as well share my initial thoughts on ways to make this work: 1) Make MemberActionBean abstract and not bind any Clean URL's however create concrete shell subclasses for each language that uses Clean URL's to bind the sub-classed bean public class MemberActionBean extends BaseAct