Hi all;
I have two panels.
Panel one have the standart form with one Label + TextField (required field) +
AjaxButton.
Panel two have one FeedbackPanel.
Ok, here is the the problem :
I can reach Panel Two' FeedbackPanel from Panel One.
So in AjaxButton
AjaxButton submit = new AjaxButton("submit") {
@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
FeedbackPanel feedbackPanel = getFeedbackPanel(); // gets
FeedBackPanel from Panel Two
target.addComponent(feedbackPanel); // it renders, no
problem
target.addComponent(form);
}
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form)
{
FeedbackPanel feedbackPanel = getFeedbackPanel(); // gets
FeedBackPanel from Panel Two
info("Saved"); // just an info message
target.addComponent(form);
target.addComponent(feedbackPanel); // no way
}
};
When Validation error occurs (onError) Panel's two FeedbackPanel renders and
shows the error. Great !
But when there is no error (onSubmit)Panel's two FeedbackPanel doesn't render
and it gives
component-targetted feedback message was left unrendered. This could be because
you are missing a FeedbackPanel on the page. Message: [FeedbackMessage message
= "Saved", reporter = go, level = INFO]
Any suggestions ?
Regards.