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<use...@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<use...@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-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@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-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org