You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Brad Grier <br...@salusnovus.com> on 2010/03/03 06:34:37 UTC

FeedbackPanel for Dynamic Form

I've written a dynamic form engine which does its work using a ListView and Fragment subclasses representing the various form fields. Everything works great including saving and retrieving form information. Now that the fun is over, I've run into a problem adding validation. In the markup for the fragment subclasses, the wicket:id is always "field". That's okay...until I try to add a FeebackPanel to the form to report validation errors. Since the identifier for every form field is the same, the messages displayed in the panel are useless. Any advice?

Thanks,
Brad

Re: FeedbackPanel for Dynamic Form

Posted by Brad Grier <br...@salusnovus.com>.
Thanks for the tip on the reuseItems method. The solution to my problem was 
to call setLabel with a component specific name for each dynamic 
FormComponent.

--------------------------------------------------
From: "Sergey Olefir" <so...@gmail.com>
Sent: Wednesday, March 03, 2010 4:36 AM
To: <us...@wicket.apache.org>
Subject: Re: FeedbackPanel for Dynamic Form

>
>
> I'm not 100% sure what exactly is your issue, but have you taken a look at
> subclasses of IFeedbackMessageFilter ? They allow filtering messages based
> on component instance, for example. You will have to use reuseItems=true 
> in
> ListView though most likely.
>
>
> Brad Grier wrote:
>>
>> I've written a dynamic form engine which does its work using a ListView
>> and Fragment subclasses representing the various form fields. Everything
>> works great including saving and retrieving form information. Now that 
>> the
>> fun is over, I've run into a problem adding validation. In the markup for
>> the fragment subclasses, the wicket:id is always "field". That's
>> okay...until I try to add a FeebackPanel to the form to report validation
>> errors. Since the identifier for every form field is the same, the
>> messages displayed in the panel are useless. Any advice?
>>
>
> -- 
> View this message in context: 
> http://old.nabble.com/FeedbackPanel-for-Dynamic-Form-tp27764535p27766528.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
> 

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


Re: FeedbackPanel for Dynamic Form

Posted by Sergey Olefir <so...@gmail.com>.

I'm not 100% sure what exactly is your issue, but have you taken a look at
subclasses of IFeedbackMessageFilter ? They allow filtering messages based
on component instance, for example. You will have to use reuseItems=true in
ListView though most likely.


Brad Grier wrote:
> 
> I've written a dynamic form engine which does its work using a ListView
> and Fragment subclasses representing the various form fields. Everything
> works great including saving and retrieving form information. Now that the
> fun is over, I've run into a problem adding validation. In the markup for
> the fragment subclasses, the wicket:id is always "field". That's
> okay...until I try to add a FeebackPanel to the form to report validation
> errors. Since the identifier for every form field is the same, the
> messages displayed in the panel are useless. Any advice?
> 

-- 
View this message in context: http://old.nabble.com/FeedbackPanel-for-Dynamic-Form-tp27764535p27766528.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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