I have an mx:tree with with TreeItemRenderer as below.
Parent1 (Delete | Rename)
Child1
Child2
Parent2 (Delete | Rename)
Child3
Child4
Delete and Rename are link buttons
Now when i click Rename a popUp should be shown like
OldName : Parent1(Text Input showning present Name)
Enter New Name: Parent1NewName(Text Input for entering New name)
OK | CANCEL Buttons
Afetr Entering the new name,click OK,popup should be closed and need to get the value in the treeItemRenderer.
I have the logic to rename the Parent1 in TreeItemRenderer and also I m able to get the Parent1 in the popup OldName TextInput.But after entering the new name i m not able to get that new name in the TreeItemRenderer.Please help me out
Thanks in advance:)
You have two ways to reach your goal:
1) Pass current XML node to your dialog instead of pure label (as in your current implementation). When user press Ok just replace old label in XML with new one as in the following sample code:
2) Create custom event class with
labelfield and"labelSubmit"and"labelCancel"events and fire it from your dialog passing new label value with"labelSubmit"event. And set new label to XML node (as described above) in dialog’s event handler.