You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Robin Helgelin <lo...@gmail.com> on 2007/09/02 13:10:39 UTC

T5: BeanEditFrom error-reporting

Hi,

I have a page which uses a BeanEditForm. On validation success I do
another few validations that can't be done with current validation.
However, I don't see an obvious way to report an error on a specific
input field.

I've tried
    @Component(id = "BeanEditForm")
    private BeanEditForm form;
and
    form.recordError("Passwords doesn't match.");

which gives me an error, but on the same time tapestry gives me this:
[ERROR] Register Embedded component(s) BeanEditForm are defined within
component class nu.localhost.anopo.components.Register, but are not
present in the component template.

so this can't be the right way either, any ideas?

-- 
        regards,
        Robin

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


Re: T5: BeanEditFrom error-reporting

Posted by Robin Helgelin <lo...@gmail.com>.
On 9/2/07, Howard Lewis Ship <hl...@gmail.com> wrote:
> <form t:id="myform" ...>
>
> and
>
> @Component
> private BeanEditForm myForm;
>
>
> If you use <t:form> in the element, that implicitly defines the type there,
> causing a conflict.  In you example, you likely used two different ids (one
> specified in the template, on in your class), thus the error message.

Ok, thanks!

Also, how should I report an error on a specific Field created by
BeanEditForm using recordError(Field field, String errorMessage)?

I can't unless I specified the field with <t:parameter> myself?

-- 
        regards,
        Robin

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


Re: T5: BeanEditFrom error-reporting

Posted by Howard Lewis Ship <hl...@gmail.com>.
<form t:id="myform" ...>

and

@Component
private BeanEditForm myForm;


If you use <t:form> in the element, that implicitly defines the type there,
causing a conflict.  In you example, you likely used two different ids (one
specified in the template, on in your class), thus the error message.

On 9/2/07, Robin Helgelin <lo...@gmail.com> wrote:
>
> Hi,
>
> I have a page which uses a BeanEditForm. On validation success I do
> another few validations that can't be done with current validation.
> However, I don't see an obvious way to report an error on a specific
> input field.
>
> I've tried
>     @Component(id = "BeanEditForm")
>     private BeanEditForm form;
> and
>     form.recordError("Passwords doesn't match.");
>
> which gives me an error, but on the same time tapestry gives me this:
> [ERROR] Register Embedded component(s) BeanEditForm are defined within
> component class nu.localhost.anopo.components.Register, but are not
> present in the component template.
>
> so this can't be the right way either, any ideas?
>
> --
>         regards,
>         Robin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind