Wow.  I guess that's me not understanding the inner-workings of list view.
 Thanks for pointing me at the list view.  Once that was pointed out, the
documentation explained it very well.  Knowing where to look seemed to be
what was blocking me.

Thanks again.

~Adam

On Thu, May 5, 2011 at 11:03 AM, Andrea Del Bene <adelb...@ciseonweb.it>wrote:

> Have called setReuseItems(true) on your listview component? Without this
> property setted to true, messages inside listview won't be displayed.
>
>  I believe that method is intended to render a placeholder tag when a
>> component isn't visible on the page to allow ajax updates.  My ajax
>> validation works great already.  The component feedback panel is never
>> hidden, it just doesn't get picked up as a valid destination for feedback
>> messages on a non-ajax form submit.
>>
>> I'm not sure if this might matter, but perhaps my earlier component
>> hierarchy was a little too simplistic a representation.  It looks a little
>> more like this:
>>
>> page
>> --form
>> ----components
>> --form
>> ----listview (1 or more form panels)
>> --------barcodeTextField
>> --------barcodeFeedbackPanel
>>
>> The part that confuses me is the difference between the ajax validation
>> that
>> works and the normal submit process validation which can't seem find the
>> feedback panels in the hierarchy.  It feels like if one works, the other
>> should as well, or are these using separate visitor patterns to find the
>> feedback panels?
>>
>> On Thu, May 5, 2011 at 5:34 AM, Andrea Del Bene<adelb...@ciseonweb.it
>> >wrote:
>>
>>  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