Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4593192
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:38:54+00:00 2026-05-21T22:38:54+00:00

I have an mx:tree with with TreeItemRenderer as below. Parent1 (Delete | Rename) Child1

  • 0

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:)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:38:55+00:00Added an answer on May 21, 2026 at 10:38 pm

    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:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application layout="absolute" xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Script>
        <![CDATA[
            [Bindable]
            private var rawData:XML = <tree><parent label="Parent1"><child label="Child1"/><child label="Child2"/></parent>
                    <parent label="Parent2"><child label="Child3"/><child label="Child4"/></parent></tree>;
    
            private function displayLabel(node:XML):String
            {
                return node.@label;
            }
        ]]>
        </mx:Script>
        <mx:VBox horizontalCenter="0" verticalCenter="0">
            <mx:Tree dataProvider="{rawData}" height="300" id="tree" labelFunction="displayLabel" showRoot="false"
                width="300" />
            <mx:HBox enabled="{tree.selectedItem}">
                <mx:TextInput id="labelEdit" text="{tree.selectedItem ? tree.selectedItem.@label : ''}" />
                <mx:Button click="tree.selectedItem.@label = labelEdit.text" label="Apply" />
            </mx:HBox>
        </mx:VBox>
    </mx:Application>
    

    2) Create custom event class with label field 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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have tree structure like this: <Tree> <child1> <child2> <child2> </child1> </Tree> Here the
I have a tree structure like below. when i travese through parent to child
i have Tree<std:string> tree; now new Tree<std:string>; leads to a pointer, how can i
I have a tree of divs: <div id=a onclick=func> <div id=b onclick=func> <div id=c
I have an own Tree object implemented in PHP. Say we have a tree
I have a tree control and I want to give the user the ability
I have a tree structure where each Node has a parent and a Set<Node>
I have a tree structure that can be n-levels deep, without restriction. That means
I have a tree view <asp:TreeView ID=TreeView1 runat=server DataSourceID=SiteMapDataSource1 ShowExpandCollapse=False> </asp:TreeView> As you can
I have Constructor Tree(int a, int b, int c) and second Constructor Tree(int a,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.