You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Patrick Davids <pa...@nuboit.de> on 2013/02/21 09:30:00 UTC

Multiple Form Feedback Messages / Showing one / Canceling of Form Processing? Filtering Feedback Messages?

Hi all,
I have a quite simple form, but with many many form feedback messages.

I read several articles about FormComponentFeedbackFilter, overriding 
form processing or conditional validations of forms etc.... but what I'm 
not able to find out, is just how to show only one feedback message 
(first occurence) of many possible messages the form is able to provide.

Right now, I have 15 feedback boxes with messages on submit, and I would 
like to have just one, the first one, which occurs caused by any/first 
validation error.

How can I do this (in a simple way)?

Perhaps its so easy a cannot see the solution... but actually I need 
help. *lol*

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


Re: Multiple Form Feedback Messages / Showing one / Canceling of Form Processing? Filtering Feedback Messages?

Posted by mwwbf <mw...@hotmail.com>.
A Simple Way?
Implement your own FeedbackPanel and set the visiblity of listItem to false
after one line has been rendered.
The counter for the number of renderd feedback messages has to be global.
Dirty but simple;)



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multiple-Form-Feedback-Messages-Showing-one-Canceling-of-Form-Processing-Filtering-Feedback-Messages-tp4656643p4656655.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Multiple Form Feedback Messages / Showing one / Canceling of Form Processing? Filtering Feedback Messages?

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

The approach with the custom filter should do it.
Extend org.apache.wicket.feedback.ComponentFeedbackMessageFilter and return
'true' in #accept() only once, i.e. use a flag that a message is accepted
and then reject all following.
Make sure you use a new instance of this filter for every render, or reset
the flag.


On Thu, Feb 21, 2013 at 10:30 AM, Patrick Davids
<pa...@nuboit.de>wrote:

> Hi all,
> I have a quite simple form, but with many many form feedback messages.
>
> I read several articles about FormComponentFeedbackFilter, overriding
> form processing or conditional validations of forms etc.... but what I'm
> not able to find out, is just how to show only one feedback message
> (first occurence) of many possible messages the form is able to provide.
>
> Right now, I have 15 feedback boxes with messages on submit, and I would
> like to have just one, the first one, which occurs caused by any/first
> validation error.
>
> How can I do this (in a simple way)?
>
> Perhaps its so easy a cannot see the solution... but actually I need
> help. *lol*
>
> kind regards
> Patrick
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>