Hi Erik, > As far as I understand it, the Panel is always associated with one > html template with the same name as the panel. Actually this is not true. You can work with styles and variations. I have never done myself, but you can do something like:
class MyPanel extends Panel { public String getVariation() { return new Random().nextBool() ? "abc" : "xyz"; } } and have the templates MyPanel_abc.html and MyPanel_xyz.html. Have fun, Erik. Erik Brakkee schreef: > Hi, > > > In many cases, it is useful to define an application wide Panel for > commonly recurring parts of the user interface. Nevertheless, > sometimes, it is necessary to vary only the presentation of a Panel. > > As far as I understand it, the Panel is always associated with one > html template with the same name as the panel. > > Hence, my question is how I can easily vary the html template for a > specific instance of a panel without changing it application wide. > Most easy would be sometihing like this: > > // with the default HTML template > Panel p = new Panel(); > > // with a template different from the default. > Panel p = new Panel(); > p.setTemplate("xyz.html"); // with a class path resource > InputStream is = ...; p.setTemplate(is); // with a template in an > input stream. > > Is something like this already possible? > > Cheers > Erik -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user