Re: BeanEditForm recorderror for a field

2009-08-24 Thread Kalle Korhonen
Yes, that's what I thought, thanks for confirming. Kalle On Mon, Aug 24, 2009 at 12:26 AM, Ulrich Stärk 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:

Re: BeanEditForm recorderror for a field

2009-08-24 Thread Ulrich Stärk
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: Ulrich - in practice, is there

Re: BeanEditForm recorderror for a field

2009-08-23 Thread Sebastian Hennebrueder
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 rec

Re: BeanEditForm recorderror for a field

2009-08-22 Thread Kalle Korhonen
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,

Re: BeanEditForm recorderror for a field

2009-08-22 Thread Sebastian Hennebrueder
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

Re: BeanEditForm recorderror for a field

2009-08-22 Thread 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: Ulrich - in practice, is there a case when you would have to use @InjectComp

Re: BeanEditForm recorderror for a field

2009-08-22 Thread Sebastian Hennebrueder
page snippet 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 redisplayin

Re: BeanEditForm recorderror for a field

2009-08-22 Thread Ulrich Stärk
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 sam

Re: BeanEditForm recorderror for a field

2009-08-22 Thread Kalle Korhonen
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 wrote: > Hello, > > the beaneditform provides a method recordError which expects a field of the > form. I couldn't f

BeanEditForm recorderror for a field

2009-08-22 Thread Sebastian Hennebrueder
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 - Sof