are you sure you store it correctly?
for example is the LoginData object the same? (if you do a system out of
that or check it in the debugger)
Because if it is then the user field that it should have cant be just
suddenly null
johan
On Wed, Jun 4, 2008 at 11:47 PM, smallufo <[EMAIL PROTECTED]>
Well , I am not sure how to debug into the session .
I printed out the session.getId() and session.sequence , after login success
, and back to the loginPage
Both are the identical ...
MySession s = (MySession) getSession();
s.getLoginData().setUser(u);
System.out.println("After login success , id
Hmm it is getting late and i may be missing something, but that should work.
Can you check if you have a temporary session? that is the only
logical explanation i can come up with at this time :)
if it is it is replaced by a new session on each request, call bind()
to fix that.
if not you might wan
Oops , thanks for your hint
But it seems not working ..
User loginedUser = userDao.getUserFromLoginName(loginName);
if (loginedUser != null)
{
MySession mySession = (MySession) getSession();
mySession .getLoginData().setUser(loginedUser);
mySession .dirty(); //add this line
setRes
Mark the session as dirty. Wicket cannot detect if some property of a
pojo has been updated in your session.
By marking the session as dirty wicket will (re)save everything.
Maurice
On Wed, Jun 4, 2008 at 10:52 PM, smallufo <[EMAIL PROTECTED]> wrote:
> Thank you .
> It solves my confusion.
> But
Thank you .
It solves my confusion.
But I have another question.
It seems wicket can only handle "one-reference" composite session.
That is , a root session object , and a associated session object.
If the associating session object has another associating object , it will
not be saved/updated.
fo
> My question is , if I don't want to use HttpSession (string property is
> error-prone)
> I prefer the wicket way.
> I found if I go the wicket way , it results in the "composite session
> object" , it is correct ?
>
> PageAsetting settingA = ((MySession)getSession()).getPageAsetting();
> PageBset
Thanks for replying so quickly.
I think you misunderstood. Maybe because my previous post "independent apps"
make you confuse. I apology first.
My "independent apps" are , in fact , different pages.
They are under the same WEB-APP , maybe share the same user-base.
They just process different calcul
By default, Wicket will create separate session objects for each
application. If you want to share info between multiple Wicket
sessions, you'll have to access the underlying HttpSession object.
Should be relatively easy to create an abstraction for that yourself.
Eelco
On Wed, Jun 4, 2008 at 11:
According to wicket API docs , I have a question.
Does wicket favor composite session object ?
That is , if my site has some independent apps , each has its custom setting
object.
It seems I have to associate these objects to one root session object :
like this :
App1Setting setting1 = ((RootSess
10 matches
Mail list logo