• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mobile or Web page

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is ther any way toconfigure our rendering logic of tags at taglib config xml level basing on if the request is coming from mobile or desktop?
I mean if it is from mobile I should load a differnt renderer class for a specific jsf tag compoment ,instead of handling the logic in if else block in renderer or does it atleast make sense doing something this way?

Thanks
Sudharshan Tettu
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, in JSF, renderers are supposed to be plug-in components. So if/then/else logic isn't appropriate. You simply connect the renderer that is appropriate for the device.

That would mostly apply to cases where you need to swap in a WAP renderer in place of the default HTML renderer, however. These days, most mobiles aren't using WAP anymore, they're using HTML, but the screen size is more limited. For that, the renderer remains the same, but you need to use alternative View definitions. Typically, you'd have an alternate stylesheet "skin" that was more mobile-friendly, and you would often need alternate JSF View layouts as well. In fact, you might even have to break some of the desktop Views down into multiple pages.
 
sudharshan tettu
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi thanks for gettin back to me
but am not yet clear, could you please explain a bit more?
I mean if i cannot hae if else kind of thing in renderer ,how can i resolve it and how exactly i can handle it ......for deskptop and mobile in a different way.....

does component-extention have any role to play here? I dont have much experience on it,am not able to conclude how to proceed ahead.
reply
    Bookmark Topic Watch Topic
  • New Topic