Hi Isomorphic,
thanks for the pointer. It works exactly as expected.
Best regards,
Blama
Announcement
Collapse
No announcement yet.
X
-
Take a look at the ability to create a Custom DataSource via the serverConstructor attribute (see QuickStart Guide, search for "Custom DataSource").
Your custom DataSource can be a subclass of SQLDataSource that you use in every .ds.xml file - this gives you the ability to add special behaviors to any operation on all of your DataSources, without needing the entire <operationBinding><serverObject> structure on each one.
Leave a comment:
-
Enhancement(?): Subclassed "IDACall"-equivalent for serverside requests
Hello Isomorphic,
is it possible to do something similar like subclassing IDACall on the server side?
I managed to add criteria to all my client side requests using the code shown in http://forums.smartclient.com/showpo...96&postcount=4.
Now all the requests coming from the browser have the criteria I want. Is there something similar possible for the serverside, e.g. overwrite the default implementations for fetch, update, remove and add, when there is no ServerObject given?
Right now I found out that it is better to move the code I have in my IDACall in a separate static method class and use that from all my ds.xml with a ServerObject like:
ds.xml:
Code:..... <serverObject lookupStyle="new" className="com.lmscompany.lms.server.worker.T_LEADTEMPERATURE" /> <operationBindings> </operationBindings> </DataSource>
Code:public class T_LEADTEMPERATURE { public DSResponse fetch(DSRequest dsRequest, HttpServletRequest servletRequest) throws Exception { RequestModifier.modifyCriteria(dsRequest, servletRequest); return dsRequest.execute(); } };
Is it already possible to pre-process all requests by one "per application"-ServerObject, before the ds.xml-processing starts or might this be a good enhancement idea?
Best regards,
Blama
PS: Even if it's not possible, I still can solve my use-cases with so little code - perfect! Thank you, once again.Tags: None
Leave a comment: