The main reason is simplicity. Furthermore, if it would be an attribute, we would loose efficiency, as we would need an instance first, and we would have less options to cache the markup. And now with the latest refactorings, we are getting to a point where you can access the markup even in your constructor, which wouldn't be possible in case it would be an attribute. The loading strategy is flexible however, so I think it should be possible to implement e.g. a loader that uses a static method on your pages to designate where the template should come from...
Eelco On 1/17/06, Frank Silbermann <[EMAIL PROTECTED]> wrote: > I am curious as to the reason Wicket was not designed to make the HTML > filename an attribute of the page object -- analogous to the way we tie > Wicket page components to HTML components -- rather than requiring the > page class name to equal the HTML filename. > > It seems reasonable to want to use the same HTML page to mark up many > Wicket page objects sharing the same layout. Yes, I realize we can > group common HTML in a reusable panel (though we would still need a > trivial HTML file to contain the panel for each Wicket page), and I > realize we can write a single generalized Wicket page and change the > contents of the model. I was just wondering about the advantages gained > by matching the HTML filename to the name of the Wicket page class > rather than matching it to an attribute thereof. > > /Frank > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Martijn > Dashorst > Sent: Tuesday, January 17, 2006 1:23 AM > To: wicket-user@lists.sourceforge.net > Subject: Re: [Wicket-user] How can I separate the java and html? > > Before you go into that path, try the default wicket strategy for some > weeks. You may like it. Most developers I know are very proficient > with this way of working, and our designer is learning it also. > > If you're going to make custom components for your company or client > to re-use and want to 'jar' them up, the Wicket default strategy is > your and your companies (clients) friend. > > As I understand your question, you want to name your page class > com.qlusters.xxx.Foo and your html (in another directory and directory > structure) /yy/bar.html > > This will make your application very hard to comprehend. Wicket > components and markup are two hands on one belly, and you'll end up > modifying both quite a bit in reality. Especially when you're doing > JavaScript. > > Martijn > > On 1/17/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > please see > > > > > http://www.wicket-wiki.org.uk/wiki/index.php/Control_where_HTML_files_ar > e_loaded_from > > > > check out the wiki in general > > > > http://www.wicket-wiki.org.uk/wiki/index.php/Main_Page > > > > there is some good info under the getting started and reference > library > > links. > > > > -Igor > > > > > > > > On 1/16/06, Ittay Dror <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > How can I separate the java class files and the html files: in > different > > directories? with different names? > > > > > > Thanx, > > > Ittay > > > > > > -- > > > =================================== > > > Ittay Dror ( [EMAIL PROTECTED]) > > > openQRM (http://openqrm.sourceforge.net) Team Leader, > > > R&D, Qlusters Inc. > > > +972-3-6081994 Fax: +972-3-6081841 > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through > log > > files > > > for problems? Stop! Download the new AJAX search engine that makes > > > searching your log files as easy as surfing the web. DOWNLOAD > SPLUNK! > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > > _______________________________________________ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > -- > Living a wicket life... > > Martijn Dashorst - http://www.jroller.com/page/dashorst > > Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1 > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642 > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642 > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user