Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Java services
[Acceleo] Java services [message #892466] Thu, 28 June 2012 10:28 Go to next message
Cyril Savary is currently offline Cyril SavaryFriend
Messages: 3
Registered: June 2012
Junior Member
Hello,

I'm trying to use java services with Acceleo.

I made a service that returns a sequence, here is the corresponding query :

[query public getLayout(arg0 : Integer, arg1 : Integer) : Sequence(Integer)
	= invoke('mapfishapp.services.Services', 'getLayout(int, int)', Sequence{arg0, arg1}) /]


However, when I try to use it in my templates, the returned value isn't considered as a sequence, but as an integer. So I can't use methods like "at".

Thanks for helping.
Re: [Acceleo] Java services [message #893207 is a reply to message #892466] Tue, 03 July 2012 08:35 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

Are your sure that you are not trying to do this:
[getLayout(0, 1).at(0)/]


Instead of this:
[getLayout(0, 1)->at(0)/]


Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau & @acceleo
Google+: stephane.begaudeau & acceleo
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo

[Updated on: Tue, 03 July 2012 08:35]

Report message to a moderator

Re: [Acceleo] Java services [message #893211 is a reply to message #893207] Tue, 03 July 2012 08:41 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If OCL is in use here, at(1) is better than at(0).

Regards

Ed Willink

On 03/07/2012 09:35, Stephane Begaudeau wrote:
> Hi,
>
> Are your sure that you are not trying to do this:
> [getLayout(0, 1).at(0)/]
>
> Instead of this:
> [getLayout(0, 1)->at(0)/]
>
> Regards,
>
> Stephane Begaudeau, Obeo
>
> --
> Twitter: http://twitter.com/#!/sbegaudeau & http://twitter.com/#!/acceleo
> Google+: https://plus.google.com/u/0/105625286543794908607/ &
> https://plus.google.com/u/0/114651471803085159652/
> Blog: http://stephanebegaudeau.tumblr.com
> Acceleo Documentation: http://docs.obeonetwork.com/acceleo
Previous Topic:JET templates and aspects
Next Topic:[Acceleo] Standalone generation
Goto Forum:
  


Current Time: Thu Apr 25 12:13:02 GMT 2024

Powered by FUDForum. Page generated in 0.03303 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top