I created a table with maxoccurs="unbounded" to set the operations of a service. The table has a input-text and a textarea.
<table name="Operations" columns="2" maxoccurs="unbounded">
<subheading>
<heading>Operation</heading>
<heading>Description</heading>
</subheading>
<field type="text">
<name>Operation</name>
</field>
<field type="text-area">
<name>Description</name>
</field>
</table>
I'm trying to add operations via API, but I can only achieve to set one operation. If in the loop I execute this, the registry only shows one item and the last operation:
service.addAttribute("operations_operation", "getSomething");
service.addAttribute("operations_description", "This is a description");
If I execute this code in a loop of 5 items, the registry creates 5 rows but no text in it:
service.addAttribute("operations", "getSomething");
Which is the way to add attributes of this type via API? Thanks!
If you are trying to add attributes using API, you can use setAttributes operation as below:
If you want to add a new attribute into existing attributes you can use
addAttribute
operation.