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 the JSP tags that use it depend on a one-to-one
association of ActionBean to URL. Currently there is no way to specify
which of multiple URLs one would like to build for an ActionBean.
Sorry - perhaps I am missing something - multiple URLs can map to a
single ActionBean. OK. That ActionBean makes a decision as the
controller - using the underlying model - and either forwards or
redirects to a view known by the ActionBean.
I'm sure there is a reason for what you are saying but under what cases
would one need to map an ActionBean to a URL?
Better yet looking at the member example what would happen if "say" the
reverse mapping defaulted to using the 1st UrlBinding URL? i.e.
consider the first array listed URL to be like the default URL or
something. What would break? What would be the issue?
Thanks,
--Nikolaos
As many times as this has been discussed, we've never come up with a
satisfactory solution to that problem.
-Ben
On Mon, May 3, 2010 at 6:28 PM, Aaron Porter <aa...@mongus.com
<mailto:aa...@mongus.com>> wrote:
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 very big change but Ben Gunter would have a better
idea than I would.
Aaron
On 05/03/2010 10:10 AM, Nikolaos Giannopoulos wrote:
> Hi,
>
> We are building a large site that initially supports 2 languages but
> will quickly grow 5+. The site has country specific "virtualized"
> sub-domains i.e. the underlying plumbing is just one site that
accepts
> any language based on country specific site or user preferences.
>
> I really like Clean URLs however our MemberActionBean must
accept ANY of
> the following URLs:
>
> /member/{$event}/{id}
> /miembro/{$event}/{id}
> /membre/{$event}/{id}
> /membro/{$event}/{id}
>
> Unfortunately the following is not allowed:
>
> @UrlBinding("/member/{$event}/{id}")
> @UrlBinding("/miembro/{$event}/{id}")
> @UrlBinding("/membre/{$event}/{id}")
> @UrlBinding("/membro/{$event}/{id}")
> public class MemberActionBean extends BaseActionBean {
>
> Any ideas on how to get something like this to work? We will
have at
> least a dozen other action beans just like this.
>
> --Nikolaos
>
>
------------------------------------------------------------------------------
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
<mailto:Stripes-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
<mailto:Stripes-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users
--
Nikolaos Giannopoulos
Director, BrightMinds Software Inc.
e. nikol...@brightminds.org
w. www.brightminds.org
t. 1.613.822.1700
c. 1.613.797.0036
f. 1.613.822.1915
------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users