defining a service with variable number of output attributes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

defining a service with variable number of output attributes

Jaki-2
How do I define the output attributes of a service if the number of output attributes and their names can't be decided until the program/service is run.
For example, the returning map for my current service contains a list of products. But the number of products returned can change with a change in the db and also their key-names in the map since I'm naming each product corresponding to its position in the map (i.e. product1, product 2..etc)
Reply | Threaded
Open this post in threaded view
|

Re: defining a service with variable number of output attributes

Jacques Le Roux
Administrator
You can't define dynamically the number of output attributes (or use something like java ellipsis). Why don't you use an output
attribute of type Map for these ?

Jacques

From: "jaki" <[hidden email]>

>
> How do I define the output attributes of a service if the number of output
> attributes and their names can't be decided until the program/service is
> run.
> For example, the returning map for my current service contains a list of
> products. But the number of products returned can change with a change in
> the db and also their key-names in the map since I'm naming each product
> corresponding to its position in the map (i.e. product1, product 2..etc)
> --
> View this message in context:
> http://www.nabble.com/defining-a-service-with-variable-number-of-output-attributes-tp17624305p17624305.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: defining a service with variable number of output attributes

Scott Gray
Or a List if you're only using the Maps keys to signify the position.
Either way there are plenty of examples in the applications.

Scott

2008/6/4 Jacques Le Roux <[hidden email]>:

> You can't define dynamically the number of output attributes (or use
> something like java ellipsis). Why don't you use an output attribute of type
> Map for these ?
>
> Jacques
>
> From: "jaki" <[hidden email]>
>
>
>> How do I define the output attributes of a service if the number of output
>> attributes and their names can't be decided until the program/service is
>> run.
>> For example, the returning map for my current service contains a list of
>> products. But the number of products returned can change with a change in
>> the db and also their key-names in the map since I'm naming each product
>> corresponding to its position in the map (i.e. product1, product 2..etc)
>> --
>> View this message in context:
>> http://www.nabble.com/defining-a-service-with-variable-number-of-output-attributes-tp17624305p17624305.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
>