I'm using SmartGWT EE for a type of order entry application. I need a method to calculate order totals based on the order details as they are changed by the user. The server needs the same routine to recalculate order totals based on changes that may occur server side after the order is submitted. Of course I'd like to use the same code in both instances.
This is probably more of a GWT questions that specifically SmartGWT, but how can I define the Order object and write the method so it is usable on both client and server? The client already has all of the data available in the cache so I don't need to call the server to perform the calc. The changes the user makes are "what if" until they submit the Order and for the best response time I'd rather not make a server call if I don't need to.
This is probably more of a GWT questions that specifically SmartGWT, but how can I define the Order object and write the method so it is usable on both client and server? The client already has all of the data available in the cache so I don't need to call the server to perform the calc. The changes the user makes are "what if" until they submit the Order and for the best response time I'd rather not make a server call if I don't need to.
Comment