All Component
s must have a suitable static factory method registered along
with the name of the root XML node that represents the component with the
caplin.component.ComponentFactory#registerComponent method. Whenever an application needs to
construct a component with a specified root XML node, the registered static factory method
will be invoked. An example of this is included below:
xyztrader.MyComponent = function() { // construct the component here - including storing any arguments that were passed in }; caplin.implement(xyztrader.MyComponent, caplin.component.Component); // ... // implementation of the caplin.component.Component methods // ... // static factory method for creating xyztrader.MyComponents from the specified XML string xyztrader.MyComponent.createFromSerializedState = function(sXml) { // process the XML to extract any relevent state information return new xyztrader.MyComponent(); }; // register createFromSerializedState static factory method with the ComponentFactory for XML node myComponent caplin.component.ComponentFactory.registerComponent("myComponent", xyztrader.MyComponent.createFromSerializedState);
Attributes | Name and Description |
---|---|
|
caplin.component()
|
Attributes | Name and Description |
---|---|
<static>
|
void
DragData()
This class is used to extend the ExtJs |
►
caplin.component()
►
<static>
void
DragData()
This class is used to extend the ExtJs dragData
, primarily to allow the
updateHeader
method to be attached.