gwtgwt-editors

How a custom GWT Editor can know that a new edit begin (before the setValue)


If we have an Editor with LeafValue subeditor. We can implement the interface ValueAwareEditor. with this interface with can implement a flush and a setValue. But the setValue is called after the driver has set all values in sub editor. How can we execute code before the driver set values in sub editor. (This may allow to clear the state of the editor).

Is-there an equivalent of the flush method for an edit (or display) cycle in editor ?

Thanks.


Solution

  • So you are re-using Editors trees to edit different objects? Assuming that is the case I don't think there is an event just before setValue. You can always use the EditorVisitor to visit your Editors before you bind a new object?

    We throw away the Editor tree each time to try and keep it simpler.