FeedbackPanel and warnings

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

FeedbackPanel and warnings

Entropy
Our feedbackpanels work fine, have for a while.  But we just got a new requirement to add warnings.  We find that when there is at least one error message, the panel shows all messages, regardless of their level, but when there are only warnings, the panel remains hidden as if there were no messages.

Is there a setting somewhere to turn this on?  
Reply | Threaded
Open this post in threaded view
|

Re: FeedbackPanel and warnings

Martin Grigorov-4
Hi,

There is no such setting in Wicket and this is not the default behavior.
Please check that you do notuse IFeedbackMessageFilter like
ErrorLevelFeedbackMessageFilter that sets such minimum level on the
FeedbackPanel.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Oct 14, 2015 at 7:40 PM, Entropy <[hidden email]> wrote:

> Our feedbackpanels work fine, have for a while.  But we just got a new
> requirement to add warnings.  We find that when there is at least one error
> message, the panel shows all messages, regardless of their level, but when
> there are only warnings, the panel remains hidden as if there were no
> messages.
>
> Is there a setting somewhere to turn this on?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-and-warnings-tp4672235.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: FeedbackPanel and warnings

Entropy
We searched the code and we do not use the filter.  What's more, during investigation of the issue, we created a filter that always returns true from the accept() method of the filter just to see, and in fact when only warnings are added, the accept method is never called, whereas in a mixture, we see both warnings and error presents at the time the accept() method is called.

Here's a sample of the validate method just to show what's going on as we attempt to figure it out.  We also tried passing the feedback panel in here and setting the visibility manually, but it gets overridden somewhere along the way.

But somewhere between this method and the accept() something is dropping warnings.  

    @Override
    public void validate(IValidatable<String> validatable) {
                                String name =validatable.getValue();
                                ValidationError error = new ValidationError();
                                //TODO remove the error application and keep only the warnings
                                if (name.contains("St ") || name.contains("St.") || name.contains("Ft ") || name.contains("Ft.")) {        
                                    validatable.error(error.addKey("1003"));
                                    comp.warn(comp.getString("1003"));
                                } else if (name.contains(".")) {
                                    validatable.error(error.addKey("1004"));
                                    comp.warn(comp.getString("1004"));
                                } else if (!isTitleCaps(name)) {
                                    validatable.error(error.addKey("1002"));  
                                    comp.warn(comp.getString("1002"));
                                }
    }          


Reply | Threaded
Open this post in threaded view
|

Re: FeedbackPanel and warnings

Martin Grigorov-4
If you can reproduce this with a quickstart app using 6.20.0/7.0.0 then
please attach it to JIRA and we will take a look.
Thanks!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Oct 14, 2015 at 9:29 PM, Entropy <[hidden email]> wrote:

> We searched the code and we do not use the filter.  What's more, during
> investigation of the issue, we created a filter that always returns true
> from the accept() method of the filter just to see, and in fact when only
> warnings are added, the accept method is never called, whereas in a
> mixture,
> we see both warnings and error presents at the time the accept() method is
> called.
>
> Here's a sample of the validate method just to show what's going on as we
> attempt to figure it out.  We also tried passing the feedback panel in here
> and setting the visibility manually, but it gets overridden somewhere along
> the way.
>
> But somewhere between this method and the accept() something is dropping
> warnings.
>
>     @Override
>     public void validate(IValidatable<String> validatable) {
>                                 String name =validatable.getValue();
>                                 ValidationError error = new
> ValidationError();
>                                 //TODO remove the error application and
> keep
> only the warnings
>                                 if (name.contains("St ") ||
> name.contains("St.") || name.contains("Ft ") || name.contains("Ft.")) {
>
> validatable.error(error.addKey("1003"));
>                                     comp.warn(comp.getString("1003"));
>                                 } else if (name.contains(".")) {
>
> validatable.error(error.addKey("1004"));
>                                     comp.warn(comp.getString("1004"));
>                                 } else if (!isTitleCaps(name)) {
>
> validatable.error(error.addKey("1002"));
>                                     comp.warn(comp.getString("1002"));
>                                 }
>     }
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-and-warnings-tp4672235p4672239.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: FeedbackPanel and warnings

Entropy
We're using 6.12 if that makes a difference, but it sounds like you don't think it should.
Reply | Threaded
Open this post in threaded view
|

Re: FeedbackPanel and warnings

Entropy
Eventually found it.  Somewhere deep in a re-usable panel written by a co-worker who no longer works here a set visible was being done on the panel that was looking for error level messages only.  Nobody knew it was there.