I had a similar idea of using an interceptor to alter the result code a
while ago and decided that it was a non-starter mainly because every action
would need another mapping for each platform you determined was worthy of
treating differently. I need to sort something out imminently and the
current way I'm trying is to use a different namespace for the mobile
version e.g. /m and alter the declared stylesheets based on the user agent
(using tiles this is easy, presumably sitemesh could handle this too). For
this I am in the process of developing a 'device profile' with some helper
methods such as isIPhone(), isBlackberry() isSmall, isTablet yada yada.. all
the details are yet to be finalised. Essentially I concluded that devices
can be categorised in families so it's unlikely that you would treat
completely differently either versions of the iPhone or a htc desire. The
html would remain the same although you may tweak the stylesheet. Again,
using tiles any extreme cases can be handled since depending upon the device
profile you can alter the jsp you would include in the template if
stylesheets alone cannot give you the required effect.

Time will tell whether or not this approach works ok or not.. Would be good
to hear of other peoples experiences with tackling this issue.
M
  

-----Original Message-----
From: Zoran Avtarovski [mailto:zo...@sparecreative.com] 
Sent: 30 June 2011 07:31
To: Struts Users Mailing List; Frans Thamura
Subject: Re: Multi Devices and Multilanguage

We use a custom sitemesh decorator for each targeted platform and also a
custom struts theme for each.

This way we use the same core jsp files across the application. By keeping
the JSP functionality simple we find it works really well.

I hate to be the one who breaks it to you but you'll have to do some work
arounds. For example we have a number of key navigation pages which are
quite different for each of the platforms (mobile, tablet, web) and as such
require more work. The action classes have to know the targeted platform to
setup the appropriate data objects.

As for multi-lingual development we use a database backed localised text
system. We've had no issues with it. Having said that we are about to start
on an Arabic language version, which should be a lot of fun ;). Same
principle as above applies, use the S2 localised text wherever possible and
be prepared to create some custom CSS and decorator files for non-latin
based languages.

Z.




On 30/06/11 1:28 AM, "Frans Thamura" <fr...@meruvian.org> wrote:

>hi all
>
>we want to create a multi devices rendering for our apps, which we use 
>struts2, for mobile, tablet and web common, we use jquery mobile, i 
>like the JQM beta1.
>
>and we also want to make web with multi language
>
>anyone can share the strategy which we can start to make this
>
>F



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to