Hi,

I believe you want to display the feedback message in "TestPage". If so,
do something like this:
1. make sure you have feedback panel added on the page where you will be
landing after redirect.
2. Then you can get hold of the feedback panel in the current page like
shown below:

FeedbackPanel feedback = (FeedbackPanel)
responsePage.get("responsePage-feedbackPanel");
getSession().info("You pased the test");

So your code would look like:
if (isTestPassed()) {
        ...
} else 
{
// response Page is the page where you will be going. In your case TestPage.
FeedbackPanel feedback = (FeedbackPanel)
responsePage.get("responsePage-feedbackPanel");
getSession().info("You did not pass the test");
setResponsePage(TestPage.class);
}



insom wrote:
> 
> I have a submit button that adds a message to my FeedbackPanel, like so:
> 
> if (isTestPassed()) {
>       ...
> } else {
>       setResponsePage(TestPage.class);
>       info("You didn't pass the test...");
> }
> 
> However, when the browser gets to the TestPage, it doesn't display any
> messages. I stepped through the process in Eclipse. Running
> getSession().getFeedbackMesages() in the debugger shows that the message
> did get registered. However, when it gets to line 1367 in RequestCycle
> (Wicket 1.3.4), the message is removed. Here is the relevant code from
> RequestCycle:
> 
> 1361  finally
> 1362                  {
> 1363                          // set step manually to clean up
> 1364                          currentStep = DETACH_REQUEST;
> 1365  
> 1366                          // clean up the request
> 1367                          detach();  <-- This is where the message 
> disappears
> 1368  
> 1369                          // set step manually to done
> 1370                          currentStep = DONE;
> 1371                  }
> 
> I have no idea what to do to fix this. Any suggestions?
> 

-- 
View this message in context: 
http://www.nabble.com/Feedback-messages-disappearing-before-display-tp18932342p18932704.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to