You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Korbinian Bachl <ko...@whiskyworld.de> on 2006/11/22 21:14:00 UTC

AbstractRequestTargetUrlCodingStrategy/ private final String mountPath

Hi,
 
im currently digging myself through the coding-strategys and im still hung
on the mountPath. Where in the wicket core is this thing resolved from the
current URL?
 
My Idea was to give wicket an easy way to have niceURLs all over the place
as long as the used variables in the components are primitives. So i thought
these would be there all time, wich would make them preParams in my view.
 
-> preParam/Page/PageParams
 
these preParams would be held in a preParam - arraylist object -> they can
be added by any component by having a annotation (and a definition of valid
values) over the defined variable.
 
however, the trouble is the mountpoint - either you define a solo mountpoint
for the whole strategy  (/foo/ - wich then would be treated as not so nice)
or you grab the first var about it... however, the whole thing in wicket 2.0
is rewritten to have a getMountpoint String - and my idea was to replace
this with an ArrayList;
 
now to all devs: 
does this sound reasonable or just insane? 
and furthermore:
where are the spots i might get in danger by such a refactoring ?
 
Regards
 

Re: AbstractRequestTargetUrlCodingStrategy/ private final String mountPath

Posted by Johan Compagner <jc...@gmail.com>.
its done in
WebRequestCodingStrategy
public final IRequestTargetUrlCodingStrategy urlCodingStrategyForPath(String
path)

and maybe now you are starting to see why wicket 2.0 had that change..
a IRequestTargetUrlCodingStrategy is found if the path that is comming it
starts with that path...
and the instance of the IRequestTargetUrlCodingStrategy uses that same mount
point again
to generate the url. So to be able to find it again the mounts in
WebRequestCodingStrategy MUST be in sync

johan

On 11/22/06, Korbinian Bachl <ko...@whiskyworld.de> wrote:
>
> Hi,
>
> im currently digging myself through the coding-strategys and im still hung
> on the mountPath. Where in the wicket core is this thing resolved from the
> current URL?
>
> My Idea was to give wicket an easy way to have niceURLs all over the place
> as long as the used variables in the components are primitives. So i
> thought
> these would be there all time, wich would make them preParams in my view.
>
> -> preParam/Page/PageParams
>
> these preParams would be held in a preParam - arraylist object -> they can
> be added by any component by having a annotation (and a definition of
> valid
> values) over the defined variable.
>
> however, the trouble is the mountpoint - either you define a solo
> mountpoint
> for the whole strategy  (/foo/ - wich then would be treated as not so
> nice)
> or you grab the first var about it... however, the whole thing in wicket
> 2.0
> is rewritten to have a getMountpoint String - and my idea was to replace
> this with an ArrayList;
>
> now to all devs:
> does this sound reasonable or just insane?
> and furthermore:
> where are the spots i might get in danger by such a refactoring ?
>
> Regards
>
>
>