On Tue, Jul 14, 2020 at 3:54 PM Ravi Knox <ravi.k...@intellinet.de> wrote:

> Hi Martin,
>
>
>
> that was a good starting point, thank you.
>
> I had to overwrite basically all Mappers within the SystemMapper and mounts
> (since they create mappers themselves).
>
>
>
> The following Methods I had to overwrite:
>
> -        #encodePageComponentInfo - for adding the custom page param
>
> -        #getPageComponentInfo - for reading the custom page param as
> component id
>
> -        #extractPageParameters - to remove the custom page param from the
> parameter list
>
>
>
> Does that make sense to you or did I miss something?
>

I didn't expect that you will need to overwrite all mappers but I haven't
tried myself such thing so I am not fully certain how many changes are
needed.
I've expected that you will need MyPageInstanceMapper registered and this
one is either consulted before the original one or produces a better
compatibility score.


>
>
>
> Thanks,
>
>
>
> Ravi
>
>
>
> <quote author='Martin Grigorov-4'>
>
> Hi Ravi,
>
>
>
> The logic you look for is at
>
>
> https://github.com/apache/wicket/blob/267fb06eec31e8e530fb5f0a4f691a0782e3d5
>
> b8/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractC
> omponentMapper.java#L79
> <https://github.com/apache/wicket/blob/267fb06eec31e8e530fb5f0a4f691a0782e3d5b8/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractComponentMapper.java#L79>
>
> It is called by:
>
>
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/a
> pache/wicket/core/request/mapper/PageInstanceMapper.java#L133
> <https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/PageInstanceMapper.java#L133>
>
>
>
> You will need to use custom version of PageInstanceMapper that overrides
>
> protected void encodePageComponentInfo(Url url, PageComponentInfo info)
>
>
>
> On Mon, Jul 13, 2020 at 8:40 AM Ravi Knox <ravi.k...@intellinet.de> wrote:
>
>
>
> > Hi all,
>
> >
>
> >
>
> >
>
> > my client has a website, where he includes our Wicket application (Wicket
>
> > 8.3.0) via JQuery.load() in his template.
>
> >
>
> > Because of a Reverse-Proxy, he has to whitelist all PageParameters.
>
> >
>
> >
>
> >
>
> > To keep it short;
>
> >
>
> > We need to change the pageId Parameter to something like
>
> > "myapp.com/homepage?pageId=1".
>
> >
>
> >
>
> >
>
> > After reading source code and googleing I couldn't find a way to do this.
>
> >
>
> > Is it even possible? If so, where would be the place to look for?
>
> >
>
> >
>
> >
>
> > Thanks for any hints,
>
> >
>
> >
>
> >
>
> > Ravi
>
> >
>
> >
>
>
>
> </quote>
>
> Quoted from:
>
>
> http://apache-wicket.1842946.n4.nabble.com/Change-pageId-Parameter-structure
> -tp4684229p4684233.html
> <http://apache-wicket.1842946.n4.nabble.com/Change-pageId-Parameter-structure-tp4684229p4684233.html>
>
>

Reply via email to