Hi, On Apr 19, 2014 12:26 PM, "Stefan Renz" <s.r...@efonds.com> wrote: > > Hi Arun, > > Arjun Dhar wrote: > > Hi, > > > > there is a 1 to 1 mapping between the Wicket Page/Panel and the HTML. > > However one may want to present a different HTML version for a given > > Page/Template. > > > > Where I am going with this ls say you have a entire Site on a Template; but > > want to provide alternate THEMES (assuming its non-responsive) design. You > > cannot re-write the entire Component hierarchy right?! > > > > Is there way to route / map One component to 2 HTML scripts based on User > > Agent? > > See Chapter 12.3.1 "Style and variation parameters for bundles" in the > Wicket Free Guide. > > I would map the user agent to Wicket's style/variation, which you can > set on the Session. Given that you provide your own WebSession class, > you can set this in your Session's constructor, as the Request is passed > as a parameter. > > For example, you detect a mobile use agent, you set the style to "mobile". > > Then, you can have multiple markup files per Component, e.g. > Welcome.html (for non-mobile user agents) and Welcome_mobile.html (for > those detected above). > > However, the Wicket rules of matching Component/HTML hierarchies apply, > meaning that you have the same component tree for both markup files.
in Wicket 7 you can use the new #queue () method and overcome this. > With visibility you can hide components, though, based on the style set > on the session (using Component#getStyle()). > > Hope this helps, > Bye > Stefan > > > > > thanks > > > > ----- > > Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing! > > -- > > View this message in context: http://apache-wicket.1842946.n4.nabble.com/User-Agent-mobile-specific-Pages-tp4665472.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > -- > im Auftrag der eFonds Solutions AG, +49-89-579494-3417 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org >