When a user clicks a ‘Add Node’ button above a tree and the program adds a tree item below the selected node, I would like to insert the new tree item with the text highlight and ready for editing by the user… like labels in GMail. Any ideas?
–Kirt
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Are you using the GWT default TreeItem? If so, when you add the node, you could add the
TreeItemwith aWidgetwhich you write which contains aTextBoxand aButtonto save.When the save button is clicked, it calls
setText()on the tree item with the text box’s text, thus removing the widgets from the tree item.It may be an even better idea to subclass
TreeItemto encapsulate this logic and provide more functionality.edit: Here, just because I’m feeling generous…