On Wed, Sep 2, 2009 at 2:28 PM, Thiago H. de Paula Figueiredo<thiag...@gmail.com> wrote: > Em Wed, 02 Sep 2009 18:10:56 -0300, Alfie Kirkpatrick > <alfie.kirkpatr...@ioko.com> escreveu: >> Am wondering about ways to support this scenario cleanly in T5, where >> visual layout is very different per device but the page classes could be >> quite similar (clearly this depends to a large extent on whether devices >> have radically different page flows and layouts). > CSS solves most of the solution. Take a look at media queries > (http://www.w3.org/TR/css3-mediaqueries/). > Regarding Tapestry itself, for issues that can't be solved by using CSS > itself, I would take advantage of the layout component pattern (some parts > of the template could be omitted or replaced) and having a service and a > component to tell me what kind of device did the request.
What if the device doesn't support CSS or that version of CSS? CSS does go a long way, but depending on your array of supported devices its rarely the only solution. My experience has been that while often from the surface it looks like a good idea to render the same page for different devices (the promise of JSF - glad I'm out of that business), the work and page flows tend to differ just enough that in practice it's often easier to keep the page flows separate for each device than try to climb back from an endless swamp of generalizations and customizations per device. However, since it's dead simple to implement new components in T5, I'd look into creating specific components (or a family of components) that might be usable on multiple devices you are supporting for key tasks (say a custom BeanDisplay for devices you are supporting etc.). But the best approach likely varies wildly depending on the devices you are supporting and the application you are developing. Kalle --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org