Re: wicket-annotations and page mounting

2015-07-13 Thread Martin Grigorov
Hi,

You should use a modified AnnotatedMountScanner. Its getRequestMapper()
should return
new MountedMapper(mountPath, pageClass, new UrlPathPageParametersEncoder());

Looking at the code [1] it should work for #scanPackage() too.

1.
https://github.com/wicketstuff/core/blob/master/jdk-1.7-parent/annotation/src/main/java/org/wicketstuff/annotation/scan/AnnotatedMountScanner.java#L250

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Jul 10, 2015 at 7:51 PM, Jason Novotny 
wrote:

> Hi,
>
> I'm using wicket-annotations and I've added:
>
> newAnnotatedMountScanner().scanPackage("com.foo.web.pages").mount(this);
>
> in my Application class.
>
> My page classes all have:
>
> @MountPath(value ="summary")
>
> However, I want to adjust the pages to not use query parameters like
> &account=5 and use / like account/5 instead.
>
> Is there a way to set this across the app, just like scanPackage, or do I
> have to set this on each page in my application?
>
> I'm using latest Wicket 6.
>
> Thanks, Jason
>
>
>
>


Re: wicket-annotations and page mounting

2015-07-13 Thread andrea del bene

Hi,

AFAIK this is not possible, you must mount your pages using a path 
parameter (something like: 'summary/${account}').

andrea.

On 10/07/2015 18:51, Jason Novotny wrote:

Hi,

I'm using wicket-annotations and I've added:

newAnnotatedMountScanner().scanPackage("com.foo.web.pages").mount(this);

in my Application class.

My page classes all have:

@MountPath(value ="summary")

However, I want to adjust the pages to not use query parameters like 
&account=5 and use / like account/5 instead.


Is there a way to set this across the app, just like scanPackage, or 
do I have to set this on each page in my application?


I'm using latest Wicket 6.

Thanks, Jason







-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



wicket-annotations and page mounting

2015-07-10 Thread Jason Novotny

Hi,

I'm using wicket-annotations and I've added:

newAnnotatedMountScanner().scanPackage("com.foo.web.pages").mount(this);

in my Application class.

My page classes all have:

@MountPath(value ="summary")

However, I want to adjust the pages to not use query parameters like &account=5 
and use / like account/5 instead.

Is there a way to set this across the app, just like scanPackage, or do I have 
to set this on each page in my application?

I'm using latest Wicket 6.

Thanks, Jason