You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/12/15 09:32:13 UTC

[jira] [Resolved] (WICKET-5788) FormComponentFeedbackBorder seem to suppress feedback messages

     [ https://issues.apache.org/jira/browse/WICKET-5788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-5788.
-------------------------------------
    Resolution: Won't Fix

The "prooblem" is that org.apache.wicket.markup.html.form.validation.FormComponentFeedbackBorder implements IFeedback, as FeedbackPanel does.

Wicket postpones the rendering of IFeedback components. They are rendered at the end of the rendering phase, so that other components can report feedback messages and IFeedback impls can later render them.

Because of the postponing of the rendering of FormComponentFeedbackBorder all its children components are also postponed. Thus de.wicketreproduce.FeedbackMessages.HomePage.WarningBehavior#onConfigure() is postponed too.

To "fix" the issue you should make sure that FormComponentFeedbackBorder is added to the page before the FeedbackPanel is. This way its children are rendered, WarningBehavior reports its WARN msg and later FeedbackPanel finds it and renders it.

Here is the modified code of HomePage.java constructor:
{code}
public HomePage(final PageParameters parameters) {
		super(parameters);

		Form f = new Form<Void>("form");
		
		//Case 1: not working as expected
		f.add(new FormComponentFeedbackBorder("asterisk").add(new RequiredTextField<String>("text").add(new WarningBehavior())));
		
		//Case 2: working as expected
		//f.add(new RequiredTextField<String>("text").add(new WarningBehavior()));
		
		add(f, new FeedbackPanel("feedback"));
    }
{code}
 

> FormComponentFeedbackBorder seem to suppress feedback messages
> --------------------------------------------------------------
>
>                 Key: WICKET-5788
>                 URL: https://issues.apache.org/jira/browse/WICKET-5788
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.17.0
>            Reporter: Patrick Davids
>         Attachments: FeedbackMessages.zip
>
>
> Opened a ticket with quickstart attached.
> best regards
> Patrick
> {quote}
> Now the question is more clear! Thanks!
> I don't see anything in FormComponentFeedbackBorder code that consumes the
> feedback message, i.e. marks it as rendered.
> Please create a quickstart and attach it to a ticket in JIRA and we will
> take a look.
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> On Mon, Dec 8, 2014 at 3:23 PM, Patrick Davids <patrick.davids@nubologic.com
> > wrote:
> > Yes, FormComponentFeedbackBorder itself just shows an asterisk.
> >
> > So, ok, my question was still unclear. 
> > Is it a feature or a bug, that a FormComponentFeedbackBorder surpresses
> > the messages of its child formcomponent, which possibly could be shown by a
> > FeedbackPanel somewhere else in the upper component hierarchy?
> >
> >
> > Patrick
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)