Hello. Can you help me with sending params with ?
I have method:
@Override
public String someMethod(String s) {
return "Hello from middle part! " + s;
}
and realisation like this:
<cuba-entities view="some-browse-view" entity-name="erp$Entity" data="{{entity}}"></cuba-entities>
<cuba-entity view="some-browse-view" id="entityLoader" entity-name="erp$Entity" auto="false"
loading="{{entityLoading}}"></cuba-entity>
<table>
<tr id="table-header">
<th>My-info</th>
</tr>
<template id="entityRepeater" is="dom-repeat" items="[[entity]]">
<tr>
<td>[[str]]</td>
</tr>
<cuba-service service-name="som_EntityService"
method="someMethod"
data="{{str}}"
handle-as="text"
params='{"s":"[[item.id]]"}'>
</cuba-service>
</template>
</table>
I need to send uuid from all my entities like params, but have exception:
Uncaught (in promise) {message: "Failed to load data", errorData: {…}}
POST http://localhost:8080/som/rest/v2/services/som_EntityService/someMethod 500 ()
But if i send a request with static text like:
params=’{“s”:“some text”}’>
it`s works…
Can you halp me and show good example? thanks.