Hi! You can always get session ((CastToYourSession) Session.get())
Also wicket has few built-in ways to vary the style of your application: * https://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html * http://javathoughts.capesugarbird.com/2007/08/branding-wicket-application-take-2.html ** Martin 2010/5/28 msalman <[email protected]>: > > Hi, > > Is it possible for a Page to have to have customized html files depending on > certain parameter (user, customer, etc)? I want to allow users to for a > certain page to be able to provide their own html file for that page or > panel. So depending on the user or customer id I can pick up the right html > file and use that. > > I tried to do this in the my ResourceStreamLocator extension class but I > can't get the session object there. I guess that is the place to set the > html location for the application. > > I also found this code on the web. The problem with it is that the > markupStream object passed in is null. > > @Override > protected void onRender(MarkupStream markupStream) > { > markupStream.next(); > try > { > WebRequestCycle cycle = (WebRequestCycle)RequestCycle.get(); > ServletRequest request = > cycle.getWebRequest().getHttpServletRequest(); > ServletResponse response = > cycle.getWebResponse().getHttpServletResponse(); > > > ServletContext context = > ((WebApplication)getApplication()).getServletContext(); > RequestDispatcher rd = > context.getRequestDispatcher("/com/michni/wicket/....../specificsupplier_custom.html"); > rd.include(request, response); > > //context.getRequestDispatcher("/" + getId() + > ".html").include(request, response); > } > catch (Exception e) > { > throw new WicketRuntimeException(e); > } > } > > > > Any ideas or suggestions please? > > Thanks, > > -Mohammad > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/custom-html-page-tp2234086p2234086.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
