I'm now calling getSession().info(). However, the message doesn't show up.
After debugging for a while I noticed that when de LogjnPage is created,
the message I added is there, and is perfectly rendered (I reached the
method
org.apache.wicket.markup.html.basic.Label.onComponentTagBody(MarkupStream,
ComponentTag) for the message label and the srting is there). Strangely,
after hitting F8 (Resume in eclipse) I reach the LoginPage constructor
again, as if the LoginPage were constructed again (and apparently it
is). This time, when the page creates the feedback panel, the session
has no messages, because as we may expect they have been consumed by the
previous instance of LoginPage. Apparently, this second instance is the
definitive instance of the page to be rendered, so finally no messages
are shown.
I must be doing something really wrong!, any ideas of why am I seeing
this strange twice-instanced pages behaviour?
Thanks,
Esteban
Igor Vaynberg escribió:
you should call getsession().info() as mentioned in this thread.
when you call info() on a component, that messages is scoped to the
owning page. when you call getsession().info() the message is scoped
to the session and is kept there until rendered.
-igor
On Mon, Oct 19, 2009 at 12:12 PM, Esteban Masoero
<emaso...@getsense.com.ar> wrote:
I want it to be shown in the LoginPage, because the activation page does not
show anything, it only activates the user.
I tried something like:
LoginPage page = new LoginPage();
page.info("User account activated");
setResponsePage(page);
but it didn't work. Anyway, as I know, in order to leave a feedback message
that needs to be shown in the next whateverPage, you'll need to leave it to
the session. Am I missing something?
Thanks,
Esteban
Igor Vaynberg escribió:
you want the message to show on the loginpage or on the activation page?
-igor
On Mon, Oct 19, 2009 at 10:08 AM, Esteban Masoero
<emaso...@getsense.com.ar> wrote:
Hi:
We've implemented the classic registration process:
- user registers
- app sends him an email with a generated link
- user clicks that link, which it's oppened in a new window/tab
- The UserActivationPage that responds to that link request does:
this.info(""User account activated"); setResponsePage(LoginPage.class);
(so
the user can log in for the first time)
The problem is that the message is only shown when the link is oppened in
the same window/tab the user has previously registered. After trying a
few
things, we ended up doing
this.getPageSettings().setAutomaticMultiWindowSupport(false); in
MyApplication, which seems to work (we think is related to wicket using
the
same session, but we're not sure).
However, we're not sure whether it's the best way of solving this. Any
other
ideas or comments?
Thanks,
Esteban
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org