Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-15 Thread Eelco Hillenius
 i am not saying we shouldntve fixed it to return an array always, what i am
 saying is that it is inconsistent because when we put things into that map
 we dont wrap them in an array, and we should, no?

I don't know whether we should. Those are parameters we ourselves
added, so however we'd add them, it wouldn't lead to inconsistencies
with the servlet request parameters other than that the servlet API
returns an immutable map to start with.

 why is that map mutable?

I think that's in the commit comments somewhere. If I remember
correctly, I wanted to make it immutable, but other parts broke. Note
that it's a copy btw.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-15 Thread Johan Compagner

see my comment on: https://issues.apache.org/jira/browse/WICKET-400

i think we should change the RequestParamters.getParamters()
don't return a map there but return a ValueMap so that we shield it that it
could be request parameters directly (with things from use added)
then they can call directly what the want (like getString or getInt) and we
do the converstion String[] - string/int and so on there

johan


On 5/15/07, Johan Compagner [EMAIL PROTECTED] wrote:


we do add internally some things i thing that we later on need, i
thinkg this is commented in the code. maybe we could move that to
RequestParameters itself? We should try to abstract everything in that
class so that people dont have to use it directly?

On 5/15/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  i am not saying we shouldntve fixed it to return an array always, what
i
 am
  saying is that it is inconsistent because when we put things into that
map
  we dont wrap them in an array, and we should, no?

 I don't know whether we should. Those are parameters we ourselves
 added, so however we'd add them, it wouldn't lead to inconsistencies
 with the servlet request parameters other than that the servlet API
 returns an immutable map to start with.

  why is that map mutable?

 I think that's in the commit comments somewhere. If I remember
 correctly, I wanted to make it immutable, but other parts broke. Note
 that it's a copy btw.

 Eelco


-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-15 Thread Johan Compagner



http://localhost:8080/NT/front/?wicket:bookmarkablePage=:mypackage.EntryPointPageDATA=MOGToh0GbqF%7Et3MZzj8cLc9ruPY-ArazzQcA9%7EFO1e6ivBTv-2tSFD8gd4L0MAtXL2xnud0JujjIhjBUVpDHcE82KiBJ7PK-1T3BamoQyx9QnzEsz7PD1li0Wq%7EvOU87


As you see there, the DATA parameter sent has been mysteriously
transformed to String[1].





that DATA thing you did encrypt it yourself?
that it is String[1] is logical because it is a direct servlet param and
those are all String[]
but how do you get access to the DATA value?
through the PageParameters?

then call pp.getString(DATA)

johan
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-15 Thread manuel barzi
Hi, Johan,

Switching all

... = (String)pageParam.get(...);

to

... = pageParam.getString(...);

made it work.

Why didnt you mention switching to getString before?

Nevertheless, should we understand that get does not behaves as
1.2.5, where String was returned, and not String[1] as 1.2.6.

That's the point, so we might be adviced to refactor our code and
avoid using old get, and use getString in its place.

I guess this clue-point is closing doubts, then ending the thread...

Thank you ;)


On 5/15/07, Johan Compagner [EMAIL PROTECTED] wrote:

 
 http://localhost:8080/NT/front/?wicket:bookmarkablePage=:mypackage.EntryPointPageDATA=MOGToh0GbqF%7Et3MZzj8cLc9ruPY-ArazzQcA9%7EFO1e6ivBTv-2tSFD8gd4L0MAtXL2xnud0JujjIhjBUVpDHcE82KiBJ7PK-1T3BamoQyx9QnzEsz7PD1li0Wq%7EvOU87
 
 
  As you see there, the DATA parameter sent has been mysteriously
  transformed to String[1].



 that DATA thing you did encrypt it yourself?
 that it is String[1] is logical because it is a direct servlet param and
 those are all String[]
 but how do you get access to the DATA value?
 through the PageParameters?

 then call pp.getString(DATA)

 johan


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-15 Thread Johan Compagner

i didn't exactly know at what place you get what from where.

for example if you did it through: request.getRequestParameters
().getParameters()
then we just return a map which i think we should fix.. (we should return a
ValueMap there)
so that you also can do getString()

johan


On 5/15/07, manuel barzi [EMAIL PROTECTED] wrote:


Hi, Johan,

Switching all

... = (String)pageParam.get(...);

to

... = pageParam.getString(...);

made it work.

Why didnt you mention switching to getString before?

Nevertheless, should we understand that get does not behaves as
1.2.5, where String was returned, and not String[1] as 1.2.6.

That's the point, so we might be adviced to refactor our code and
avoid using old get, and use getString in its place.

I guess this clue-point is closing doubts, then ending the thread...

Thank you ;)


On 5/15/07, Johan Compagner [EMAIL PROTECTED] wrote:

 

http://localhost:8080/NT/front/?wicket:bookmarkablePage=:mypackage.EntryPointPageDATA=MOGToh0GbqF%7Et3MZzj8cLc9ruPY-ArazzQcA9%7EFO1e6ivBTv-2tSFD8gd4L0MAtXL2xnud0JujjIhjBUVpDHcE82KiBJ7PK-1T3BamoQyx9QnzEsz7PD1li0Wq%7EvOU87
 
 
  As you see there, the DATA parameter sent has been mysteriously
  transformed to String[1].



 that DATA thing you did encrypt it yourself?
 that it is String[1] is logical because it is a direct servlet param and
 those are all String[]
 but how do you get access to the DATA value?
 through the PageParameters?

 then call pp.getString(DATA)

 johan



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-15 Thread manuel barzi
 for example if you did it through:
 request.getRequestParameters().getParameters()
 then we just return a map which i think we should fix.. (we should return a
 ValueMap there)
 so that you also can do getString()

Yes, that's the point. Sometimes I was doing this in 1.2.5:

public class the-page extends WebPage {
private Map pageParam = null;
public page-constructor() {
pageParam = this.getRequestCycle().getRequest().getParameterMap();
...
}
private a-method() {
String dataParam = (String)pageParam.get(DATA);
}
...
}

by inertia, I also was doing the same with PageParameters, I mean,
using get instead of getString... and so on...

So, I agree, to avoid misunderstandings, it might be fixed, likely by
returning a ValueMap, instead, as you say.

Cheers

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread manuel barzi
Hi, Al,

 Construct your page with:
 public MyPage(PageParams params) {

Yes, I already do this in all my pages...

 You can then go:
 String[] colors = params.getStringArray(color);
 (Which obviously returns the whole array.)
 Or:
 String color = params.getString(color);
 (Which just returns the first (likely the only) instance.)

Unfortunatelly, I have to confirm you this is actually not true in
1.2.6 (I guess the link provided by Jean-Baptiste Quenot is explaining
it all).

In my case I just transfer independent key-values (never repeated),
and when recovering them at the parameters receiver-page, I have to
cast to String[], and all of them are of the size 1. So, really,
what's happening inside is a String to String[1] conversion. Which is
not actually following the mentioned spec.

Thanks ;)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread Jean-Baptiste Quenot
* manuel barzi:

 Unfortunatelly, I have to confirm  you this is actually not true
 in 1.2.6 (I  guess the link provided by  Jean-Baptiste Quenot is
 explaining it all).

 In  my  case  I  just  transfer  independent  key-values  (never
 repeated),   and  when   recovering  them   at  the   parameters
 receiver-page, I have  to cast to String[], and all  of them are
 of the size  1. So, really, what's happening inside  is a String
 to  String[1] conversion. Which  is not  actually following  the
 mentioned spec.

You may  want to try  the patch attached  to the Jira  issue.  But
note  that this  is a  workaround, not  really a  solution to  the
problem as I don't know where those String arrays come from.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread manuel barzi
Hi, Jean-Baptiste,

 See:
 ClassCastException in WebRequestCodingStrategy
 https://issues.apache.org/jira/browse/WICKET-524

This link is about Apache Wicket Project, but not the Wicket
Standalone Project, which is the currently I am using in my
development. Or is that link valid for both cases?

Please, would you mind confirming we the developers where should we
check for mailing lists?

Cause I always understood that wicketOnApache is already in
incubation, with differences in comparison to the original wicketFW.

Thanks, again ;)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread Jean-Baptiste Quenot
* manuel barzi:
 Hi, Jean-Baptiste,
 
  See:
  ClassCastException in WebRequestCodingStrategy
  https://issues.apache.org/jira/browse/WICKET-524
 
 This link is about Apache Wicket Project, but not the Wicket
 Standalone Project, which is the currently I am using in my
 development. Or is that link valid for both cases?

Apache's Jira is also used to track bugs for the 1.2.x maintenance
branch indeed.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread manuel barzi
 You may  want to try  the patch attached  to the Jira  issue.  But
 note  that this  is a  workaround, not  really a  solution to  the
 problem as I don't know where those String arrays come from.

So, should I better switch back to wicket-1.2.5???

Please, confirm to me what's the best decision in this case. It's
important for me, as my development is to be tested in production
quite soon...

Cheers

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread Johan Compagner

the String arrays come from the change eelco did in the ServletWebRequest:
   public Map getParameterMap()
   {
   // Lazy-init parameter map. Only make one copy. It's more efficient,
and
   // we can add stuff to it (which the BookmarkablePage stuff does).
   if (parameterMap == null)
   {
   parameterMap = new HashMap(httpServletRequest.getParameterMap
());
   }
   // return a mutable copy
   return parameterMap;
   }

we now just make a copy
before this code didn't make only a copy but also tested if the parameter
was a String[].length  1
then it kept the string array, if not then it only did store the first
element..

johan


On 5/14/07, Jean-Baptiste Quenot [EMAIL PROTECTED] wrote:


* manuel barzi:

 Unfortunatelly, I have to confirm  you this is actually not true
 in 1.2.6 (I  guess the link provided by  Jean-Baptiste Quenot is
 explaining it all).

 In  my  case  I  just  transfer  independent  key-values  (never
 repeated),   and  when   recovering  them   at  the   parameters
 receiver-page, I have  to cast to String[], and all  of them are
 of the size  1. So, really, what's happening inside  is a String
 to  String[1] conversion. Which  is not  actually following  the
 mentioned spec.

You may  want to try  the patch attached  to the Jira  issue.  But
note  that this  is a  workaround, not  really a  solution to  the
problem as I don't know where those String arrays come from.
--
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread Igor Vaynberg

but you see how this leads to inconsistencies right? all of a sudden some
things are arrays (params coming from request) while others are not (params
we put in). so its messy.

-igor


On 5/14/07, Johan Compagner [EMAIL PROTECTED] wrote:


nope.. its just a hashmap!

johan


On 5/14/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 it is a mutable map...so do params we put into it are also being wrapped
 in string[1] ?

 -igor


 On 5/14/07, Johan Compagner  [EMAIL PROTECTED] wrote:
 
  the String arrays come from the change eelco did in the
  ServletWebRequest:
  public Map getParameterMap()
  {
  // Lazy-init parameter map. Only make one copy. It's more
  efficient, and
  // we can add stuff to it (which the BookmarkablePage stuff
  does).
  if (parameterMap == null)
  {
  parameterMap = new HashMap(
  httpServletRequest.getParameterMap());
  }
  // return a mutable copy
  return parameterMap;
  }
 
  we now just make a copy
  before this code didn't make only a copy but also tested if the
  parameter was a String[].length  1
  then it kept the string array, if not then it only did store the first
  element..
 
  johan
 
 
  On 5/14/07, Jean-Baptiste Quenot  [EMAIL PROTECTED] wrote:
  
   * manuel barzi:
  
Unfortunatelly, I have to confirm  you this is actually not true
in 1.2.6 (I  guess the link provided by  Jean-Baptiste Quenot is
explaining it all).
   
In  my  case  I  just  transfer  independent  key-values  (never
repeated),   and  when   recovering  them   at  the   parameters
receiver-page, I have  to cast to String[], and all  of them are
of the size  1. So, really, what's happening inside  is a String
to  String[1] conversion. Which  is not  actually following  the
mentioned spec.
  
   You may  want to try  the patch attached  to the Jira  issue.  But
   note  that this  is a  workaround, not  really a  solution to  the
   problem as I don't know where those String arrays come from.
   --
Jean-Baptiste Quenot
   aka  John Banana   Qwerty
   http://caraldi.com/jbq/
  
   -
  
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread Alexei Sokolov

I'm not sure if this is related issue, but here it goes:

I have a bookmarkable page with page parameters that is mounted using
QueryStringUrlCodingStrategy. If I open a link to this page in a new browser
window, it works fine. However, if I try to open the same link in another
tab, wicket incorrectly passes page parameters. For example, if I have a
link /blah?p1=hello in the first tab, I will get something like this in
subsequent tabs: /blah?wicket:pageMapName=wicket-0p1=%5BLjava.lang.String

This is a regression in 1.2.6, it worked fine in 1.2.5

Alex

On 5/14/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


but you see how this leads to inconsistencies right? all of a sudden some
things are arrays (params coming from request) while others are not (params
we put in). so its messy.

-igor


On 5/14/07, Johan Compagner [EMAIL PROTECTED] wrote:

 nope.. its just a hashmap!

 johan


 On 5/14/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:

  it is a mutable map...so do params we put into it are also being
  wrapped in string[1] ?
 
  -igor
 
 
  On 5/14/07, Johan Compagner  [EMAIL PROTECTED] wrote:
  
   the String arrays come from the change eelco did in the
   ServletWebRequest:
   public Map getParameterMap()
   {
   // Lazy-init parameter map. Only make one copy. It's more
   efficient, and
   // we can add stuff to it (which the BookmarkablePage stuff
   does).
   if (parameterMap == null)
   {
   parameterMap = new HashMap(
   httpServletRequest.getParameterMap());
   }
   // return a mutable copy
   return parameterMap;
   }
  
   we now just make a copy
   before this code didn't make only a copy but also tested if the
   parameter was a String[].length  1
   then it kept the string array, if not then it only did store the
   first element..
  
   johan
  
  
   On 5/14/07, Jean-Baptiste Quenot  [EMAIL PROTECTED] wrote:
   
* manuel barzi:
   
 Unfortunatelly, I have to confirm  you this is actually not true
 in 1.2.6 (I  guess the link provided by  Jean-Baptiste Quenot is
 explaining it all).

 In  my  case  I  just  transfer  independent  key-values  (never
   
 repeated),   and  when   recovering  them   at  the   parameters
 receiver-page, I have  to cast to String[], and all  of them are
 of the size  1. So, really, what's happening inside  is a String
   
 to  String[1] conversion. Which  is not  actually following  the
 mentioned spec.
   
You may  want to try  the patch attached  to the Jira  issue.  But
note  that this  is a  workaround, not  really a  solution to  the
   
problem as I don't know where those String arrays come from.
--
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/
   

-
   
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
  
   -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it 

Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread Eelco Hillenius
 but you see how this leads to inconsistencies right? all of a sudden some
 things are arrays (params coming from request) while others are not (params
 we put in). so its messy.

The thing that was messy was the old version of Wicket trying to be
smart with those parameters, which resulted in the situation where you
got different results depending on whether you would access the
parameter map via a Wicket abstraction or via the HttpServletRequest
directly.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread Igor Vaynberg

well, its still messy unless you override map.put and wrap things that are
not an array in one.

-igor


On 5/14/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 but you see how this leads to inconsistencies right? all of a sudden
some
 things are arrays (params coming from request) while others are not
(params
 we put in). so its messy.

The thing that was messy was the old version of Wicket trying to be
smart with those parameters, which resulted in the situation where you
got different results depending on whether you would access the
parameter map via a Wicket abstraction or via the HttpServletRequest
directly.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread Eelco Hillenius
 well, its still messy unless you override map.put and wrap things that are
 not an array in one.

Blame the servlet API for that. I don't think we should 'fix' their
bad choice (as yes, what we had was indeed nicer, but just
inconsistent and because of that got people into trouble).

It sounds like we're still running around in circles though. The fix
was there for a reason. I don't know the exact thing from the top of
my head, but I didn't go in there spontaneously. There were reports
and a fix if I remember correctly, and just looking at the consistency
between what we returned and the servlet API returned, I think it is
pretty clear it was bad we decided to deviate. If there are any
problems resulting from this change now, we should fix *those*. I
asked *several* times for reproducable cases and unit tests, as we had
no unit tests that fail because of the change, and neither did any of
the example applications fails. If we have tests, fixes should be easy
no? And they would hopefully stay fixed.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-14 Thread Igor Vaynberg

i am not saying we shouldntve fixed it to return an array always, what i am
saying is that it is inconsistent because when we put things into that map
we dont wrap them in an array, and we should, no? why is that map mutable?

-igor


On 5/14/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 well, its still messy unless you override map.put and wrap things that
are
 not an array in one.

Blame the servlet API for that. I don't think we should 'fix' their
bad choice (as yes, what we had was indeed nicer, but just
inconsistent and because of that got people into trouble).

It sounds like we're still running around in circles though. The fix
was there for a reason. I don't know the exact thing from the top of
my head, but I didn't go in there spontaneously. There were reports
and a fix if I remember correctly, and just looking at the consistency
between what we returned and the servlet API returned, I think it is
pretty clear it was bad we decided to deviate. If there are any
problems resulting from this change now, we should fix *those*. I
asked *several* times for reproducable cases and unit tests, as we had
no unit tests that fail because of the change, and neither did any of
the example applications fails. If we have tests, fixes should be easy
no? And they would hopefully stay fixed.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-13 Thread manuel barzi
Hi, Eelco,

I did a short example, a simple (without much complexity, as the
original page has)  page2page flow by bookmarkable link, passing 2
parameters, but it's working the right way!? it's not converting
String to String[] parameters.

Strange behaviour...  because the phenomenon is actually happening in
the original page I developed at work...

May I send you the whole original page? but I am afraid it won't be
easy in time for me to provide you a unit test

Saludos!

On 5/8/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Yep. Something like that. Manu, could you please provide me with a
 unit test showing your problem? I'd be happy to fix if I have one. I'm
 currently waiting on someone else sending us a test for a related
 problem.

 Cheers!

 Eelco

 On 5/8/07, Gerolf Seitz [EMAIL PROTECTED] wrote:
  i don't know exactly, but i think the change was made because returning a
  String[] is how it's in the spec.
  please correct me if i'm wrong or have the wrong conversation in mind.
 
  gerolf
 
 
 
   On 5/8/07, manu [EMAIL PROTECTED] wrote:
   Dear Sirs,
  
   I updated to Wicket 1.2.6 and I have found the following behavior when
   using BookmarkablePageLink (which was not happening before in Wicket
   1.2.5). The code example is:
  
   private class Link1 extends BookmarkablePageLink {
   private static final long serialVersionUID = 1L;
   public Link1(String linkId, String labelId, String
  labelValue,
   PageParameters params) {
   super(linkId, Page1.class ,
  params);
   this.add(new Label(labelId, labelValue));
   }
   }
  
   When clicking on this link the error on Page1 (target page that
   recovers params) is:
  
   Caused by: java.lang.ClassCastException
  
   After debugging it, I found that the page parameters (Strings added to
   params) were converted to String[1], id est, all arrays, when
   creating the BookmarkablePageLink. So it seems that there inside
   happens this String2String[] transformation.
  
   To jump over this issue, for the moment, I had to switch to standard
   Link class, avoiding the use of BookmarkablePageLink.
  
   What's the solution to this?
  
   Thanks ;)
  
  
  -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-13 Thread Al Maw
Hi,

I've had a look into this.
String parameters in the servlet-api spec are String arrays, so that you
can go:

?color=redcolor=greencolor=blue

...and expect to get String[] color = String { red, green, blue };

This is why we have convenience methods for you (as does servlet-api).

Construct your page with:
public MyPage(PageParams params) {

You can then go:
String[] colors = params.getStringArray(color);
(Which obviously returns the whole array.)

Or:
String color = params.getString(color);
(Which just returns the first (likely the only) instance.)

This behaves properly with both mounted BookmarkablePages, and also
unmounted ones.

Constructing a BookmarkablePageLink, with current 1.3.x code at least,
results in the expected URL (for both mounted and unmounted pages). This
is also interpreted correctly, as detailed above.

I could be wrong, but I really don't think there's a bug here, in 1.3.x
at least.

Regards,

Al

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-13 Thread Jean-Baptiste Quenot
* Al Maw:

 This behaves  properly with both mounted  BookmarkablePages, and
 also unmounted ones.

Hi  Al, we're  only talking  about  1.2.6 in  this thread.   There
appears to  be a regression  or incompatibility between  1.2.5 and
1.2.6.

See:

ClassCastException in WebRequestCodingStrategy
https://issues.apache.org/jira/browse/WICKET-524
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-08 Thread manu
Dear Sirs,

I updated to Wicket 1.2.6 and I have found the following behavior when
using BookmarkablePageLink (which was not happening before in Wicket
1.2.5). The code example is:

private class Link1 extends BookmarkablePageLink {
private static final long serialVersionUID = 1L;
public Link1(String linkId, String labelId, String labelValue,
PageParameters params) {
super(linkId, Page1.class, params); 
this.add(new Label(labelId, labelValue));
}
}

When clicking on this link the error on Page1 (target page that
recovers params) is:

Caused by: java.lang.ClassCastException

After debugging it, I found that the page parameters (Strings added to
params) were converted to String[1], id est, all arrays, when
creating the BookmarkablePageLink. So it seems that there inside
happens this String2String[] transformation.

To jump over this issue, for the moment, I had to switch to standard
Link class, avoiding the use of BookmarkablePageLink.

What's the solution to this?

Thanks ;)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-08 Thread Gerolf Seitz

i don't know exactly, but i think the change was made because returning a
String[] is how it's in the spec.
please correct me if i'm wrong or have the wrong conversation in mind.

gerolf


On 5/8/07, manu [EMAIL PROTECTED] wrote:


Dear Sirs,

I updated to Wicket 1.2.6 and I have found the following behavior when
using BookmarkablePageLink (which was not happening before in Wicket
1.2.5). The code example is:

private class Link1 extends BookmarkablePageLink {
private static final long serialVersionUID = 1L;
public Link1(String linkId, String labelId, String
labelValue,
PageParameters params) {
super(linkId, Page1.class, params);
this.add(new Label(labelId, labelValue));
}
}

When clicking on this link the error on Page1 (target page that
recovers params) is:

Caused by: java.lang.ClassCastException

After debugging it, I found that the page parameters (Strings added to
params) were converted to String[1], id est, all arrays, when
creating the BookmarkablePageLink. So it seems that there inside
happens this String2String[] transformation.

To jump over this issue, for the moment, I had to switch to standard
Link class, avoiding the use of BookmarkablePageLink.

What's the solution to this?

Thanks ;)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-08 Thread Eelco Hillenius
Yep. Something like that. Manu, could you please provide me with a
unit test showing your problem? I'd be happy to fix if I have one. I'm
currently waiting on someone else sending us a test for a related
problem.

Cheers!

Eelco

On 5/8/07, Gerolf Seitz [EMAIL PROTECTED] wrote:
 i don't know exactly, but i think the change was made because returning a
 String[] is how it's in the spec.
 please correct me if i'm wrong or have the wrong conversation in mind.

 gerolf



  On 5/8/07, manu [EMAIL PROTECTED] wrote:
  Dear Sirs,
 
  I updated to Wicket 1.2.6 and I have found the following behavior when
  using BookmarkablePageLink (which was not happening before in Wicket
  1.2.5). The code example is:
 
  private class Link1 extends BookmarkablePageLink {
  private static final long serialVersionUID = 1L;
  public Link1(String linkId, String labelId, String
 labelValue,
  PageParameters params) {
  super(linkId, Page1.class ,
 params);
  this.add(new Label(labelId, labelValue));
  }
  }
 
  When clicking on this link the error on Page1 (target page that
  recovers params) is:
 
  Caused by: java.lang.ClassCastException
 
  After debugging it, I found that the page parameters (Strings added to
  params) were converted to String[1], id est, all arrays, when
  creating the BookmarkablePageLink. So it seems that there inside
  happens this String2String[] transformation.
 
  To jump over this issue, for the moment, I had to switch to standard
  Link class, avoiding the use of BookmarkablePageLink.
 
  What's the solution to this?
 
  Thanks ;)
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user