You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Vissers <Ja...@cumquat.nl> on 2008/04/15 17:57:36 UTC
Custom 'feedback' component - how to acquire ValidationTracker?
Hi,
In T4, I had a custom feedback component that acquired the
ValidationDelegate to do stuff with the errors recorded in a form. I
like to mimic this component in T5.
+ Feedback component
@Parameter private ValidationTracker validationTracker
+ AbstractBasePage
@Component(inheritInformalParameters=true,
parameters={"feedbackBean=feedbackHolder","validationTracker=validationTracker"})
private Feedback feedback;
public ValidationTracker getValidationTracker() {
return null;
}
+ Concrete page
@Component
private Form loginForm;
@Override
protected ValidationTracker getValidationTracker() {
return loginForm.getDefaultTracker();
}
This doesn't work - I must be missing something vital here?
I get: "Could not convert 'validationTracker' into a component parameter
binding: ..."
What should I be looking for?
-J.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Custom 'feedback' component - how to acquire ValidationTracker?
Posted by Jan Vissers <Ja...@cumquat.nl>.
Think I've already got it. I'm now using this:
@Component(inheritInformalParameters=true,
parameters={"feedbackBean=feedbackHolder","validationTracker=getValidationTracker()"})
The base page implements public ValidationTracker getValidationTracker()
Pages that do need custom feedback will have to override this
getValidationTracker method.
-J.
On Tue, 2008-04-15 at 17:57 +0200, Jan Vissers wrote:
> Hi,
>
> In T4, I had a custom feedback component that acquired the
> ValidationDelegate to do stuff with the errors recorded in a form. I
> like to mimic this component in T5.
>
> + Feedback component
> @Parameter private ValidationTracker validationTracker
>
> + AbstractBasePage
> @Component(inheritInformalParameters=true,
> parameters={"feedbackBean=feedbackHolder","validationTracker=validationTracker"})
> private Feedback feedback;
>
> public ValidationTracker getValidationTracker() {
> return null;
> }
>
> + Concrete page
> @Component
> private Form loginForm;
>
> @Override
> protected ValidationTracker getValidationTracker() {
> return loginForm.getDefaultTracker();
> }
>
>
> This doesn't work - I must be missing something vital here?
> I get: "Could not convert 'validationTracker' into a component parameter
> binding: ..."
>
> What should I be looking for?
>
> -J.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org