Announcement
Collapse
No announcement yet.
X
-
For a "custom" operation, it's not clear that the framework should be auto-populating beans; we don't even make an assumption that the data for a "custom" operation consists of DataSource records.
Further, as we already covered, it's just a single call to DataTools.setProperties() to populate a bean given a Map, if indeed your "custom" operation happens to do things with beans.
Leave a comment:
-
I noticed that i kind of asked this in a related thread. This is however a more detailed explanation, so perhaps good for others that wonder the same thing. Would be great to hear if there's any way to accomplish this without doing stuff "manually" in my code.
Leave a comment:
-
Population of TO bean for a custom DS operation
Hello,
we extensively use Spring services for our DataSources. One neat thing is the ability for smartgwt to match the data values to a TO in the method call, like this:
[code]
public DSResponse add(UserReporterTO to, DSRequest request)
[code]
However, i just tried to do the same for a custom operation, and it seems that the data fields are not matched.
datasource (sorry for bad formatting, couldn't make it work):
Code:<operationBinding operationType="custom" operationId="send"> <serverMethod>send</serverMethod> </operationBinding> <serverObject lookupStyle="spring" bean="messageWebService"></serverObject>
Code:Map dataMap = form.getValues(); messageDS.performCustomOperation("send", new Record(dataMap), new NubaOKDSCallback() { @Override public void doExecute(ResponseData rData, DSResponse response, Object o, DSRequest dsRequest) {
Code:public NubaDSResponse send(Map values, UserMessageTO to)
Is there any way to do what i want, so that i don't have to manually drag out the parameters from the map?
Cheers
Last edited by mathias; 9 Apr 2018, 00:05.Tags: None
Leave a comment: