Hi,
I can't seem to figure out how to pass extra criteria arguments to a custom operation on a DataSource.
My calls are in general:
and on the server:
dsRequest.getValues() holds the myRecord, which I'm transforming to a server object using DataTools.
I can't seem to pass anything with the requestProps (a DSRequest object) though (for example a non-data parameter for the server call).
Example pass key "hello" and value "hi" from client to custom operation:
If I do requestProps.setAttribute("hello", "hi"), where should I be able to find that attribute in the server?
If I put ("hello", "hi") in the myRecord, I do find it on the server, but this sits
in between my record attributes and DataTools gives me a correct warning
so I don't want to use this.
I saw dsRequest has a call getAttribute(), but what does it do? Also inspecting the dsRequest "attributes" field in debug mode shows it's always empty. Can I use that to pass something?
So in a general note, should the Criteria functionality be possible here?
I saw this note though on dsRequest.getCriteria - not be used with a custom operation.
I can't seem to figure out how to pass extra criteria arguments to a custom operation on a DataSource.
My calls are in general:
Code:
ds.performCustomOperation(opID, myRecord, callback, requestProps)
Code:
public DSResponse operation(DSRequest dsRequest) throws Exception
I can't seem to pass anything with the requestProps (a DSRequest object) though (for example a non-data parameter for the server call).
Example pass key "hello" and value "hi" from client to custom operation:
If I do requestProps.setAttribute("hello", "hi"), where should I be able to find that attribute in the server?
If I put ("hello", "hi") in the myRecord, I do find it on the server, but this sits
in between my record attributes and DataTools gives me a correct warning
Code:
setProperties: couldn't set: { hello:"No such property" }
I saw dsRequest has a call getAttribute(), but what does it do? Also inspecting the dsRequest "attributes" field in debug mode shows it's always empty. Can I use that to pass something?
So in a general note, should the Criteria functionality be possible here?
I saw this note though on dsRequest.getCriteria - not be used with a custom operation.
Code:
* Return the Criteria associated with a FETCH operation. * <p> * <b>Note</b> : This method should only be called during a FETCH operation
Comment