You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Haulyn R. Jason" <sa...@gmail.com> on 2009/11/07 11:22:18 UTC
How to get Session in Application
Hi,
I want to implement IAuthorizationStrategy in MyApplication, but I do
not know how to get WicketSession, I need to get Component Action List
from WicketSession. Is there some reference?
--
Many thanks!
Haulyn Microproduction
You can access me via:
Location: Shandong Jinan Shumagang 6H-8, 250000
Mobile: +086-15864011231
email: saharabear@gmail.com
website: http://haulynjason.net
gtalk: saharabear@gmail.com
skype: saharabear
QQ: 378606292
persional Twitter: http://twitter.com/saharabear
persional Linkedin: http://www.linkedin.com/in/haulyn
Haulyn Microproduction Twitter: http://twitter.com/haulynmp
Haulyn Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to get Session in Application
Posted by James Carman <jc...@carmanconsulting.com>.
Yes, it's just like servlet programming. You have to have an
HttpServletRequest to get to the HttpSession.
On Sat, Nov 7, 2009 at 8:05 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
> Thanks James, I works well, that means no request, no session.
>
>
> On Sat, Nov 7, 2009 at 8:27 PM, James Carman
> <jc...@carmanconsulting.com> wrote:
>> Don't try to access the session so early. Just get it inside each
>> method, because those methods will be called during a request cycle.
>> Basically, remove your member variable that holds the session and just
>> use SecuritySession.get() in its place.
>>
>> On Sat, Nov 7, 2009 at 7:23 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>>> Hi, James:
>>>
>>> I just using the following code, then I get that error.
>>>
>>> getSecuritySettings().setAuthorizationStrategy(
>>> new IAuthorizationStrategy(){
>>> SecuritySession session = SecuritySession.get();
>>> public boolean isActionAuthorized(Component component, Action action) {
>>> return session.auth(component,action)
>>> }
>>> public <T extends Component> boolean
>>> isInstantiationAuthorized(Class<T> clazz) {
>>> return session.auth(clazz);
>>> }
>>> }
>>> );
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Sat, Nov 7, 2009 at 8:01 PM, James Carman
>>> <jc...@carmanconsulting.com> wrote:
>>>> What session are you trying to access during the application startup?
>>>> A session is tied to a user's session as they browse your site. Who's
>>>> browsing upon application startup?
>>>>
>>>> On Sat, Nov 7, 2009 at 6:42 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>>>>> Hi, I tried this, but I got the following:
>>>>>
>>>>> you can only locate or create sessions in the context of a request
>>>>> cycle when I start the application.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sat, Nov 7, 2009 at 7:38 PM, James Carman
>>>>> <jc...@carmanconsulting.com> wrote:
>>>>>> Session.get()?
>>>>>>
>>>>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/Session.html#get%28%29
>>>>>>
>>>>>> In your custom session class, you can add your own get() method that
>>>>>> returns your specific type:
>>>>>>
>>>>>> public static MySession get()
>>>>>> {
>>>>>> return (MySession)Session.get();
>>>>>> }
>>>>>>
>>>>>> Then, you don't have to cast:
>>>>>>
>>>>>> MySession.get().getMySessionInformationThatImInterestedIn();
>>>>>>
>>>>>> On Sat, Nov 7, 2009 at 5:22 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I want to implement IAuthorizationStrategy in MyApplication, but I do
>>>>>>> not know how to get WicketSession, I need to get Component Action List
>>>>>>> from WicketSession. Is there some reference?
>>>>>>>
>>>>>>> --
>>>>>>> Many thanks!
>>>>>>>
>>>>>>> Haulyn Microproduction
>>>>>>>
>>>>>>> You can access me via:
>>>>>>> Location: Shandong Jinan Shumagang 6H-8, 250000
>>>>>>> Mobile: +086-15864011231
>>>>>>> email: saharabear@gmail.com
>>>>>>> website: http://haulynjason.net
>>>>>>> gtalk: saharabear@gmail.com
>>>>>>> skype: saharabear
>>>>>>> QQ: 378606292
>>>>>>> persional Twitter: http://twitter.com/saharabear
>>>>>>> persional Linkedin: http://www.linkedin.com/in/haulyn
>>>>>>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>>>>>>
>>>>>>>
>>>>>>> Haulyn Jason
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Many thanks!
>>>>>
>>>>> Haulyn Microproduction
>>>>>
>>>>> You can access me via:
>>>>> Location: Shandong Jinan Shumagang 6H-8, 250000
>>>>> Mobile: +086-15864011231
>>>>> email: saharabear@gmail.com
>>>>> website: http://haulynjason.net
>>>>> gtalk: saharabear@gmail.com
>>>>> skype: saharabear
>>>>> QQ: 378606292
>>>>> persional Twitter: http://twitter.com/saharabear
>>>>> persional Linkedin: http://www.linkedin.com/in/haulyn
>>>>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>>>>
>>>>>
>>>>> Haulyn Jason
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Many thanks!
>>>
>>> Haulyn Microproduction
>>>
>>> You can access me via:
>>> Location: Shandong Jinan Shumagang 6H-8, 250000
>>> Mobile: +086-15864011231
>>> email: saharabear@gmail.com
>>> website: http://haulynjason.net
>>> gtalk: saharabear@gmail.com
>>> skype: saharabear
>>> QQ: 378606292
>>> persional Twitter: http://twitter.com/saharabear
>>> persional Linkedin: http://www.linkedin.com/in/haulyn
>>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>>
>>>
>>> Haulyn Jason
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> --
> Many thanks!
>
> Haulyn Microproduction
>
> You can access me via:
> Location: Shandong Jinan Shumagang 6H-8, 250000
> Mobile: +086-15864011231
> email: saharabear@gmail.com
> website: http://haulynjason.net
> gtalk: saharabear@gmail.com
> skype: saharabear
> QQ: 378606292
> persional Twitter: http://twitter.com/saharabear
> persional Linkedin: http://www.linkedin.com/in/haulyn
> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>
>
> Haulyn Jason
>
> ---------------------------------------------------------------------
> 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: How to get Session in Application
Posted by "Haulyn R. Jason" <sa...@gmail.com>.
Thanks James, I works well, that means no request, no session.
On Sat, Nov 7, 2009 at 8:27 PM, James Carman
<jc...@carmanconsulting.com> wrote:
> Don't try to access the session so early. Just get it inside each
> method, because those methods will be called during a request cycle.
> Basically, remove your member variable that holds the session and just
> use SecuritySession.get() in its place.
>
> On Sat, Nov 7, 2009 at 7:23 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>> Hi, James:
>>
>> I just using the following code, then I get that error.
>>
>> getSecuritySettings().setAuthorizationStrategy(
>> new IAuthorizationStrategy(){
>> SecuritySession session = SecuritySession.get();
>> public boolean isActionAuthorized(Component component, Action action) {
>> return session.auth(component,action)
>> }
>> public <T extends Component> boolean
>> isInstantiationAuthorized(Class<T> clazz) {
>> return session.auth(clazz);
>> }
>> }
>> );
>>
>>
>>
>>
>>
>>
>> On Sat, Nov 7, 2009 at 8:01 PM, James Carman
>> <jc...@carmanconsulting.com> wrote:
>>> What session are you trying to access during the application startup?
>>> A session is tied to a user's session as they browse your site. Who's
>>> browsing upon application startup?
>>>
>>> On Sat, Nov 7, 2009 at 6:42 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>>>> Hi, I tried this, but I got the following:
>>>>
>>>> you can only locate or create sessions in the context of a request
>>>> cycle when I start the application.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, Nov 7, 2009 at 7:38 PM, James Carman
>>>> <jc...@carmanconsulting.com> wrote:
>>>>> Session.get()?
>>>>>
>>>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/Session.html#get%28%29
>>>>>
>>>>> In your custom session class, you can add your own get() method that
>>>>> returns your specific type:
>>>>>
>>>>> public static MySession get()
>>>>> {
>>>>> return (MySession)Session.get();
>>>>> }
>>>>>
>>>>> Then, you don't have to cast:
>>>>>
>>>>> MySession.get().getMySessionInformationThatImInterestedIn();
>>>>>
>>>>> On Sat, Nov 7, 2009 at 5:22 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I want to implement IAuthorizationStrategy in MyApplication, but I do
>>>>>> not know how to get WicketSession, I need to get Component Action List
>>>>>> from WicketSession. Is there some reference?
>>>>>>
>>>>>> --
>>>>>> Many thanks!
>>>>>>
>>>>>> Haulyn Microproduction
>>>>>>
>>>>>> You can access me via:
>>>>>> Location: Shandong Jinan Shumagang 6H-8, 250000
>>>>>> Mobile: +086-15864011231
>>>>>> email: saharabear@gmail.com
>>>>>> website: http://haulynjason.net
>>>>>> gtalk: saharabear@gmail.com
>>>>>> skype: saharabear
>>>>>> QQ: 378606292
>>>>>> persional Twitter: http://twitter.com/saharabear
>>>>>> persional Linkedin: http://www.linkedin.com/in/haulyn
>>>>>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>>>>>
>>>>>>
>>>>>> Haulyn Jason
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Many thanks!
>>>>
>>>> Haulyn Microproduction
>>>>
>>>> You can access me via:
>>>> Location: Shandong Jinan Shumagang 6H-8, 250000
>>>> Mobile: +086-15864011231
>>>> email: saharabear@gmail.com
>>>> website: http://haulynjason.net
>>>> gtalk: saharabear@gmail.com
>>>> skype: saharabear
>>>> QQ: 378606292
>>>> persional Twitter: http://twitter.com/saharabear
>>>> persional Linkedin: http://www.linkedin.com/in/haulyn
>>>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>>>
>>>>
>>>> Haulyn Jason
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>>
>>
>> --
>> Many thanks!
>>
>> Haulyn Microproduction
>>
>> You can access me via:
>> Location: Shandong Jinan Shumagang 6H-8, 250000
>> Mobile: +086-15864011231
>> email: saharabear@gmail.com
>> website: http://haulynjason.net
>> gtalk: saharabear@gmail.com
>> skype: saharabear
>> QQ: 378606292
>> persional Twitter: http://twitter.com/saharabear
>> persional Linkedin: http://www.linkedin.com/in/haulyn
>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>
>>
>> Haulyn Jason
>>
>> ---------------------------------------------------------------------
>> 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
>
>
--
Many thanks!
Haulyn Microproduction
You can access me via:
Location: Shandong Jinan Shumagang 6H-8, 250000
Mobile: +086-15864011231
email: saharabear@gmail.com
website: http://haulynjason.net
gtalk: saharabear@gmail.com
skype: saharabear
QQ: 378606292
persional Twitter: http://twitter.com/saharabear
persional Linkedin: http://www.linkedin.com/in/haulyn
Haulyn Microproduction Twitter: http://twitter.com/haulynmp
Haulyn Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to get Session in Application
Posted by James Carman <jc...@carmanconsulting.com>.
Don't try to access the session so early. Just get it inside each
method, because those methods will be called during a request cycle.
Basically, remove your member variable that holds the session and just
use SecuritySession.get() in its place.
On Sat, Nov 7, 2009 at 7:23 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
> Hi, James:
>
> I just using the following code, then I get that error.
>
> getSecuritySettings().setAuthorizationStrategy(
> new IAuthorizationStrategy(){
> SecuritySession session = SecuritySession.get();
> public boolean isActionAuthorized(Component component, Action action) {
> return session.auth(component,action)
> }
> public <T extends Component> boolean
> isInstantiationAuthorized(Class<T> clazz) {
> return session.auth(clazz);
> }
> }
> );
>
>
>
>
>
>
> On Sat, Nov 7, 2009 at 8:01 PM, James Carman
> <jc...@carmanconsulting.com> wrote:
>> What session are you trying to access during the application startup?
>> A session is tied to a user's session as they browse your site. Who's
>> browsing upon application startup?
>>
>> On Sat, Nov 7, 2009 at 6:42 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>>> Hi, I tried this, but I got the following:
>>>
>>> you can only locate or create sessions in the context of a request
>>> cycle when I start the application.
>>>
>>>
>>>
>>>
>>>
>>> On Sat, Nov 7, 2009 at 7:38 PM, James Carman
>>> <jc...@carmanconsulting.com> wrote:
>>>> Session.get()?
>>>>
>>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/Session.html#get%28%29
>>>>
>>>> In your custom session class, you can add your own get() method that
>>>> returns your specific type:
>>>>
>>>> public static MySession get()
>>>> {
>>>> return (MySession)Session.get();
>>>> }
>>>>
>>>> Then, you don't have to cast:
>>>>
>>>> MySession.get().getMySessionInformationThatImInterestedIn();
>>>>
>>>> On Sat, Nov 7, 2009 at 5:22 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>>>>> Hi,
>>>>>
>>>>> I want to implement IAuthorizationStrategy in MyApplication, but I do
>>>>> not know how to get WicketSession, I need to get Component Action List
>>>>> from WicketSession. Is there some reference?
>>>>>
>>>>> --
>>>>> Many thanks!
>>>>>
>>>>> Haulyn Microproduction
>>>>>
>>>>> You can access me via:
>>>>> Location: Shandong Jinan Shumagang 6H-8, 250000
>>>>> Mobile: +086-15864011231
>>>>> email: saharabear@gmail.com
>>>>> website: http://haulynjason.net
>>>>> gtalk: saharabear@gmail.com
>>>>> skype: saharabear
>>>>> QQ: 378606292
>>>>> persional Twitter: http://twitter.com/saharabear
>>>>> persional Linkedin: http://www.linkedin.com/in/haulyn
>>>>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>>>>
>>>>>
>>>>> Haulyn Jason
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Many thanks!
>>>
>>> Haulyn Microproduction
>>>
>>> You can access me via:
>>> Location: Shandong Jinan Shumagang 6H-8, 250000
>>> Mobile: +086-15864011231
>>> email: saharabear@gmail.com
>>> website: http://haulynjason.net
>>> gtalk: saharabear@gmail.com
>>> skype: saharabear
>>> QQ: 378606292
>>> persional Twitter: http://twitter.com/saharabear
>>> persional Linkedin: http://www.linkedin.com/in/haulyn
>>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>>
>>>
>>> Haulyn Jason
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> --
> Many thanks!
>
> Haulyn Microproduction
>
> You can access me via:
> Location: Shandong Jinan Shumagang 6H-8, 250000
> Mobile: +086-15864011231
> email: saharabear@gmail.com
> website: http://haulynjason.net
> gtalk: saharabear@gmail.com
> skype: saharabear
> QQ: 378606292
> persional Twitter: http://twitter.com/saharabear
> persional Linkedin: http://www.linkedin.com/in/haulyn
> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>
>
> Haulyn Jason
>
> ---------------------------------------------------------------------
> 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: How to get Session in Application
Posted by "Haulyn R. Jason" <sa...@gmail.com>.
Hi, James:
I just using the following code, then I get that error.
getSecuritySettings().setAuthorizationStrategy(
new IAuthorizationStrategy(){
SecuritySession session = SecuritySession.get();
public boolean isActionAuthorized(Component component, Action action) {
return session.auth(component,action)
}
public <T extends Component> boolean
isInstantiationAuthorized(Class<T> clazz) {
return session.auth(clazz);
}
}
);
On Sat, Nov 7, 2009 at 8:01 PM, James Carman
<jc...@carmanconsulting.com> wrote:
> What session are you trying to access during the application startup?
> A session is tied to a user's session as they browse your site. Who's
> browsing upon application startup?
>
> On Sat, Nov 7, 2009 at 6:42 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>> Hi, I tried this, but I got the following:
>>
>> you can only locate or create sessions in the context of a request
>> cycle when I start the application.
>>
>>
>>
>>
>>
>> On Sat, Nov 7, 2009 at 7:38 PM, James Carman
>> <jc...@carmanconsulting.com> wrote:
>>> Session.get()?
>>>
>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/Session.html#get%28%29
>>>
>>> In your custom session class, you can add your own get() method that
>>> returns your specific type:
>>>
>>> public static MySession get()
>>> {
>>> return (MySession)Session.get();
>>> }
>>>
>>> Then, you don't have to cast:
>>>
>>> MySession.get().getMySessionInformationThatImInterestedIn();
>>>
>>> On Sat, Nov 7, 2009 at 5:22 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> I want to implement IAuthorizationStrategy in MyApplication, but I do
>>>> not know how to get WicketSession, I need to get Component Action List
>>>> from WicketSession. Is there some reference?
>>>>
>>>> --
>>>> Many thanks!
>>>>
>>>> Haulyn Microproduction
>>>>
>>>> You can access me via:
>>>> Location: Shandong Jinan Shumagang 6H-8, 250000
>>>> Mobile: +086-15864011231
>>>> email: saharabear@gmail.com
>>>> website: http://haulynjason.net
>>>> gtalk: saharabear@gmail.com
>>>> skype: saharabear
>>>> QQ: 378606292
>>>> persional Twitter: http://twitter.com/saharabear
>>>> persional Linkedin: http://www.linkedin.com/in/haulyn
>>>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>>>
>>>>
>>>> Haulyn Jason
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>>
>>
>> --
>> Many thanks!
>>
>> Haulyn Microproduction
>>
>> You can access me via:
>> Location: Shandong Jinan Shumagang 6H-8, 250000
>> Mobile: +086-15864011231
>> email: saharabear@gmail.com
>> website: http://haulynjason.net
>> gtalk: saharabear@gmail.com
>> skype: saharabear
>> QQ: 378606292
>> persional Twitter: http://twitter.com/saharabear
>> persional Linkedin: http://www.linkedin.com/in/haulyn
>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>
>>
>> Haulyn Jason
>>
>> ---------------------------------------------------------------------
>> 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
>
>
--
Many thanks!
Haulyn Microproduction
You can access me via:
Location: Shandong Jinan Shumagang 6H-8, 250000
Mobile: +086-15864011231
email: saharabear@gmail.com
website: http://haulynjason.net
gtalk: saharabear@gmail.com
skype: saharabear
QQ: 378606292
persional Twitter: http://twitter.com/saharabear
persional Linkedin: http://www.linkedin.com/in/haulyn
Haulyn Microproduction Twitter: http://twitter.com/haulynmp
Haulyn Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to get Session in Application
Posted by James Carman <jc...@carmanconsulting.com>.
What session are you trying to access during the application startup?
A session is tied to a user's session as they browse your site. Who's
browsing upon application startup?
On Sat, Nov 7, 2009 at 6:42 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
> Hi, I tried this, but I got the following:
>
> you can only locate or create sessions in the context of a request
> cycle when I start the application.
>
>
>
>
>
> On Sat, Nov 7, 2009 at 7:38 PM, James Carman
> <jc...@carmanconsulting.com> wrote:
>> Session.get()?
>>
>> http://wicket.apache.org/docs/1.4/org/apache/wicket/Session.html#get%28%29
>>
>> In your custom session class, you can add your own get() method that
>> returns your specific type:
>>
>> public static MySession get()
>> {
>> return (MySession)Session.get();
>> }
>>
>> Then, you don't have to cast:
>>
>> MySession.get().getMySessionInformationThatImInterestedIn();
>>
>> On Sat, Nov 7, 2009 at 5:22 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>>> Hi,
>>>
>>> I want to implement IAuthorizationStrategy in MyApplication, but I do
>>> not know how to get WicketSession, I need to get Component Action List
>>> from WicketSession. Is there some reference?
>>>
>>> --
>>> Many thanks!
>>>
>>> Haulyn Microproduction
>>>
>>> You can access me via:
>>> Location: Shandong Jinan Shumagang 6H-8, 250000
>>> Mobile: +086-15864011231
>>> email: saharabear@gmail.com
>>> website: http://haulynjason.net
>>> gtalk: saharabear@gmail.com
>>> skype: saharabear
>>> QQ: 378606292
>>> persional Twitter: http://twitter.com/saharabear
>>> persional Linkedin: http://www.linkedin.com/in/haulyn
>>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>>
>>>
>>> Haulyn Jason
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> --
> Many thanks!
>
> Haulyn Microproduction
>
> You can access me via:
> Location: Shandong Jinan Shumagang 6H-8, 250000
> Mobile: +086-15864011231
> email: saharabear@gmail.com
> website: http://haulynjason.net
> gtalk: saharabear@gmail.com
> skype: saharabear
> QQ: 378606292
> persional Twitter: http://twitter.com/saharabear
> persional Linkedin: http://www.linkedin.com/in/haulyn
> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>
>
> Haulyn Jason
>
> ---------------------------------------------------------------------
> 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: How to get Session in Application
Posted by "Haulyn R. Jason" <sa...@gmail.com>.
Hi, I tried this, but I got the following:
you can only locate or create sessions in the context of a request
cycle when I start the application.
On Sat, Nov 7, 2009 at 7:38 PM, James Carman
<jc...@carmanconsulting.com> wrote:
> Session.get()?
>
> http://wicket.apache.org/docs/1.4/org/apache/wicket/Session.html#get%28%29
>
> In your custom session class, you can add your own get() method that
> returns your specific type:
>
> public static MySession get()
> {
> return (MySession)Session.get();
> }
>
> Then, you don't have to cast:
>
> MySession.get().getMySessionInformationThatImInterestedIn();
>
> On Sat, Nov 7, 2009 at 5:22 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
>> Hi,
>>
>> I want to implement IAuthorizationStrategy in MyApplication, but I do
>> not know how to get WicketSession, I need to get Component Action List
>> from WicketSession. Is there some reference?
>>
>> --
>> Many thanks!
>>
>> Haulyn Microproduction
>>
>> You can access me via:
>> Location: Shandong Jinan Shumagang 6H-8, 250000
>> Mobile: +086-15864011231
>> email: saharabear@gmail.com
>> website: http://haulynjason.net
>> gtalk: saharabear@gmail.com
>> skype: saharabear
>> QQ: 378606292
>> persional Twitter: http://twitter.com/saharabear
>> persional Linkedin: http://www.linkedin.com/in/haulyn
>> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>>
>>
>> Haulyn Jason
>>
>> ---------------------------------------------------------------------
>> 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
>
>
--
Many thanks!
Haulyn Microproduction
You can access me via:
Location: Shandong Jinan Shumagang 6H-8, 250000
Mobile: +086-15864011231
email: saharabear@gmail.com
website: http://haulynjason.net
gtalk: saharabear@gmail.com
skype: saharabear
QQ: 378606292
persional Twitter: http://twitter.com/saharabear
persional Linkedin: http://www.linkedin.com/in/haulyn
Haulyn Microproduction Twitter: http://twitter.com/haulynmp
Haulyn Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to get Session in Application
Posted by James Carman <jc...@carmanconsulting.com>.
Session.get()?
http://wicket.apache.org/docs/1.4/org/apache/wicket/Session.html#get%28%29
In your custom session class, you can add your own get() method that
returns your specific type:
public static MySession get()
{
return (MySession)Session.get();
}
Then, you don't have to cast:
MySession.get().getMySessionInformationThatImInterestedIn();
On Sat, Nov 7, 2009 at 5:22 AM, Haulyn R. Jason <sa...@gmail.com> wrote:
> Hi,
>
> I want to implement IAuthorizationStrategy in MyApplication, but I do
> not know how to get WicketSession, I need to get Component Action List
> from WicketSession. Is there some reference?
>
> --
> Many thanks!
>
> Haulyn Microproduction
>
> You can access me via:
> Location: Shandong Jinan Shumagang 6H-8, 250000
> Mobile: +086-15864011231
> email: saharabear@gmail.com
> website: http://haulynjason.net
> gtalk: saharabear@gmail.com
> skype: saharabear
> QQ: 378606292
> persional Twitter: http://twitter.com/saharabear
> persional Linkedin: http://www.linkedin.com/in/haulyn
> Haulyn Microproduction Twitter: http://twitter.com/haulynmp
>
>
> Haulyn Jason
>
> ---------------------------------------------------------------------
> 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