You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Warren <wa...@clarksnutrition.com> on 2008/02/15 02:02:56 UTC

RequestCycle Request and storeing objects?

What is the proper way to store objects into the request and retrieve them
in your page? Is this the correct way:

RequestCycle.get().getPageParameters().put("myObject", myObect);

And from my Page:

MyObject myObect =
(MyObect)getWebRequestCycle().getPageParameters().get("myObject");

And can you extend WebRequest the same way you can extend Session and
configure it in MyApp by extending newWebRequest()? And will this cause my
app to use my extended WebRequest? I don't think I am doing something right.

Thanks,

Warren


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


Re: RequestCycle Request and storeing objects?

Posted by Igor Vaynberg <ig...@gmail.com>.
yep, use request cycle metadata - that is the quicker/cleanest way

-igor


On Thu, Feb 14, 2008 at 6:14 PM, Warren <wa...@clarksnutrition.com> wrote:
> I am storieng org.apache.wicket.security.hive.authorization.Principal
>  objects that are associated with why a user was denied access to a page. I
>  then want to access the names of these Principals from my "Accessed Denied"
>  page in order to construct a "Accessed Denied" message. I want to store
>  these Principals from MySwarmStrategy object.
>
>
>
>  > -----Original Message-----
>  > From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
>  > Sent: Thursday, February 14, 2008 5:46 PM
>  > To: users@wicket.apache.org
>  > Subject: Re: RequestCycle Request and storeing objects?
>  >
>  >
>  > what is the usecase of storing something in the request?
>  >
>  > -igor
>  >
>  > On Thu, Feb 14, 2008 at 5:02 PM, Warren
>  > <wa...@clarksnutrition.com> wrote:
>  > > What is the proper way to store objects into the request and
>  > retrieve them
>  > >  in your page? Is this the correct way:
>  > >
>  > >  RequestCycle.get().getPageParameters().put("myObject", myObect);
>  > >
>  > >  And from my Page:
>  > >
>  > >  MyObject myObect =
>  > >  (MyObect)getWebRequestCycle().getPageParameters().get("myObject");
>  > >
>  > >  And can you extend WebRequest the same way you can extend Session and
>  > >  configure it in MyApp by extending newWebRequest()? And will
>  > this cause my
>  > >  app to use my extended WebRequest? I don't think I am doing
>  > something right.
>  > >
>  > >  Thanks,
>  > >
>  > >  Warren
>  > >
>  > >
>  > >  ---------------------------------------------------------------------
>  > >  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  > >  For additional commands, e-mail: users-help@wicket.apache.org
>  > >
>  > >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  > For additional commands, e-mail: users-help@wicket.apache.org
>  >
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: RequestCycle Request and storeing objects?

Posted by Matej Knopp <ma...@gmail.com>.
You can use request cycle metadata (RequestCycle.setMetaData)

-Matej

On Fri, Feb 15, 2008 at 2:45 AM, Igor Vaynberg <ig...@gmail.com> wrote:
> what is the usecase of storing something in the request?
>
>  -igor
>
>
>
>  On Thu, Feb 14, 2008 at 5:02 PM, Warren <wa...@clarksnutrition.com> wrote:
>  > What is the proper way to store objects into the request and retrieve them
>  >  in your page? Is this the correct way:
>  >
>  >  RequestCycle.get().getPageParameters().put("myObject", myObect);
>  >
>  >  And from my Page:
>  >
>  >  MyObject myObect =
>  >  (MyObect)getWebRequestCycle().getPageParameters().get("myObject");
>  >
>  >  And can you extend WebRequest the same way you can extend Session and
>  >  configure it in MyApp by extending newWebRequest()? And will this cause my
>  >  app to use my extended WebRequest? I don't think I am doing something right.
>  >
>  >  Thanks,
>  >
>  >  Warren
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  >  For additional commands, e-mail: users-help@wicket.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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


RE: RequestCycle Request and storeing objects?

Posted by Warren <wa...@clarksnutrition.com>.
I am storieng org.apache.wicket.security.hive.authorization.Principal
objects that are associated with why a user was denied access to a page. I
then want to access the names of these Principals from my "Accessed Denied"
page in order to construct a "Accessed Denied" message. I want to store
these Principals from MySwarmStrategy object.

> -----Original Message-----
> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
> Sent: Thursday, February 14, 2008 5:46 PM
> To: users@wicket.apache.org
> Subject: Re: RequestCycle Request and storeing objects?
>
>
> what is the usecase of storing something in the request?
>
> -igor
>
> On Thu, Feb 14, 2008 at 5:02 PM, Warren
> <wa...@clarksnutrition.com> wrote:
> > What is the proper way to store objects into the request and
> retrieve them
> >  in your page? Is this the correct way:
> >
> >  RequestCycle.get().getPageParameters().put("myObject", myObect);
> >
> >  And from my Page:
> >
> >  MyObject myObect =
> >  (MyObect)getWebRequestCycle().getPageParameters().get("myObject");
> >
> >  And can you extend WebRequest the same way you can extend Session and
> >  configure it in MyApp by extending newWebRequest()? And will
> this cause my
> >  app to use my extended WebRequest? I don't think I am doing
> something right.
> >
> >  Thanks,
> >
> >  Warren
> >
> >
> >  ---------------------------------------------------------------------
> >  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >  For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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


Re: RequestCycle Request and storeing objects?

Posted by Igor Vaynberg <ig...@gmail.com>.
what is the usecase of storing something in the request?

-igor

On Thu, Feb 14, 2008 at 5:02 PM, Warren <wa...@clarksnutrition.com> wrote:
> What is the proper way to store objects into the request and retrieve them
>  in your page? Is this the correct way:
>
>  RequestCycle.get().getPageParameters().put("myObject", myObect);
>
>  And from my Page:
>
>  MyObject myObect =
>  (MyObect)getWebRequestCycle().getPageParameters().get("myObject");
>
>  And can you extend WebRequest the same way you can extend Session and
>  configure it in MyApp by extending newWebRequest()? And will this cause my
>  app to use my extended WebRequest? I don't think I am doing something right.
>
>  Thanks,
>
>  Warren
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

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