Re: [xwiki-users] Making an HTTP POST call from an XWiki extension
Hi, What do you wish to do exactly? To where do you wish to go an HTTP POST or GET? Som ideas: * If it’s to get some external content XWiki has some APIs. * You could use groovy which makes it extra easy to do HTTP (see snippets on extensions.xwiki.org or google it) Thanks -Vincent On 15 Oct 2015 at 03:44:24, Debajit Adhikary (debaj...@gmail.com) wrote: What is the easiest/recommended way to make an HTTP POST or GET call from within an XWiki extension? Should I use Restlet? (I am guessing XWiki comes with Restlet support) ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Making an HTTP POST call from an XWiki extension
What is the easiest/recommended way to make an HTTP POST or GET call from within an XWiki extension? Should I use Restlet? (I am guessing XWiki comes with Restlet support) ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] ScriptService issue --- Cannot access @Named ScriptService object through $services object
Thanks for the suggestion, that worked. Changing the @Inject to use the @Role (interface) instead of the @Component (the concrete class) fixed the issue :) Thanks for your help :) Out of curiosity, how does the Component manager know which concrete implementation to pick? Since I have only one component, does it automatically use that for the @Inject? On Wed, Oct 14, 2015 at 2:02 AM, Thomas Mortagne wrote: > On Wed, Oct 14, 2015 at 9:11 AM, vinc...@massol.net > wrote: > > > > > > On 14 Oct 2015 at 09:00:15, vinc...@massol.net (vinc...@massol.net > (mailto:vinc...@massol.net)) wrote: > > > >> > >> > >> On 14 Oct 2015 at 06:43:36, Marius Dumitru Florea ( > mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com)) > wrote: > >> > >> > Hi Debajit, > >> > > >> > On Oct 14, 2015 01:17, "Debajit Adhikary" wrote: > >> > > > >> > > I created an XWiki component which is available as a jar file. > >> > > > >> > > I have a ScriptService class for the component too: > >> > > > >> > > > >> > > > >> > > @Role > >> > > public interface SearchClient > >> > > { > >> > > String search(); > >> > > } > >> > > > >> > > > >> > > > >> > > @Component > >> > > @Singleton > >> > > public class InternalSearchClient implements SearchClient > >> > > { > >> > > public String search() > >> > > { > >> > > return "test search results"; > >> > > } > >> > > } > >> > > > >> > > > >> > > > >> > > @Component > >> > > @Named("internalSearch") > >> > > @Singleton > >> > > public class InternalSearchScriptService implements ScriptService > >> > > { > >> > > >> > > @Inject > >> > > private InternalSearchClient searchClient; > >> > > >> > You need to "inject" the role (interface), not directly the > implementation. > >> > That's why you use the Component Manager. Othewise you could have > simply > >> > used the "new" operator to instantiate yourself the component. > >> > >> Good catch, didn’t see it when I replied yesterday! :) > >> > >> I guess we could catch this in the AnnotationComponentLoader and report > an error. > > > > Actually, the Component Manager should raise an error if it fails to > inject a field. I was sure it was doing that, strange. I’ll debug it. > > It does. > > > > > Thanks > > -Vincent > > > >> Thanks > >> -Vincent > >> > >> > Hope this helps, > >> > Marius > >> > > >> > > > >> > > public String search() > >> > > { > >> > > return this.searchClient.search(); > >> > > } > >> > > } > >> > > > >> > > > >> > > > >> > > I've added all the above files into their own jar with a > components.txt > >> > > file: > >> > > > >> > > com.mycompany.wiki.search.InternalSearchClient > >> > > com.mycompany.wiki.search.InternalSearchScriptService > >> > > > >> > > and in my Wiki's pom.xml, I have the following: > >> > > > >> > > > >> > > org.xwiki.commons > >> > > xwiki-commons-script > >> > > ${commons.version} > >> > > > >> > > > >> > > > >> > > Now from my Wiki page, when I do the following: > >> > > > >> > > {{groovy}} > >> > > println(services.internalSearch.search()) > >> > > {{/groovy}} > >> > > > >> > > I get an error message saying "java.lang.NullPointerException: > Cannot > >> > > invoke method search() on null object" > >> > > > >> > > What am I doing wrong here? > >> > > > >> > > (I followed the directions in > >> > > http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents > — have > >> > > these directions changed, and/or is there anything else I need to > do? ) > >> > > > > ___ > > users mailing list > > users@xwiki.org > > http://lists.xwiki.org/mailman/listinfo/users > > > > -- > Thomas Mortagne > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Parent-Children Livetable macro 1.2 - Error
I have XWIKI 7.1.2 on UBUNTU 14.04.3 LTS, Tomcat7 and MySQL from Ubuntu Distribution. XWIKI WAR Install. I am using a subwiki. The following line {{parentschildrenlivetable space="An existing Space"/}} Result in this message in catalina.out 2015-10-14 18:04:35,664 [http://wiki/xwiki/wiki/icwiki/edit/XWiki/SpaceParentsChildrenService?language=en&editor=inline] ERROR o.x.v.i.DefaultVelocityEngine - Left side ($returnedItems) of '<' operation has null value at 37:icwiki:XWiki.SpaceParentsChildrenService[line 250, column 37] -- View this message in context: http://xwiki.475771.n2.nabble.com/Parent-Children-Livetable-macro-1-2-Error-tp7596477.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] ScriptService issue --- Cannot access @Named ScriptService object through $services object
On Wed, Oct 14, 2015 at 9:11 AM, vinc...@massol.net wrote: > > > On 14 Oct 2015 at 09:00:15, vinc...@massol.net > (vinc...@massol.net(mailto:vinc...@massol.net)) wrote: > >> >> >> On 14 Oct 2015 at 06:43:36, Marius Dumitru Florea >> (mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com)) >> wrote: >> >> > Hi Debajit, >> > >> > On Oct 14, 2015 01:17, "Debajit Adhikary" wrote: >> > > >> > > I created an XWiki component which is available as a jar file. >> > > >> > > I have a ScriptService class for the component too: >> > > >> > > >> > > >> > > @Role >> > > public interface SearchClient >> > > { >> > > String search(); >> > > } >> > > >> > > >> > > >> > > @Component >> > > @Singleton >> > > public class InternalSearchClient implements SearchClient >> > > { >> > > public String search() >> > > { >> > > return "test search results"; >> > > } >> > > } >> > > >> > > >> > > >> > > @Component >> > > @Named("internalSearch") >> > > @Singleton >> > > public class InternalSearchScriptService implements ScriptService >> > > { >> > >> > > @Inject >> > > private InternalSearchClient searchClient; >> > >> > You need to "inject" the role (interface), not directly the implementation. >> > That's why you use the Component Manager. Othewise you could have simply >> > used the "new" operator to instantiate yourself the component. >> >> Good catch, didn’t see it when I replied yesterday! :) >> >> I guess we could catch this in the AnnotationComponentLoader and report an >> error. > > Actually, the Component Manager should raise an error if it fails to inject a > field. I was sure it was doing that, strange. I’ll debug it. It does. > > Thanks > -Vincent > >> Thanks >> -Vincent >> >> > Hope this helps, >> > Marius >> > >> > > >> > > public String search() >> > > { >> > > return this.searchClient.search(); >> > > } >> > > } >> > > >> > > >> > > >> > > I've added all the above files into their own jar with a components.txt >> > > file: >> > > >> > > com.mycompany.wiki.search.InternalSearchClient >> > > com.mycompany.wiki.search.InternalSearchScriptService >> > > >> > > and in my Wiki's pom.xml, I have the following: >> > > >> > > >> > > org.xwiki.commons >> > > xwiki-commons-script >> > > ${commons.version} >> > > >> > > >> > > >> > > Now from my Wiki page, when I do the following: >> > > >> > > {{groovy}} >> > > println(services.internalSearch.search()) >> > > {{/groovy}} >> > > >> > > I get an error message saying "java.lang.NullPointerException: Cannot >> > > invoke method search() on null object" >> > > >> > > What am I doing wrong here? >> > > >> > > (I followed the directions in >> > > http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents — >> > > have >> > > these directions changed, and/or is there anything else I need to do? ) >> > > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [ANN] XWiki 7.3 Milestone 1 released
On 14 Oct 2015 at 10:30:51, Maxime Sinclair (maxime.sincl...@gmail.com(mailto:maxime.sincl...@gmail.com)) wrote: > Hi Vincent, > Good news, the 7.1.2 is available, see > http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki712 > ;-) > > Do you mean a 7.1.3 ? hehe, yes I meant 7.1.3, thanks :) -Vincent > Thanks! > Maxime > > 2015-10-14 9:15 GMT+02:00 vinc...@massol.net : > > > Hi Miroslav, > > > > On 14 Oct 2015 at 09:04:23, Miroslav Galajda (miroslav.gala...@gmail.com > > (mailto:miroslav.gala...@gmail.com)) wrote: > > > > > Hi, that's great. > > > > > > Is there any chance to get those fixes in the 7.2.1 release? > > > > We’re probably not going to release a 7.2.1 version (we’ll probably > > release a 7.1.2 though - that’s the version prior to Nested Spaces). > > > > 7.3 has a short release timeframe and it’s a stabilization release so > > we’ll be recommending users to upgrade to it. > > > > Would be great if you could try upgrading to 7.3M1 and let us know how it > > goes. > > > > Thanks! > > -Vincent > > > > > > > Mirec > > > > > > On 14 October 2015 at 01:00, vinc...@massol.net wrote: > > > > > > > The XWiki development team is proud to announce the availability of > > XWiki > > > > 7.3 Milestone 1. > > > > > > > > This is the first of the 2 stabilization releases that happen at the > > end > > > > of each yearly Cycles. Lots of polishing has been done, especially for > > the > > > > recently introduced Nested Pages feature and its consequences on the UI > > > > redesign (modified menus for example). > > > > > > > > You can download it here: > > > > http://www.xwiki.org/xwiki/bin/view/Main/Download > > > > > > > > Make sure to review the release notes: > > > > http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki73M1 > > > > > > > > The following people have contributed code to this release (sorted > > > > alphabetically on last name): > > > > > > > > Pascal Bastien > > > > Guillaume Delhumeau > > > > Marius Dumitru Florea > > > > Vincent Massol > > > > Ecaterina Moraru > > > > Eduard Moraru > > > > Thomas Mortagne > > > > Clemens Robbenhaar > > > > Jean Simard > > > > Gabriela Smeria > > > > Manuel Smeria > > > > > > > > Thanks for your support > > > > -The XWiki dev team ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [ANN] XWiki 7.3 Milestone 1 released
Hi Vincent, Good news, the 7.1.2 is available, see http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki712 ;-) Do you mean a 7.1.3 ? Thanks! Maxime 2015-10-14 9:15 GMT+02:00 vinc...@massol.net : > Hi Miroslav, > > On 14 Oct 2015 at 09:04:23, Miroslav Galajda (miroslav.gala...@gmail.com > (mailto:miroslav.gala...@gmail.com)) wrote: > > > Hi, that's great. > > > > Is there any chance to get those fixes in the 7.2.1 release? > > We’re probably not going to release a 7.2.1 version (we’ll probably > release a 7.1.2 though - that’s the version prior to Nested Spaces). > > 7.3 has a short release timeframe and it’s a stabilization release so > we’ll be recommending users to upgrade to it. > > Would be great if you could try upgrading to 7.3M1 and let us know how it > goes. > > Thanks! > -Vincent > > > > Mirec > > > > On 14 October 2015 at 01:00, vinc...@massol.net wrote: > > > > > The XWiki development team is proud to announce the availability of > XWiki > > > 7.3 Milestone 1. > > > > > > This is the first of the 2 stabilization releases that happen at the > end > > > of each yearly Cycles. Lots of polishing has been done, especially for > the > > > recently introduced Nested Pages feature and its consequences on the UI > > > redesign (modified menus for example). > > > > > > You can download it here: > > > http://www.xwiki.org/xwiki/bin/view/Main/Download > > > > > > Make sure to review the release notes: > > > http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki73M1 > > > > > > The following people have contributed code to this release (sorted > > > alphabetically on last name): > > > > > > Pascal Bastien > > > Guillaume Delhumeau > > > Marius Dumitru Florea > > > Vincent Massol > > > Ecaterina Moraru > > > Eduard Moraru > > > Thomas Mortagne > > > Clemens Robbenhaar > > > Jean Simard > > > Gabriela Smeria > > > Manuel Smeria > > > > > > Thanks for your support > > > -The XWiki dev team > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [ANN] XWiki 7.3 Milestone 1 released
Hi Miroslav, On 14 Oct 2015 at 09:04:23, Miroslav Galajda (miroslav.gala...@gmail.com(mailto:miroslav.gala...@gmail.com)) wrote: > Hi, that's great. > > Is there any chance to get those fixes in the 7.2.1 release? We’re probably not going to release a 7.2.1 version (we’ll probably release a 7.1.2 though - that’s the version prior to Nested Spaces). 7.3 has a short release timeframe and it’s a stabilization release so we’ll be recommending users to upgrade to it. Would be great if you could try upgrading to 7.3M1 and let us know how it goes. Thanks! -Vincent > Mirec > > On 14 October 2015 at 01:00, vinc...@massol.net wrote: > > > The XWiki development team is proud to announce the availability of XWiki > > 7.3 Milestone 1. > > > > This is the first of the 2 stabilization releases that happen at the end > > of each yearly Cycles. Lots of polishing has been done, especially for the > > recently introduced Nested Pages feature and its consequences on the UI > > redesign (modified menus for example). > > > > You can download it here: > > http://www.xwiki.org/xwiki/bin/view/Main/Download > > > > Make sure to review the release notes: > > http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki73M1 > > > > The following people have contributed code to this release (sorted > > alphabetically on last name): > > > > Pascal Bastien > > Guillaume Delhumeau > > Marius Dumitru Florea > > Vincent Massol > > Ecaterina Moraru > > Eduard Moraru > > Thomas Mortagne > > Clemens Robbenhaar > > Jean Simard > > Gabriela Smeria > > Manuel Smeria > > > > Thanks for your support > > -The XWiki dev team ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] ScriptService issue --- Cannot access @Named ScriptService object through $services object
On 14 Oct 2015 at 09:00:15, vinc...@massol.net (vinc...@massol.net(mailto:vinc...@massol.net)) wrote: > > > On 14 Oct 2015 at 06:43:36, Marius Dumitru Florea > (mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com)) wrote: > > > Hi Debajit, > > > > On Oct 14, 2015 01:17, "Debajit Adhikary" wrote: > > > > > > I created an XWiki component which is available as a jar file. > > > > > > I have a ScriptService class for the component too: > > > > > > > > > > > > @Role > > > public interface SearchClient > > > { > > > String search(); > > > } > > > > > > > > > > > > @Component > > > @Singleton > > > public class InternalSearchClient implements SearchClient > > > { > > > public String search() > > > { > > > return "test search results"; > > > } > > > } > > > > > > > > > > > > @Component > > > @Named("internalSearch") > > > @Singleton > > > public class InternalSearchScriptService implements ScriptService > > > { > > > > > @Inject > > > private InternalSearchClient searchClient; > > > > You need to "inject" the role (interface), not directly the implementation. > > That's why you use the Component Manager. Othewise you could have simply > > used the "new" operator to instantiate yourself the component. > > Good catch, didn’t see it when I replied yesterday! :) > > I guess we could catch this in the AnnotationComponentLoader and report an > error. Actually, the Component Manager should raise an error if it fails to inject a field. I was sure it was doing that, strange. I’ll debug it. Thanks -Vincent > Thanks > -Vincent > > > Hope this helps, > > Marius > > > > > > > > public String search() > > > { > > > return this.searchClient.search(); > > > } > > > } > > > > > > > > > > > > I've added all the above files into their own jar with a components.txt > > > file: > > > > > > com.mycompany.wiki.search.InternalSearchClient > > > com.mycompany.wiki.search.InternalSearchScriptService > > > > > > and in my Wiki's pom.xml, I have the following: > > > > > > > > > org.xwiki.commons > > > xwiki-commons-script > > > ${commons.version} > > > > > > > > > > > > Now from my Wiki page, when I do the following: > > > > > > {{groovy}} > > > println(services.internalSearch.search()) > > > {{/groovy}} > > > > > > I get an error message saying "java.lang.NullPointerException: Cannot > > > invoke method search() on null object" > > > > > > What am I doing wrong here? > > > > > > (I followed the directions in > > > http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents — have > > > these directions changed, and/or is there anything else I need to do? ) > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [ANN] XWiki 7.3 Milestone 1 released
Hi, that's great. Is there any chance to get those fixes in the 7.2.1 release? Mirec On 14 October 2015 at 01:00, vinc...@massol.net wrote: > The XWiki development team is proud to announce the availability of XWiki > 7.3 Milestone 1. > > This is the first of the 2 stabilization releases that happen at the end > of each yearly Cycles. Lots of polishing has been done, especially for the > recently introduced Nested Pages feature and its consequences on the UI > redesign (modified menus for example). > > You can download it here: > http://www.xwiki.org/xwiki/bin/view/Main/Download > > Make sure to review the release notes: > http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki73M1 > > The following people have contributed code to this release (sorted > alphabetically on last name): > > Pascal Bastien > Guillaume Delhumeau > Marius Dumitru Florea > Vincent Massol > Ecaterina Moraru > Eduard Moraru > Thomas Mortagne > Clemens Robbenhaar > Jean Simard > Gabriela Smeria > Manuel Smeria > > Thanks for your support > -The XWiki dev team > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] ScriptService issue --- Cannot access @Named ScriptService object through $services object
On 14 Oct 2015 at 06:43:36, Marius Dumitru Florea (mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com)) wrote: > Hi Debajit, > > On Oct 14, 2015 01:17, "Debajit Adhikary" wrote: > > > > I created an XWiki component which is available as a jar file. > > > > I have a ScriptService class for the component too: > > > > > > > > @Role > > public interface SearchClient > > { > > String search(); > > } > > > > > > > > @Component > > @Singleton > > public class InternalSearchClient implements SearchClient > > { > > public String search() > > { > > return "test search results"; > > } > > } > > > > > > > > @Component > > @Named("internalSearch") > > @Singleton > > public class InternalSearchScriptService implements ScriptService > > { > > > @Inject > > private InternalSearchClient searchClient; > > You need to "inject" the role (interface), not directly the implementation. > That's why you use the Component Manager. Othewise you could have simply > used the "new" operator to instantiate yourself the component. Good catch, didn’t see it when I replied yesterday! :) I guess we could catch this in the AnnotationComponentLoader and report an error. Thanks -Vincent > Hope this helps, > Marius > > > > > public String search() > > { > > return this.searchClient.search(); > > } > > } > > > > > > > > I've added all the above files into their own jar with a components.txt > > file: > > > > com.mycompany.wiki.search.InternalSearchClient > > com.mycompany.wiki.search.InternalSearchScriptService > > > > and in my Wiki's pom.xml, I have the following: > > > > > > org.xwiki.commons > > xwiki-commons-script > > ${commons.version} > > > > > > > > Now from my Wiki page, when I do the following: > > > > {{groovy}} > > println(services.internalSearch.search()) > > {{/groovy}} > > > > I get an error message saying "java.lang.NullPointerException: Cannot > > invoke method search() on null object" > > > > What am I doing wrong here? > > > > (I followed the directions in > > http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents — have > > these directions changed, and/or is there anything else I need to do? ) ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users