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:
LEADTEMPERATURE.java:
RequestModifier.modifyCriteria() adds the criteria needed. I'd now add a ds-specific <serverObject> to every DS and overwrite fetch() there every time with boilerplate code. Even if I called a generic ServerObject-class from every DS, I'd still need the <serverObject>-tag in every .ds.xml.
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.
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.
Comment