Re: passing a map into PageParameters

2010-06-29 Thread Fernando Wermus
Ray,
I haven't had any succeded either. I am working with fb rest (facebook)
which has some classes that work with json to store several kind of objects.
In my case, I need my page to be bookmarkable.

thanks anyway

On Tue, Jun 29, 2010 at 1:47 AM, Ray Weidner 
ray.weidner.develo...@gmail.com wrote:

 I haven't had any success storing anything other than Strings in
 PageParameters objects.  It makes sense, since these are supposed to
 represent bookmarkable (i.e. GET) parameters.  If you're hoping to throw
 arbitrary Maps into a PageParameters, you're going to be disappointed.  But
 if you have an idea what kind of data is going to be in the Map (especially
 if you're using generics, unlike your example), then you can write a pair
 of
 methods to translate between Map and String for this purpose.

 I'm not sure what limitations on characters that you might run into due to
 the fact that they have to be embedded in a URL, so you have to try it out.
  However, I wouldn't be surprised if Wicket escapes everything cleanly,
 meaning that you don't have to worry about such things.

 Of course, you don't have to embed your Map within a PageParameters if the
 page that you want to go to doesn't need to be bookmarkable.  In that case,
 just pass your Map to the destination page object through a constructor of
 your design, and call #setResponsePage on the page object.


 On Mon, Jun 28, 2010 at 3:23 PM, Fernando Wermus
 fernando.wer...@gmail.comwrote:

  This is not what I want to achieve.
 
  I need to pass a map of  parameters as just an entry into PageParameters
  and
  other entries too.
 
  For instance,
 
 
  Map swfParameters=new HashMap();
  swfParameteres.put(a, 1);
  swfParameteres.put(b, 2);
 
  PageParameters p=new PageParameters();
  p.put(swfParameters, swfParameters);
  p.put(other, other);
 
  On Mon, Jun 28, 2010 at 4:15 PM, jammyjohn jchinnas...@yahoo.com
 wrote:
 
  
   PageParameters parameters = new PageParameters(swfParameters);
  
   This is how the hashmap is constructed in PageParameters..
  
   Thanks,
   J
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/passing-a-map-into-PageParameters-tp2271341p2271351.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: passing a map into PageParameters

2010-06-29 Thread Igor Vaynberg
Page parameters only support strings, so you will have to encode and decode
yourself

-igor

On Jun 29, 2010 9:49 AM, Fernando Wermus fernando.wer...@gmail.com
wrote:

Ray,
   I haven't had any succeded either. I am working with fb rest (facebook)
which has some classes that work with json to store several kind of objects.
In my case, I need my page to be bookmarkable.

thanks anyway


On Tue, Jun 29, 2010 at 1:47 AM, Ray Weidner 
ray.weidner.develo...@gmail.com wrote:

 I haven't...
--

Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: passing a map into PageParameters

2010-06-28 Thread jammyjohn

PageParameters parameters = new PageParameters(swfParameters);

This is how the hashmap is constructed in PageParameters..

Thanks,
J
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/passing-a-map-into-PageParameters-tp2271341p2271351.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: passing a map into PageParameters

2010-06-28 Thread Fernando Wermus
This is not what I want to achieve.

I need to pass a map of  parameters as just an entry into PageParameters and
other entries too.

For instance,


Map swfParameters=new HashMap();
swfParameteres.put(a, 1);
swfParameteres.put(b, 2);

PageParameters p=new PageParameters();
p.put(swfParameters, swfParameters);
p.put(other, other);

On Mon, Jun 28, 2010 at 4:15 PM, jammyjohn jchinnas...@yahoo.com wrote:


 PageParameters parameters = new PageParameters(swfParameters);

 This is how the hashmap is constructed in PageParameters..

 Thanks,
 J
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/passing-a-map-into-PageParameters-tp2271341p2271351.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: passing a map into PageParameters

2010-06-28 Thread Ray Weidner
I haven't had any success storing anything other than Strings in
PageParameters objects.  It makes sense, since these are supposed to
represent bookmarkable (i.e. GET) parameters.  If you're hoping to throw
arbitrary Maps into a PageParameters, you're going to be disappointed.  But
if you have an idea what kind of data is going to be in the Map (especially
if you're using generics, unlike your example), then you can write a pair of
methods to translate between Map and String for this purpose.

I'm not sure what limitations on characters that you might run into due to
the fact that they have to be embedded in a URL, so you have to try it out.
 However, I wouldn't be surprised if Wicket escapes everything cleanly,
meaning that you don't have to worry about such things.

Of course, you don't have to embed your Map within a PageParameters if the
page that you want to go to doesn't need to be bookmarkable.  In that case,
just pass your Map to the destination page object through a constructor of
your design, and call #setResponsePage on the page object.


On Mon, Jun 28, 2010 at 3:23 PM, Fernando Wermus
fernando.wer...@gmail.comwrote:

 This is not what I want to achieve.

 I need to pass a map of  parameters as just an entry into PageParameters
 and
 other entries too.

 For instance,


 Map swfParameters=new HashMap();
 swfParameteres.put(a, 1);
 swfParameteres.put(b, 2);

 PageParameters p=new PageParameters();
 p.put(swfParameters, swfParameters);
 p.put(other, other);

 On Mon, Jun 28, 2010 at 4:15 PM, jammyjohn jchinnas...@yahoo.com wrote:

 
  PageParameters parameters = new PageParameters(swfParameters);
 
  This is how the hashmap is constructed in PageParameters..
 
  Thanks,
  J
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/passing-a-map-into-PageParameters-tp2271341p2271351.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus