Hmmm. I'm not convinced yet. I like it from a designer's perspective (not having to use id="wicket-[autolink]"),
but really dislike it from a programmers perspective (implicit behaviour is scary).
Eelco, this is silly. With the old behavior, unless you explicitly convert them to autolinks, you will end up with broken links. It's not as if we're taking something that actually used to work and make it work unexpectedly. In fact, we are doing exactly the opposite: we are making the guarantee to the developer that any static link that used to work before will continue to work under Wicket. This is an important guarantee to make for the sake of previewability, if nothing else.
Silly? Why is that? 'Unless you explicitly convert them'? The old behaviour is to add a link <a id="wcn-[autolink]" etc. Why do I end up with broken links? I add these links just as I add components like: <span id="wcn-blah"
When I say I like it from a designer's perspective, I mean that it *could* (not would) be nice that designers can link an application together without having to know about this autolink thing. On the other hand, you could just tell the designer that he/she must use id="wcn-[autolink]". The ones I work with are generally not dumb asses, so 'you will end up with broken links'? Nonsense!
And from a programmers perspecitive, the bevaviour changes from explicit (wcn-[autolink]) to implicit (some links will actually point to Wicket pages, others will point to static pages. As a programmer I like explicit behaviour, as that makes me clear instantly that I am refering to a Wicket page, while with implicit behaviour - in a worst case scenario - I'd have to scan both my packages for Wicket pages and my webapp directory for static pages in order to find out what I am actually referencing.
And one more thing. Say, you've got Home.html relative to your current
package, and you've got Home.html in your webapp directory. Is see a
problem here.
and...
I have a Home.html in the root of the webapp and a Home component
This should be documented that this can't be done.
(Correct me if I'm wrong) There is no concept of "your current
package" or "component HTML". Autolink is concerns with one and only
one thing: Pages. If you've got Home.html in your webapp directory and
Home.html inside your component directory, we don't care about the
component Home.html. Autolinks deal with pages, not components. When in
doubt, always ask yourself: what would happen if this was a normal HTML
link? Normal HTML links always refer to HTML pages, nothing else.
Que? Let's try this again:
We have: - a Wicket page (relative to your package) Home.java and Home.html - a static HTML page Home.html that is in the root of the web application.
If, in - say OtherPage.html - I refer to Home.html like this: <a href="Home.html">, it will allways refer to the Wicket Page, right? So:
- how do I know (e.g. as a designer) which one is choosen (see my concern on implicit behaviour)?
- how on earth can I refer to my static Home.html?
Eelco
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user