Re: [Wicket-user] Error when retrieving session property

2007-01-22 Thread Landry Soules
Thanks a lot Eelco and Igor. add(new Label("username", new PropertyModel(this, "customSession.user.firstName"))) works very well. Eelco Hillenius a écrit : > LOL. Of course. > > Eelco > > On 1/21/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > >> pfft >> >> add(new Label("username", new Prop

Re: [Wicket-user] Error when retrieving session property

2007-01-21 Thread Eelco Hillenius
LOL. Of course. Eelco On 1/21/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > pfft > > add(new Label("username", new PropertyModel(this, > "customSession.user.firstName"))); > > -igor > > > > On 1/21/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > > or even: > > > > > >public SignInSucc

Re: [Wicket-user] Error when retrieving session property

2007-01-21 Thread Igor Vaynberg
pfft add(new Label("username", new PropertyModel(this, " customSession.user.firstName"))); -igor On 1/21/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > or even: > >public SignInSuccess(String id) { >super(id); >add(new Label("username", new PropertyModel(new > PropertyM

Re: [Wicket-user] Error when retrieving session property

2007-01-21 Thread Eelco Hillenius
> or even: > >public SignInSuccess(String id) { >super(id); >add(new Label("username", new PropertyModel(new > PropertyModel("customSession.user"), "firstName"))); >SignOutForm signOut = new SignOutForm("signOutForm"); >add(signOut); >} Erm, I mean: publ

Re: [Wicket-user] Error when retrieving session property

2007-01-21 Thread Eelco Hillenius
Oh, right. Best thing you can do here is wrap the user request in a model: PropertyModel doesn't allow a null model, but a model that produces null is fine. So this should work: public SignInSuccess(String id) { super(id); IModel m = new AbstractReadOnlyModel() { public

Re: [Wicket-user] Error when retrieving session property

2007-01-21 Thread Landry Soules
Sure. But it's a design problem i have here: my signin and signout panels share the same place on the same page, and i'm just set them visible/invisible when required, so they're created at the same time. Yet getCustomSession().setUser(foo) is called after submit on signin... How can i make sig

Re: [Wicket-user] Error when retrieving session property

2007-01-21 Thread Eelco Hillenius
It looks like getCustomSession().getUser() returns null. Eelco On 1/21/07, Landry Soules <[EMAIL PROTECTED]> wrote: > Hello, > > I want to make work a signin component i have included in a page. When a > user signs in, i retrieve the corresponding user record from DB, and put > it a session prop

[Wicket-user] Error when retrieving session property

2007-01-21 Thread Landry Soules
Hello, I want to make work a signin component i have included in a page. When a user signs in, i retrieve the corresponding user record from DB, and put it a session property. Then i hide the signin component, and make visible a new panel, presenting a signout button, and a welcome message : "w