Hi,
My intention was to use the same feedback panel to show both info and error
messages. What I did was if there there is a mistake e.g. blank textfield,
feedback panel will display and error and expects the user to fix his
mistake and submit again. If the form is filled in accordingly, an info
message will inform him that his information is captured. The problem I
faced was, I used FeedbackPanel.anyErrorMessage() to check if any error was
attached to the panel otherwise show an acceptance message using
FeedbackPanel.info(...). However, the info message is not shown. If I didn't
invoke FeedbackPanel.anyErrorMessage() and use a boolean flag to track
errors, the info message will show.
<code>
...
if (messageModel.getObject() == null ||
messageModel.getObject().toString().length() == 0)
{
error("Message must not be empty.");
}
if (feedback.anyErrorMessage())
{
return;
}
// will not show in feedback panel when there is no error
info("Your message is " + messageModel.getObject());
...
</code>
I have also included full codes to demonstrate what I mean. TQ
http://www.nabble.com/file/p18332776/TestFeedbackPanelPage.java
TestFeedbackPanelPage.java
http://www.nabble.com/file/p18332776/TestFeedbackPanelPage.html
TestFeedbackPanelPage.html
--
View this message in context:
http://www.nabble.com/FeedbackPanel.anyErrorMessage%28%29-Strange-Behavior-tp18332776p18332776.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]