You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2010/07/19 17:49:18 UTC

WebApplication.addIgnoreMountPath(String)

Hi,

A have a Wicket 1.5 question:

There is a comment
in org.apache.wicket.protocol.http.WebApplication.addIgnoreMountPath(String)
:
public final void addIgnoreMountPath(String path)
{
// TODO how is this supposed to work :/
throw new UnsupportedOperationException();
}

Idea:
currently the root mapper is SystemMapper which extends
CompoundRequestMapper. We can instanceof and cast here
to CompoundRequestMapper and add the list of ignored paths and later on in
org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(Request)
we can check the ignored ones first and then iterate over the added mappers.

The only problem I see is that the user can register
another root IRequestMapper with
org.apache.wicket.Application.setRootRequestMapper(IRequestMapper) and then
this feature will stop working. But in this case many other things wont work
too - see org.apache.wicket.SystemMapper.SystemMapper(Application).

What do you think ?

Re: WebApplication.addIgnoreMountPath(String)

Posted by Martin Grigorov <mg...@apache.org>.
Ok, then I'll deprecate it in 1.4 and remove it completely in 1.5

2010/7/22 Igor Vaynberg <ig...@gmail.com>

> i dont see why
>
> -igor
>
> On Wed, Jul 21, 2010 at 2:15 PM, Martin Grigorov <mg...@apache.org>
> wrote:
> > I forgot about this ...
> >
> > Actually this
> > is org.apache.wicket.protocol.http.WebApplication.unmount(String) from
> > Wicket 1.4.
> > Don't know why this method is renamed ...
> >
> > Do we still need it ?
> >
> > 2010/7/19 Igor Vaynberg <ig...@gmail.com>
> >
> >> you can by subclassing it...
> >>
> >> -igor
> >>
> >> On Mon, Jul 19, 2010 at 10:50 AM, Erik van Oosten <e.vanoosten@grons.nl
> >
> >> wrote:
> >> > Presumably because you can not configure the wicket filter through
> code?
> >> >
> >> > I agree. The use case is thin.
> >> >
> >> > Regards,
> >> >    Erik.
> >> >
> >> >
> >> > Op 19-07-10 18:24, Igor Vaynberg wrote:
> >> >>
> >> >> why do we need this? afaik in 1.4 wicket filter can be configured to
> >> >> ignore paths
> >> >>
> >> >> -igor
> >> >>
> >> >>
> >> >
> >> > --
> >> > Sent from my SMTP compliant software
> >> > Erik van Oosten
> >> > http://day-to-day-stuff.blogspot.com/
> >> >
> >> >
> >> >
> >>
> >
>

Re: WebApplication.addIgnoreMountPath(String)

Posted by Igor Vaynberg <ig...@gmail.com>.
i dont see why

-igor

On Wed, Jul 21, 2010 at 2:15 PM, Martin Grigorov <mg...@apache.org> wrote:
> I forgot about this ...
>
> Actually this
> is org.apache.wicket.protocol.http.WebApplication.unmount(String) from
> Wicket 1.4.
> Don't know why this method is renamed ...
>
> Do we still need it ?
>
> 2010/7/19 Igor Vaynberg <ig...@gmail.com>
>
>> you can by subclassing it...
>>
>> -igor
>>
>> On Mon, Jul 19, 2010 at 10:50 AM, Erik van Oosten <e....@grons.nl>
>> wrote:
>> > Presumably because you can not configure the wicket filter through code?
>> >
>> > I agree. The use case is thin.
>> >
>> > Regards,
>> >    Erik.
>> >
>> >
>> > Op 19-07-10 18:24, Igor Vaynberg wrote:
>> >>
>> >> why do we need this? afaik in 1.4 wicket filter can be configured to
>> >> ignore paths
>> >>
>> >> -igor
>> >>
>> >>
>> >
>> > --
>> > Sent from my SMTP compliant software
>> > Erik van Oosten
>> > http://day-to-day-stuff.blogspot.com/
>> >
>> >
>> >
>>
>

Re: WebApplication.addIgnoreMountPath(String)

Posted by Martin Grigorov <mg...@apache.org>.
I forgot about this ...

Actually this
is org.apache.wicket.protocol.http.WebApplication.unmount(String) from
Wicket 1.4.
Don't know why this method is renamed ...

Do we still need it ?

2010/7/19 Igor Vaynberg <ig...@gmail.com>

> you can by subclassing it...
>
> -igor
>
> On Mon, Jul 19, 2010 at 10:50 AM, Erik van Oosten <e....@grons.nl>
> wrote:
> > Presumably because you can not configure the wicket filter through code?
> >
> > I agree. The use case is thin.
> >
> > Regards,
> >    Erik.
> >
> >
> > Op 19-07-10 18:24, Igor Vaynberg wrote:
> >>
> >> why do we need this? afaik in 1.4 wicket filter can be configured to
> >> ignore paths
> >>
> >> -igor
> >>
> >>
> >
> > --
> > Sent from my SMTP compliant software
> > Erik van Oosten
> > http://day-to-day-stuff.blogspot.com/
> >
> >
> >
>

Re: WebApplication.addIgnoreMountPath(String)

Posted by Igor Vaynberg <ig...@gmail.com>.
you can by subclassing it...

-igor

On Mon, Jul 19, 2010 at 10:50 AM, Erik van Oosten <e....@grons.nl> wrote:
> Presumably because you can not configure the wicket filter through code?
>
> I agree. The use case is thin.
>
> Regards,
>    Erik.
>
>
> Op 19-07-10 18:24, Igor Vaynberg wrote:
>>
>> why do we need this? afaik in 1.4 wicket filter can be configured to
>> ignore paths
>>
>> -igor
>>
>>
>
> --
> Sent from my SMTP compliant software
> Erik van Oosten
> http://day-to-day-stuff.blogspot.com/
>
>
>

Re: WebApplication.addIgnoreMountPath(String)

Posted by Erik van Oosten <e....@grons.nl>.
Presumably because you can not configure the wicket filter through code?

I agree. The use case is thin.

Regards,
     Erik.


Op 19-07-10 18:24, Igor Vaynberg wrote:
> why do we need this? afaik in 1.4 wicket filter can be configured to
> ignore paths
>
> -igor
>
>    

-- 
Sent from my SMTP compliant software
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



Re: WebApplication.addIgnoreMountPath(String)

Posted by Igor Vaynberg <ig...@gmail.com>.
why do we need this? afaik in 1.4 wicket filter can be configured to
ignore paths

-igor

On Mon, Jul 19, 2010 at 8:49 AM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> A have a Wicket 1.5 question:
>
> There is a comment
> in org.apache.wicket.protocol.http.WebApplication.addIgnoreMountPath(String)
> :
> public final void addIgnoreMountPath(String path)
> {
> // TODO how is this supposed to work :/
> throw new UnsupportedOperationException();
> }
>
> Idea:
> currently the root mapper is SystemMapper which extends
> CompoundRequestMapper. We can instanceof and cast here
> to CompoundRequestMapper and add the list of ignored paths and later on in
> org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(Request)
> we can check the ignored ones first and then iterate over the added mappers.
>
> The only problem I see is that the user can register
> another root IRequestMapper with
> org.apache.wicket.Application.setRootRequestMapper(IRequestMapper) and then
> this feature will stop working. But in this case many other things wont work
> too - see org.apache.wicket.SystemMapper.SystemMapper(Application).
>
> What do you think ?
>