Am 05.01.16 um 14:14 schrieb Thiago H de Paula Figueiredo:
On Tue, 05 Jan 2016 09:03:59 -0200, Andreas Ernst <a...@ae-online.de> wrote:

Hi,

Hi!

"No service implements the interface XXX" means you're trying to inject
a dependency of type XXX in some service or object created by
ObjectLocator/Registry.autobuild(). The class you're editing in
BeanEditForm, Tanken, probably has constructors other than a no-arg one
and you're leaving the instantiation of Tanken to
BeanEditForm/BeanEditor, which does that by calling
ObjectLocator.autobuild(), which takes the constructor with the longest
list of parameters then considers them as dependencies (services) to
inject.

Here's my proposed fix: instantiate the object yourself in your page:

void onPrepare() {
     if (tanken == null) {
         tanken = new Tanken();
     }
}

The 'prepare' event is triggered just before a Form is rendered
(BeanEditForm uses this component internally) and also just before a
form submission is handled, triggering the 'validate', 'success' and
'failure' events as needed.


You saved my day. I think, i never would find to change setupRender to onPrepare. The other T5 project got onPrepare ...

Thanks a lot!

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

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

Reply via email to