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
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
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
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
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
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
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
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
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".
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
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
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
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
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
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
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
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
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
18 matches
Mail list logo