Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Mobile or Web page  RSS feed

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • 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
 
Bartender
Posts: 19725
92
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!