wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Entropy <blmulholl...@gmail.com>
Subject Feedback messages not showing on first request
Date Tue, 26 Nov 2019 15:53:21 GMT
We have a page where we are being required to have multiple feedback panels,
and to show messages in various ones depending on the error.  Our solution
was to use message filters and to put the messages against certain
containers to say 'any message in container X goes to feedback panel X'.  

You can see the code below for example.  The request thing is just to set
the class of the feedbackpanel to a different value.  But we also control
the visibility of the panel by checking 'anyMessage()'.  So if there's no
errors, no feedback shows.  

This all works...except on the first request.  For some reason when I click
the button, I can see the error (it's added during the onSubmit(), not
during the normal validation step if that makes a difference) added to the
assetLookupOptionsWMC, but then when anyMessage() runs, it doesn't find the
error.  Click the button a second time, and it works perfectly.

Any idea why?

		assetLookupOptionsFP.setFilter(new IFeedbackMessageFilter(){
			private static final long serialVersionUID = 1L;

			public boolean accept(FeedbackMessage msg) {
				Component reporter = msg.getReporter();
				HttpServletRequest request = ((HttpServletRequest)
				if (reporter.getId().equals("assetLookupOptionsWMC")){
					return true;
				} else if
					return true;
				} else {
					return false;

Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org

View raw message