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 BaseActionBean {

@UrlBinding("/member/{$event}/{id}")
public class MemberActionBeanEN extends BaseActionBean {

@UrlBinding("/miembro/{$event}/{id}")
public class MemberActionBeanES extends BaseActionBean {

@UrlBinding("/membre/{$event}/{id}")
public class MemberActionBeanFR extends BaseActionBean {

@UrlBinding("/member/{$event}/{id}")
public class MemberActionBeanPT extends BaseActionBean {


What I don't particularly like about this solution is that I have to create M x N subclasses (where M is the number of different language beans and N is the number of languages) which is not difficult just tedious... .


2) Relly on a layer to map the localized URLs to a single language Clean URLs

/member/{$event}/{id}   -->   /member/{$event}/{id}
/miembro/{$event}/{id}  -->   /member/{$event}/{id}
/membre/{$event}/{id}   -->   /member/{$event}/{id}
/membro/{$event}/{id}   -->   /member/{$event}/{id}

@UrlBinding("/member/{$event}/{id}")
public class MemberActionBean extends BaseActionBean {


a) That layer could be in the RP

b) Use a Re-writer component

c) That layer could be an Interceptor

The problem with this approach is that it works for Forwards but Redirects would be problematic without additional logic to support them. Perhaps if I used Interceptors I could do BEFORE and AFTER massaging of the URL.


I'm sure I am not the FIRST person to come across this issue... .

Thoughts?

--Nikolaos




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
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

Reply via email to