That's a feature :-).  The MixedParamUrlCodingStrategy sets the value as a
simple string, whereas anything coming down in the query string gets set as
a string array.

If you use getString("name"), under the covers, the PageParameters will
fetch the first value of an array if it exists (and do a toString()).

-Doug



Gwyn wrote:
> 
> Just noticed that, having mounted a page as:
> 
>    mount(new MixedParamUrlCodingStrategy("/add", Add.class, new
> String[]{"c"}));
> 
> then calling it via http://.../add/100?M=123456, in the constructor I
> get the following:
> 
> pageParameters = [EMAIL PROTECTED] size = 2
>   [0] = [EMAIL PROTECTED] c -> 100
>     key: java.lang.String = [EMAIL PROTECTED]"c"
>     value: java.lang.String = [EMAIL PROTECTED]"100"
>   [1] = [EMAIL PROTECTED] M -> [Ljava.lang.String;@1921360
>     key: java.lang.String = [EMAIL PROTECTED]"M"
>     value: java.lang.String[] = [EMAIL PROTECTED]
>       [0] = [EMAIL PROTECTED]"123456"
> 
> i.e. the first PageParameters value is a string, while the second is
> an array of strings - Bug or Feature?
> 
> /Gwyn
> 
> 

-- 
View this message in context: 
http://www.nabble.com/PageParameter-values---bug--tp17218541p17220146.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.

Reply via email to