Whenever I show Wicket to a friend, one the first thngs they ask me:
why can't I use urls like http//localhost/myapp/mypage.html. Why do I
need /myapp?bookmarkable=myapp.MyPage?
I must admit I understand there request, especially as I don't know
any good reason not to have it. Until now I used urlrewriter - a java
servlet filter based Url rewriter - but it is lacking one important
feature. I want *.html urls be case insensitive but I do not want one
rule for each html url. Thus I need to be able to map (key:
url.toLower()) with the case sensitive "class name".
Besides there is another, security aspect. Currently all classes
provided with bookmarkable=... get loaded as long as it is a Page.
Most applications will have BasePages to provide authenication, apply
corporate layout etc.. But currently you can not prevent the user from
calling this pages (urls) directly. Hmm, I guess that is wrong; simply
make the class abstract. Nevertheless
my idea is simple. Extend HttpRequestCycle.handleRender() to call an
empty setPageFromUrl() like
if (setPageFromUrl() || callComponentListener() || bookmarkablePage()
|| homePage())
with an empty implementation like
protected boolean setPageFromUrl() {
return false;
}
Subclasses of HttpRequestCycle may now implement there own logic to
determine the Page from the URL.
Finally make HttpApplication.doGet() non final to allow MyApplication
to subclass doGet() and to replace cycle = new HttpRequestCycle() with
my extended version.
Any thughts?
Juergen
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Wicket-develop mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/wicket-develop