Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mobile or Web page  RSS feed

 
sudharshan tettu
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
 
Tim Holloway
Bartender
Posts: 18662
71
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!