Hi all, My use-case is as follows:
When I am finished inline editing of item labels in List based component in Flex SDK I do not want to immediately destroy TextInput field with new value, because I am doing server side validation for the validity of the newly entered List item label value and I'd like to wait for the asynchronous result from the server side function before destroying TextInput field AKA default control for 'itemEditorInstance'. When I study the source code of List component from Flex 3 SDK (can be viewed online from Adobe Opensouce site here: http://snipurl.com/flexlist), I've learned the following: Step 1) There is a private boolean variable 'dontEdit' that is set inside function "endEdit" to the following expression: dontEdit = itemEditorInstance != null; just after List dispatches ListEvent.ITEM_EDIT_END event. this expression returns TRUE, if 'itemEditorInstance' is not deleted in any of the event handlers for ListEvent.ITEM_EDIT_END event Step 2) The List component is internally subscribed to this ListEvent.ITEM_EDIT_END event by protected event handler 'itemEditorItemEditEndHandler'. Step 3) Inside this event handler List component has a call to 'destroyItemEditor' function that destroys 'itemEditorInstance' itemEditor that is used to enter a new value for List item label. What I want is to let this 'itemEditorInstance' itemEditor control to stay open for a little bit more time to wait for a server-side response. Thus I override protected event handler 'itemEditorItemEditEndHandler' and I am calling 'event.preventDefault()' inside my overrided method to to prevent the execution of step #2 . Here is my problem: I am not be able to enter editing mode of my List base component again when I want to edit another List item value, because dontEdit property value is stuck to TRUE value as set in step #1, and there is no way to change it and this property prevent from creation of new instances for 'itemEditorInstance' itemEditor . Known workaround: Let delete operation for 'itemEditorInstance' to happen as usually and recreate 'itemEditorInstance' again when server-side will return an response. -- Med venlig hilsen / Best regards Andriy Panas [EMAIL PROTECTED]
