On Wed, Dec 23, 2015 at 12:30 AM, Ludovic Dubost <ludovic(a)xwiki.com> wrote:
Isn't the problem that it should be
#if("$!request.evolver" == "1")
And not
I thought so too but I tested and it works. I checked the Velocity
documentation [1] and the explanation is:
"In the last case (when objects are of different classes), the toString()
method is called on each object and the resulting Strings are compared."
Thanks,
Marius
[1]
Ludo
Le 22 déc. 2015 21:32, "Giordano Ninonà" <giordano.ninona(a)gmail.com> a
écrit :
Dear Vincent,
Tank you for your reply, I would try what you suggested in the afternoon,
but regarding the "evolver=1 request param", I've set it equal to 1
together with POST command in order to make it always true ensuring that
my
component is started every time. My thoughts were
wrong?
Giordano.
2015-12-22 11:31 GMT+01:00 vincent(a)massol.net <vincent(a)massol.net>et>:
> Hi Giordano,
>
> On 21 Dec 2015 at 15:20:55, Giordano Ninonà (giordano.ninona(a)gmail.com
> (mailto:giordano.ninona@gmail.com)) wrote:
>
> > Hi users,
> >
> > My project in XWiki consists in a java component which offers some
APIs
> > through a script service called by a
Velocity script in a wiki page.
> >
> > I put my .jar in the directory C:\XWiki Enterprise
> > 7.3\*webapps\xwiki\WEB-INF\lib
> > *and this is the Velocity and HTML code that I've put in my XWiki
page:
> >
> > {{velocity}}
> > #if("$!request.evolver" == 1)
> > ## Request for creating a new instance
> > $services.pars.parse()
> > $services.evo.removeInstance("Take bike")
> > $response.sendRedirect($xwiki.getURL('Main.WebHome'))
> > ## Stop processing, since we already sent a redirect.
> > #stop
> > #end
>
> [snip]
>
> > Let first say that nothing is happening when I click on the "Evolve"
> button
> > and I don't know why...it looks like it should work, also because
> creating
> > a Main_test class in Eclipse, I can run my software calling exactly
the
> > same methods and it works!
>
> You could use GET instead of POST and see what you get in the URL (ie
> whether you get the evolver=1 request param).
>
> > Moreover my component must create some files to store some
information,
> > thus I am wondering where to save those
files in order to make them
> > accessible by the component.
>
> You can use the XWiki’s permanent directory.
>
> See
>
http://extensions.xwiki.org/xwiki/bin/view/Extension/Environment+Module
Thanks
-Vincent
Any suggestions?
Thanks in advance,
Giordano.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users