On Sun, Feb 15, 2009 at 10:40 PM, Timo Rantalaiho <[email protected]>wrote:
> On Sun, 15 Feb 2009, Will Jaynes wrote:
> > So, how would one show those error messages? And where would such code
> get
> > hooked in?
>
> I'm not sure about the place but basically you have to add a
> FeedbackPanel and update it in the ajax event that causes
> the error,
>
> final Component feedback = new FeedbackPanel("feedback")
> .setOutputMarkupPlaceHolder(true);
> add(feedback);
> ...
> @Override protected void onSubmit(AjaxRequestTarget target) {
> target.addComponent(feedback);
> ...
> }
>
> Best wishes,
> Timo
AH, yes. Thanks. And the place to do it is in the SubmitCancelColumn :
columns.add(new SubmitCancelColumn("esd", new Model("Edit"))
{
@Override
protected void onError(AjaxRequestTarget target, IModel
rowModel, WebMarkupContainer rowComponent)
{
target.addComponent(feedback);
super.onError(target, rowModel, rowComponent);
}
});