Hello,
I have this architecture :
MyComponent extends Canvas
He set an ID on MyComponent : myComponent.setID("myID")
This component has a datasource, and I would like to retrieve MyComponent from it's datasource.
So I've done that :
MyComponent myComponent = (MyComponent)Canvas.getById("myID");
The problem is a ClassCastException. The error message is "cannot cast MyComponent$1 to MyComponent"
How can I get a component from it's datasource ?
Does MyComponent has to extend one of the subclasses of Canvas (ListGrid for example) ?
Thanks
I have this architecture :
MyComponent extends Canvas
He set an ID on MyComponent : myComponent.setID("myID")
This component has a datasource, and I would like to retrieve MyComponent from it's datasource.
So I've done that :
MyComponent myComponent = (MyComponent)Canvas.getById("myID");
The problem is a ClassCastException. The error message is "cannot cast MyComponent$1 to MyComponent"
How can I get a component from it's datasource ?
Does MyComponent has to extend one of the subclasses of Canvas (ListGrid for example) ?
Thanks