Hi Adam,

try calling setOutputMarkupPlaceholderTag(true) instead of setOutputMarkupId on your barcodeFeedback.


I have a component hierarchy that looks (grossly oversimplified) like:

page
--form
----components
--form
----barcodeTextField
----barcodeFeedbackPanel

TextField<String>  barcodeField = new TextField<String>("barcode");
barcodeField.add(new StringValidator.ExactLengthValidator(11));
form.add(barcodeField);

ComponentFeedbackPanel barcodeFeedback = new
ComponentFeedbackPanel("barcodeFeedback", barcodeField);
barcodeFeedback.setOutputMarkupId(true);
form.add(barcodeFeedback);

barcodeField.add(new AjaxFormComponentUpdatingBehavior("onblur") {
  @Override
protected void onUpdate(AjaxRequestTarget target) {
// nothing important
}
  @Override
protected void onError(AjaxRequestTarget target, RuntimeException e) {
super.onError(target, e);
target.addComponent(barcodeField);
target.addComponent(barcodeFeedback);
}
});

The onblur validation happens as expected and works great.  The form
validation does not.  I'm given the ever-so-fun warning message about not
finding the feedback panel:

WARNING: Component-targetted feedback message was left unrendered. This
could be because you are missing a FeedbackPanel on the page.  Message:
[FeedbackMessage message = "asdfas is an invalid barcode", reporter =
barcode, level = ERROR]

Is there something obvious that I'm missing that could cause something like
this?  I believe that ajax validation does a truncated version of child
visitation for validation and error message handling, but it seems odd that
one process can find the feedback panel while the other cannot.  Any ideas
or further insights into how the validation process works would be
incredibly help since, at this point, I've hit the wall where what little
expertise I have in wicket ends.

Disclaimer: the above code was typed by hand, so there may be typos in the
above that isn't necessarily reflected in the real code.

~Adam



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

Reply via email to