Cool that worked thanks Martijn.

Mounted the page in my Application class like so:
mountBookmarkablePage("myPage", MyPage.class);

then a call to urlFor as below returns the aliased URL. No need for putClassAlias.


thanks again,
Steve







On 10 Feb 2009, at 11:06, Martijn Dashorst wrote:

Mount your page using one of the mount strategies. See
Application#mount for inspiration.

Martijn

On Tue, Feb 10, 2009 at 12:01 PM, Steve Swinsburg
<[email protected]> wrote:
Hi all,
In my application I am generating a link to a page like so:
final String url = urlFor(MyPage.class, null).toString();

and then that link is put in an email. However the link includes the package
name:
e.g. %3Fwicket%3AbookmarkablePage%3D %3Asome.package.name.goes.here.MyPage
I have seen some use of putClassAlias so that it might look like:
bookmarkablePage=myAlias
but can't seem to get this going.
The notes I read say :
Did you know you can define page class alias to not expose your package
structure in the URL? Just
use application.getPages().putClassAlias(MyPage.class, "myAlias"); The URL
will than look like http://.../myApp?bookmarkablePage=myAlias

but that doesn't seem to be valid. The only use of putClassAlias I have seen
is in the SharedResources class. In any case it doesn't work for my
purposes.
How can I get the two working together?
Wicket 1.3.5

cheers,
Steve









--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to