found NullAnnotaionProvider which is somewhat better invoice = provider.provide(Invoice.*class*, *new* NullAnnotationProvider(), *null*, *true*);
On Mon, Oct 14, 2013 at 7:45 AM, Barry Books <[email protected]> wrote: > finally got around to this and it does not work in 5.4 > > > - > > org.apache.tapestry5.ioc.internal.services.ValueObjectProvider.provide(ValueObjectProvider.java:47) > - > > org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl$1.invoke(MasterObjectProviderImpl.java:52) > - > > org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:45) > - com.trsvax.pages.work.WorkView.onSuccess(WorkView.java:214) > > * > * > because > > > 47<https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ValueObjectProvider.java;h=828c6697af39dc36775aa4647b2ea29ca7c173b3;hb=HEAD#l47> > Value annotation = annotationProvider.getAnnotation(Value.class); > > but this does > > invoice = provider.provide(Invoice.*class*, *new* AnnotationProvider() { > > > @Override > > *public* <T *extends* Annotation> T getAnnotation(Class<T> arg0) { > > *return* *null*; > > } > > }, *null*, *true*); > > > While it works it's not the most convenient method for creating a new > object. I'm guessing your code works in 5.3. Should I create a JIRA? > > > On Mon, Sep 30, 2013 at 8:25 AM, Thiago H de Paula Figueiredo < > [email protected]> wrote: > >> On Mon, 30 Sep 2013 09:50:14 -0300, Barry Books <[email protected]> wrote: >> >> Thanks for the example. I think that will meet my needs. >>> >> >> Yay! :) >> >> >> I don't think I >>> would have ever figured that out from the existing documentation. >>> >> >> It's one of the hidden gems of Tapestry and Tapestry-IoC. I just >> remembered it because I remembered that in Tapestry-IoC you can provide any >> injection yourself as long as you contributed something to some service, >> then I remembered about ObjectProvider and MasterObjectProvider. >> >> >> -- >> Thiago H. de Paula Figueiredo >> >> ------------------------------**------------------------------**--------- >> To unsubscribe, e-mail: >> dev-unsubscribe@tapestry.**apache.org<[email protected]> >> For additional commands, e-mail: [email protected] >> >> >
