I have now checked in the following enhancement:
It is now possible to use class mapping without the generated JavaScript classes. When a generated class is not included in the current page, the class-mapping system will use the "light" mapping mode for this class.
This means that mapped objects sent from server to client will be created as ordinary JavaScript Objects annotated with a $dwrClassName property to identify the object's class.
When sending objects from client to server the same property is used to attach type information on objects.
This property on instances takes precedence over class information from the JavaScript class, so the instance property may be used to override class identity for objects even when they belong to a loaded JavaScript class.
Naturally, this lighter class-mapping scheme does not support the use of instanceof to determine object/class relationships.
I have now checked in the following enhancement:
It is now possible to use class mapping without the generated JavaScript classes. When a generated class is not included in the current page, the class-mapping system will use the "light" mapping mode for this class.
This means that mapped objects sent from server to client will be created as ordinary JavaScript Objects annotated with a $dwrClassName property to identify the object's class.
When sending objects from client to server the same property is used to attach type information on objects.
This property on instances takes precedence over class information from the JavaScript class, so the instance property may be used to override class identity for objects even when they belong to a loaded JavaScript class.
Naturally, this lighter class-mapping scheme does not support the use of instanceof to determine object/class relationships.