that is currently not possible
Also with these kind of urls you suddenly have all kind of url problems (other resources like images/css/js files) because the base dir is different.

You have to use a url rewriter for that currently.

johan



On 11/7/05, Jeff Miller <[EMAIL PROTECTED]> wrote:
putClassAlias is close to what I was suggesting but it does not remove all of the implementation details from the url.  It eliminates the package name but the url still contains "?bookmarkablePage=" which is an implementation detail for Wicket but is not related to the semantic value of the url.
 
No alias:
 
With putClassAlias(Page2.class, "Page2"):
 
Desired alias:
 
 
Jeff

Johan Compagner <[EMAIL PROTECTED]> wrote:
ApplicationPages is just a configuration object you can set properties that are used for pages (Error pages etc)

For aliasses see wicket-examples, we use there as an example a few page aliasses.

Just put youre bookmarkable page class as a allias:

putClassAlias(MyPage.class, "mypage");



On 11/7/05, Jeff Miller <[EMAIL PROTECTED] > wrote:
Where would I find an example?  I could not find any on wiki, wicket.sourceforge.net, or in examples.  
 
The javadoc is not clear how to use ApplicationPages except that I need to use putClassAlias method.  What object, if any, needs reference to the ApplicationPages object with the aliases?
 
Thanks,
Jeff


Johan Compagner <[EMAIL PROTECTED] > wrote:
there is already support for page aliasses see ApplicationPages



On 11/4/05, Jeff Miller <[EMAIL PROTECTED] > wrote:
Is there a way to create bookmarkable page without embedding any of the Wicket implementation details in the url?  For example, the template example page 2 url is:
 
However, "bookmarkablePage=wicket.examples.template" is a Wicket implementation detail that is used because Wicket needs it and not because it is relevant to the url.  It would be good if the url could be simpler like:
 
Now I realize that Wicket needs to know how to map "Page2" to "wicket.examples.template.Page2".  One way to accomplish this could be to add a method to WebApplication like addAlias(String alias, Class page).  For example:
 
public class TemplateApplication extends WicketExampleApplication
{
    public TemplateApplication()
    {
        getPages().setHomePage(Page1.class);
        addAlias("Page1", Page1.class);
        addAlias("Page2", Page2.class);
    }
}
 
Here are some articles that recommend keeping implementation details out of urls:
 
Thanks,
Jeff


Jeff Miller
[EMAIL PROTECTED]


Yahoo! FareChase - Search multiple travel sites in one click.




Jeff Miller
[EMAIL PROTECTED]


Yahoo! FareChase - Search multiple travel sites in one click.



Reply via email to