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.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org