In the "HelloWorldVelocityContextInitializer.java" i wrote
@Component("helloWorld").
In the "DefaultHelloWorld.java" I wrote @Component.
And in the "public interface HelloWorld" I wrote @ComponentRole.
I tried it once again and now it passed. But I don't know why.
Could it be, that I used the Core-Version 2.0.2 before I used 2.1.1 in the
pom.xml, or
Is the fact that I added the ApplicationManagerPlugin???
> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:[email protected]] Im Auftrag von
> shelan
> Perera
> Gesendet: Montag, 8. März 2010 17:19
> An: XWiki Developers
> Betreff: Re: [xwiki-devs] Help for "Writing a Component"
>
> Hi,
>
> Did you put @ComponentRole in the interface and @Component in your interface
> implementation class?
> Since you mentioned.
>
> Then I copied the both snippets after "initalize() function" and put in the
> > new builded "components.txt"
>
> The org.xwiki.component.internal.DefaultHelloWorld"
>
>
> Regards,
>
> Shelan Perera
>
> On Mon, Mar 8, 2010 at 8:53 PM, Mittmann, Mirko
> <[email protected]>wrote:
>
> > Hi,
> >
> > I download the archetype and do all what there stands should to do, like
> > maven install etc.
> > After that write in the pom.xml that I use the 2.1.1 - Version.
> > Then I copied the snippet provided in "HelloWorld.java".
> > In the "DefaultHelloWorld.java" I write the second type.
> > Then I copied the both snippets after "initalize() function" and put in the
> > new builded "components.txt"
> > The org.xwiki.component.internal.DefaultHelloWorld"
> > And build although the "HelloWorldVelocityContextInitializer", then I build
> > it with maven.
> > Put the created jar, from target do "WEB-INF\lib" and restart the xwiki.
> > Put the given Groovy and the Velocity Code.
> > If I saved the site: on the velocity code it shows: $greeter.sayHello() and
> > the groovy code says: null.
> >
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: [email protected] [mailto:[email protected]] Im Auftrag
> > von shelan
> > > Perera
> > > Gesendet: Montag, 8. März 2010 15:33
> > > An: XWiki Developers
> > > Betreff: [?? Probable Spam] Re: [xwiki-devs] Help for "Writing a
> > Component"
> > >
> > > Hi,
> > >
> > > Could you please be more specific on what you have been trying to do.So i
> > > might can help you as i did the tutorial and exposed it using Velocity
> > > scripting.(But i hope if the basics are correct you can get it right)
> > >
> > > @ComponentRole and @Component
> > >
> > > are needed annotations when you implement the component.( In the tutorial
> > > you can find where and how to put them)
> > >
> > > Then you have to add the class name of the interface implementation.
> > >
> > > eg: org.xwiki.component.internal.DefaultHelloWorld
> > >
> > > hope this would give you some guidance.
> > >
> > >
> > > Regards,
> > >
> > > Shelan Perera
> > >
> > >
> > >
> > > On Mon, Mar 8, 2010 at 7:26 PM, Mittmann, Mirko
> > > <[email protected]>wrote:
> > >
> > > > If i go through the Tutorial for "Writing XWiki components",
> > > >
> > > >
> > > >
> > > > I had problem, on using it while I'm put the code for groovy on a
> > > > XWiki-site.
> > > >
> > > > It returns only "null" and nothing what "HelloWorld" means.
> > > >
> > > >
> > > >
> > > > Can someone give me a detailed description for realizing the HelloWorld
> > > > - component
> > > >
> > > > from beginning with eclipse and groovy?
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > devs mailing list
> > > > [email protected]
> > > > http://lists.xwiki.org/mailman/listinfo/devs
> > > >
> > > _______________________________________________
> > > devs mailing list
> > > [email protected]
> > > http://lists.xwiki.org/mailman/listinfo/devs
> >
> > _______________________________________________
> > devs mailing list
> > [email protected]
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs