You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sebastian Hennebrueder <us...@laliluna.de> on 2009/08/22 14:52:36 UTC

BeanEditForm recorderror for a field

Hello,

the beaneditform provides a method recordError which expects a field of 
the form. I couldn't find out, how I can get a reference to a field
of the form.

I would like to call
myForm.recordError(myInputField, "bad problem");

-- 
Best Regards / Viele Grüße

Sebastian Hennebrueder
-----
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de




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


Re: BeanEditForm recorderror for a field

Posted by Sebastian Hennebrueder <us...@laliluna.de>.
Hello Kalle,
Kalle Korhonen schrieb:
> I don't see it as a workaround considering that you'd do exactly the
> same if it was a regular form. 
I do not fully agree here. I use the beaneditform to get rid of 
t:textfield and t:label components.  I don't want to fall back on normal 
form writing. To record errors for single fields when doing cross field 
or custom validations should be possible in beaneditform as well.

However, I suppose it'd be entirely
> possible and likely even easy to implement a getField(String
> propertyName) for BeanEditForm. Maybe open an issue for it?

I checked the code and I would need to introduce the following code in 
the following classes (typed without compiling)
BeanEditForm
public void recordError(String fieldName, String errorMessage)
     {
         form.recordError(fieldName, errorMessage);
     }
org.apache.tapestry5.corelib.components.Form and the interface 
FormValidationControl
public void recordError(String fieldName, String errorMessage)
     {
         tracker.recordError(fieldName, errorMessage);
     }

org.apache.tapestry5.ValidationTracker
org.apache.tapestry5.ValidationTrackerImp
public void recordError(String fieldName, String errorMessage)
     {
         FieldTracker ft = get(fieldName);

         ft.errorMessage = errorMessage;

         store(ft);
     }
+ the get method


Before I write a patch, I would like to know from the core comitter if 
this is likely to be included?


-- 
Best Regards / Viele Grüße

Sebastian Hennebrueder
-----
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



> 
> Kalle
> 
> 
> On Sat, Aug 22, 2009 at 10:54 AM, Sebastian
> Hennebrueder<us...@laliluna.de> wrote:
>> I found this solution 5 minutes ago but thought it was a workaround. To
>> allow cross field validation, it would be nice
>> if the beaneditform provides access to the fields uses internally.
>>
>> What do you think?
>> --
>> Best Regards / Viele Grüße
>>
>> Sebastian Hennebrueder
>> -----
>> Software Developer and Trainer for Hibernate / Java Persistence
>> http://www.laliluna.de
>>
>> Kalle Korhonen schrieb:
>>> Oh that - you need tell the bean editor that you want the field to be
>>> used in your form. See Property Editor Overrides at
>>> http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html, e.g:
>>>
>>>  <t:beaneditform object="formModel">
>>>    <t:parameter name="country">
>>>      <t:label for="country"/>
>>>      <t:textfield t:id="country" value="formModel.country"/>
>>>    </t:parameter>
>>>  </t:beaneditform>
>>>
>>> Ulrich - in practice, is there a case when you would have to use
>>> @InjectComponent over @Component with T5?
>>>
>>> Kalle
>>>
>>>
>>> On Sat, Aug 22, 2009 at 9:33 AM, Sebastian
>>> Hennebrueder<us...@laliluna.de> wrote:
>>>> page snippet
>>>> <t:beaneditform object="formModel" t:id="form"
>>>> submit-label="message:submit"
>>>> />
>>>> class snippet
>>>> @Component
>>>>       private BeanEditForm form;
>>>>
>>>> //      @Component // doesnt work
>>>> //      private TextField country;
>>>>
>>>> in the method onValidateForm I would like to record errors which should
>>>> be
>>>> shown at the country field, when redisplaying the form.
>>>>
>>>> Best Regards
>>>>
>>>> Sebastian Hennebrueder
>>>>
>>>> Ulrich Stärk schrieb:
>>>>> That's not 100% correct. @Component defines a component in your
>>>>> component
>>>>> class that you can then use in your template while @InjectComponent
>>>>> injects
>>>>> a component defined in your template.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Uli
>>>>>
>>>>> Kalle Korhonen schrieb:
>>>>>> How do you reference your myForm? All components are handled the same
>>>>>> way:
>>>>>> @Component
>>>>>> private TextField myInputField;
>>>>>>
>>>>>> Kalle
>>>>>>
>>>>>>
>>>>>> On Sat, Aug 22, 2009 at 5:52 AM, Sebastian
>>>>>> Hennebrueder<us...@laliluna.de> wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> the beaneditform provides a method recordError which expects a field
>>>>>>> of
>>>>>>> the
>>>>>>> form. I couldn't find out, how I can get a reference to a field
>>>>>>> of the form.
>>>>>>>
>>>>>>> I would like to call
>>>>>>> myForm.recordError(myInputField, "bad problem");
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards / Viele Grüße
>>>>>>>
>>>>>>> Sebastian Hennebrueder
>>>>>>> -----
>>>>>>> Software Developer and Trainer for Hibernate / Java Persistence
>>>>>>> http://www.laliluna.de
>>>>>>>
>>>>>>>
>>>>>>>

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


Re: BeanEditForm recorderror for a field

Posted by Kalle Korhonen <ka...@gmail.com>.
I don't see it as a workaround considering that you'd do exactly the
same if it was a regular form. However, I suppose it'd be entirely
possible and likely even easy to implement a getField(String
propertyName) for BeanEditForm. Maybe open an issue for it?

Kalle


On Sat, Aug 22, 2009 at 10:54 AM, Sebastian
Hennebrueder<us...@laliluna.de> wrote:
> I found this solution 5 minutes ago but thought it was a workaround. To
> allow cross field validation, it would be nice
> if the beaneditform provides access to the fields uses internally.
>
> What do you think?
> --
> Best Regards / Viele Grüße
>
> Sebastian Hennebrueder
> -----
> Software Developer and Trainer for Hibernate / Java Persistence
> http://www.laliluna.de
>
> Kalle Korhonen schrieb:
>>
>> Oh that - you need tell the bean editor that you want the field to be
>> used in your form. See Property Editor Overrides at
>> http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html, e.g:
>>
>>  <t:beaneditform object="formModel">
>>    <t:parameter name="country">
>>      <t:label for="country"/>
>>      <t:textfield t:id="country" value="formModel.country"/>
>>    </t:parameter>
>>  </t:beaneditform>
>>
>> Ulrich - in practice, is there a case when you would have to use
>> @InjectComponent over @Component with T5?
>>
>> Kalle
>>
>>
>> On Sat, Aug 22, 2009 at 9:33 AM, Sebastian
>> Hennebrueder<us...@laliluna.de> wrote:
>>>
>>> page snippet
>>> <t:beaneditform object="formModel" t:id="form"
>>> submit-label="message:submit"
>>> />
>>> class snippet
>>> @Component
>>>       private BeanEditForm form;
>>>
>>> //      @Component // doesnt work
>>> //      private TextField country;
>>>
>>> in the method onValidateForm I would like to record errors which should
>>> be
>>> shown at the country field, when redisplaying the form.
>>>
>>> Best Regards
>>>
>>> Sebastian Hennebrueder
>>>
>>> Ulrich Stärk schrieb:
>>>>
>>>> That's not 100% correct. @Component defines a component in your
>>>> component
>>>> class that you can then use in your template while @InjectComponent
>>>> injects
>>>> a component defined in your template.
>>>>
>>>> Cheers,
>>>>
>>>> Uli
>>>>
>>>> Kalle Korhonen schrieb:
>>>>>
>>>>> How do you reference your myForm? All components are handled the same
>>>>> way:
>>>>> @Component
>>>>> private TextField myInputField;
>>>>>
>>>>> Kalle
>>>>>
>>>>>
>>>>> On Sat, Aug 22, 2009 at 5:52 AM, Sebastian
>>>>> Hennebrueder<us...@laliluna.de> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> the beaneditform provides a method recordError which expects a field
>>>>>> of
>>>>>> the
>>>>>> form. I couldn't find out, how I can get a reference to a field
>>>>>> of the form.
>>>>>>
>>>>>> I would like to call
>>>>>> myForm.recordError(myInputField, "bad problem");
>>>>>>
>>>>>> --
>>>>>> Best Regards / Viele Grüße
>>>>>>
>>>>>> Sebastian Hennebrueder
>>>>>> -----
>>>>>> Software Developer and Trainer for Hibernate / Java Persistence
>>>>>> http://www.laliluna.de
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards / Viele Grüße
>>>
>>> Sebastian Hennebrueder
>>> -----
>>> Software Developer and Trainer for Hibernate / Java Persistence
>>> http://www.laliluna.de
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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


Re: BeanEditForm recorderror for a field

Posted by Sebastian Hennebrueder <us...@laliluna.de>.
I found this solution 5 minutes ago but thought it was a workaround. To 
allow cross field validation, it would be nice
if the beaneditform provides access to the fields uses internally.

What do you think?
-- 
Best Regards / Viele Grüße

Sebastian Hennebrueder
-----
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de

Kalle Korhonen schrieb:
> Oh that - you need tell the bean editor that you want the field to be
> used in your form. See Property Editor Overrides at
> http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html, e.g:
> 
>   <t:beaneditform object="formModel">
>     <t:parameter name="country">
>       <t:label for="country"/>
>       <t:textfield t:id="country" value="formModel.country"/>
>     </t:parameter>
>   </t:beaneditform>
> 
> Ulrich - in practice, is there a case when you would have to use
> @InjectComponent over @Component with T5?
> 
> Kalle
> 
> 
> On Sat, Aug 22, 2009 at 9:33 AM, Sebastian
> Hennebrueder<us...@laliluna.de> wrote:
>> page snippet
>> <t:beaneditform object="formModel" t:id="form" submit-label="message:submit"
>> />
>> class snippet
>> @Component
>>        private BeanEditForm form;
>>
>> //      @Component // doesnt work
>> //      private TextField country;
>>
>> in the method onValidateForm I would like to record errors which should be
>> shown at the country field, when redisplaying the form.
>>
>> Best Regards
>>
>> Sebastian Hennebrueder
>>
>> Ulrich Stärk schrieb:
>>> That's not 100% correct. @Component defines a component in your component
>>> class that you can then use in your template while @InjectComponent injects
>>> a component defined in your template.
>>>
>>> Cheers,
>>>
>>> Uli
>>>
>>> Kalle Korhonen schrieb:
>>>> How do you reference your myForm? All components are handled the same
>>>> way:
>>>> @Component
>>>> private TextField myInputField;
>>>>
>>>> Kalle
>>>>
>>>>
>>>> On Sat, Aug 22, 2009 at 5:52 AM, Sebastian
>>>> Hennebrueder<us...@laliluna.de> wrote:
>>>>> Hello,
>>>>>
>>>>> the beaneditform provides a method recordError which expects a field of
>>>>> the
>>>>> form. I couldn't find out, how I can get a reference to a field
>>>>> of the form.
>>>>>
>>>>> I would like to call
>>>>> myForm.recordError(myInputField, "bad problem");
>>>>>
>>>>> --
>>>>> Best Regards / Viele Grüße
>>>>>
>>>>> Sebastian Hennebrueder
>>>>> -----
>>>>> Software Developer and Trainer for Hibernate / Java Persistence
>>>>> http://www.laliluna.de
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>> --
>> Best Regards / Viele Grüße
>>
>> Sebastian Hennebrueder
>> -----
>> Software Developer and Trainer for Hibernate / Java Persistence
>> http://www.laliluna.de
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 






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


Re: BeanEditForm recorderror for a field

Posted by Kalle Korhonen <ka...@gmail.com>.
Yes, that's what I thought, thanks for confirming.

Kalle


On Mon, Aug 24, 2009 at 12:26 AM, Ulrich Stärk<ul...@spielviel.de> wrote:
> On 22.08.2009 19:38 schrieb Kalle Korhonen:
>>
>> Oh that - you need tell the bean editor that you want the field to be
>> used in your form. See Property Editor Overrides at
>> http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html, e.g:
>>
>>  <t:beaneditform object="formModel">
>>    <t:parameter name="country">
>>      <t:label for="country"/>
>>      <t:textfield t:id="country" value="formModel.country"/>
>>    </t:parameter>
>>  </t:beaneditform>
>>
>> Ulrich - in practice, is there a case when you would have to use
>> @InjectComponent over @Component with T5?
>
> No, you don't /have/ to, at least I can't imagine a situation. If you are
> giving your templates away to a designer you probably want to define all of
> your component's parameters in the component class and then you have to use
> @Component. You just have to realize that parameters defined within
> @Component take precedence over those specified inside the template. Apart
> from that @InjectComponent and @Component yield the same result. I believe
> though, that it's good style to use @InjectComponent when you just want to
> record a validation error for a specific field and don't want to actually
> define a component.
>
> Uli
>
> ---------------------------------------------------------------------
> 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


Re: BeanEditForm recorderror for a field

Posted by Ulrich Stärk <ul...@spielviel.de>.
On 22.08.2009 19:38 schrieb Kalle Korhonen:
> Oh that - you need tell the bean editor that you want the field to be
> used in your form. See Property Editor Overrides at
> http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html, e.g:
> 
>   <t:beaneditform object="formModel">
>     <t:parameter name="country">
>       <t:label for="country"/>
>       <t:textfield t:id="country" value="formModel.country"/>
>     </t:parameter>
>   </t:beaneditform>
> 
> Ulrich - in practice, is there a case when you would have to use
> @InjectComponent over @Component with T5?

No, you don't /have/ to, at least I can't imagine a situation. If you are giving your templates away 
to a designer you probably want to define all of your component's parameters in the component class 
and then you have to use @Component. You just have to realize that parameters defined within 
@Component take precedence over those specified inside the template. Apart from that 
@InjectComponent and @Component yield the same result. I believe though, that it's good style to use 
@InjectComponent when you just want to record a validation error for a specific field and don't want 
to actually define a component.

Uli

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


Re: BeanEditForm recorderror for a field

Posted by Kalle Korhonen <ka...@gmail.com>.
Oh that - you need tell the bean editor that you want the field to be
used in your form. See Property Editor Overrides at
http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html, e.g:

  <t:beaneditform object="formModel">
    <t:parameter name="country">
      <t:label for="country"/>
      <t:textfield t:id="country" value="formModel.country"/>
    </t:parameter>
  </t:beaneditform>

Ulrich - in practice, is there a case when you would have to use
@InjectComponent over @Component with T5?

Kalle


On Sat, Aug 22, 2009 at 9:33 AM, Sebastian
Hennebrueder<us...@laliluna.de> wrote:
> page snippet
> <t:beaneditform object="formModel" t:id="form" submit-label="message:submit"
> />
> class snippet
> @Component
>        private BeanEditForm form;
>
> //      @Component // doesnt work
> //      private TextField country;
>
> in the method onValidateForm I would like to record errors which should be
> shown at the country field, when redisplaying the form.
>
> Best Regards
>
> Sebastian Hennebrueder
>
> Ulrich Stärk schrieb:
>>
>> That's not 100% correct. @Component defines a component in your component
>> class that you can then use in your template while @InjectComponent injects
>> a component defined in your template.
>>
>> Cheers,
>>
>> Uli
>>
>> Kalle Korhonen schrieb:
>>>
>>> How do you reference your myForm? All components are handled the same
>>> way:
>>> @Component
>>> private TextField myInputField;
>>>
>>> Kalle
>>>
>>>
>>> On Sat, Aug 22, 2009 at 5:52 AM, Sebastian
>>> Hennebrueder<us...@laliluna.de> wrote:
>>>>
>>>> Hello,
>>>>
>>>> the beaneditform provides a method recordError which expects a field of
>>>> the
>>>> form. I couldn't find out, how I can get a reference to a field
>>>> of the form.
>>>>
>>>> I would like to call
>>>> myForm.recordError(myInputField, "bad problem");
>>>>
>>>> --
>>>> Best Regards / Viele Grüße
>>>>
>>>> Sebastian Hennebrueder
>>>> -----
>>>> Software Developer and Trainer for Hibernate / Java Persistence
>>>> http://www.laliluna.de
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Best Regards / Viele Grüße
>
> Sebastian Hennebrueder
> -----
> Software Developer and Trainer for Hibernate / Java Persistence
> http://www.laliluna.de
>
>
>
> ---------------------------------------------------------------------
> 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


Re: BeanEditForm recorderror for a field

Posted by Sebastian Hennebrueder <us...@laliluna.de>.
page snippet
<t:beaneditform object="formModel" t:id="form" 
submit-label="message:submit" />
class snippet
@Component
	private BeanEditForm form;

//	@Component // doesnt work
//	private TextField country;

in the method onValidateForm I would like to record errors which should 
be shown at the country field, when redisplaying the form.

Best Regards

Sebastian Hennebrueder

Ulrich Stärk schrieb:
> That's not 100% correct. @Component defines a component in your 
> component class that you can then use in your template while 
> @InjectComponent injects a component defined in your template.
> 
> Cheers,
> 
> Uli
> 
> Kalle Korhonen schrieb:
>> How do you reference your myForm? All components are handled the same 
>> way:
>> @Component
>> private TextField myInputField;
>>
>> Kalle
>>
>>
>> On Sat, Aug 22, 2009 at 5:52 AM, Sebastian
>> Hennebrueder<us...@laliluna.de> wrote:
>>> Hello,
>>>
>>> the beaneditform provides a method recordError which expects a field 
>>> of the
>>> form. I couldn't find out, how I can get a reference to a field
>>> of the form.
>>>
>>> I would like to call
>>> myForm.recordError(myInputField, "bad problem");
>>>
>>> -- 
>>> Best Regards / Viele Grüße
>>>
>>> Sebastian Hennebrueder
>>> -----
>>> Software Developer and Trainer for Hibernate / Java Persistence
>>> http://www.laliluna.de
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 



-- 
Best Regards / Viele Grüße

Sebastian Hennebrueder
-----
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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


Re: BeanEditForm recorderror for a field

Posted by Ulrich Stärk <ul...@spielviel.de>.
That's not 100% correct. @Component defines a component in your 
component class that you can then use in your template while 
@InjectComponent injects a component defined in your template.

Cheers,

Uli

Kalle Korhonen schrieb:
> How do you reference your myForm? All components are handled the same way:
> @Component
> private TextField myInputField;
> 
> Kalle
> 
> 
> On Sat, Aug 22, 2009 at 5:52 AM, Sebastian
> Hennebrueder<us...@laliluna.de> wrote:
>> Hello,
>>
>> the beaneditform provides a method recordError which expects a field of the
>> form. I couldn't find out, how I can get a reference to a field
>> of the form.
>>
>> I would like to call
>> myForm.recordError(myInputField, "bad problem");
>>
>> --
>> Best Regards / Viele Grüße
>>
>> Sebastian Hennebrueder
>> -----
>> Software Developer and Trainer for Hibernate / Java Persistence
>> http://www.laliluna.de
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 


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


Re: BeanEditForm recorderror for a field

Posted by Kalle Korhonen <ka...@gmail.com>.
How do you reference your myForm? All components are handled the same way:
@Component
private TextField myInputField;

Kalle


On Sat, Aug 22, 2009 at 5:52 AM, Sebastian
Hennebrueder<us...@laliluna.de> wrote:
> Hello,
>
> the beaneditform provides a method recordError which expects a field of the
> form. I couldn't find out, how I can get a reference to a field
> of the form.
>
> I would like to call
> myForm.recordError(myInputField, "bad problem");
>
> --
> Best Regards / Viele Grüße
>
> Sebastian Hennebrueder
> -----
> Software Developer and Trainer for Hibernate / Java Persistence
> http://www.laliluna.de
>
>
>
>
> ---------------------------------------------------------------------
> 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