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?
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.
An IDE is no substitute for an Intelligent Developer.
posted 7 years ago
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.