I have a custom CanvasItem which has a FormItemInitHandler. The item works great when it is in a regular dynamic form, but I’m trying to use it as an editor type in a ListGrid. The ListGrid is using a ListGridEditorCustomizer to determine when to use this item for editing a cell. My problem is appearing when I begin editing a ListGrid cell and this editor needs to appear.
The FormItemInitHandler method onInit() gives me access to the FormItem being initialized. Since my item is CanvasItem, I need to be able to cast the FormItem to a CanvasItem in order to call storeValue() in a couple places inside onInit(). This is no problem when using the item in a regular DynamicForm, but when the item is created inside the grid from the ListGridEditorCustomizer, the item I get in onInit() is a TextItem, which I cannot cast to a CanvasItem.
Is there a way to make onInit() give me a FormItem or CanvasItem here instead?
I’m using a SmartGWT nightly 2.5 from 11/25 in Chrome and Firefox.