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 5976265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:12:12+00:00 2026-05-22T21:12:12+00:00

I have a dynamically constructed editable XUL tree. The problem is – how is

  • 0

I have a dynamically constructed editable XUL tree.
The problem is – how is one supposed to listen and capture the changed cells?

I detect the submitting of the edited value by capturing blur event of the tree.inputField, any other events are not working.
At least it works, but is there an easy way to retrieve new value?

Should it really be as hackish as getting the Tree element, calculating the current cell, and querying its new value?

  • 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-22T21:12:13+00:00Added an answer on May 22, 2026 at 9:12 pm

    I guess that “dynamically constructed” means that you dynamically generate DOM elements for the tree items. Then you should be able to register a DOMAttrModified event handler on the <treechildren> tag and listen to changes of the label attribute of the tree cells.

    However, the usual approach is to have the tree entirely dynamic. You need an object implementing nsITreeView (see https://developer.mozilla.org/En/NsITreeView). You assign that object to the tree.view property. And that object defines how many rows your tree has, what to display in which cell, what properties a row/column/cell should have, all without having any DOM nodes inside <treechildren>. Unfortunately, it is a complicated interface to implement, especially because of the hierarchical nature of the trees. If you have a plain list many methods become trivial however.

    Two methods are particularly interesting. isEditable() allows you to determine whether a particular tree cell should be editable. And setCellText() is called whenever a cell has been edited.

    If you don’t want to reimplement nsITreeView, wrapping the default view should also be possible. Something like this:

    var oldView = tree.view;
    var newView = {
        __proto__: oldView,
        setCellText(row, col, value)
        {
            oldView.setCellText(row, col, value);
            alert("Text changed for a tree cell!");
        }
    };
    tree.view = newView;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with dynamically created image (JavaScript). I want to change the innerHTML
I have a .NET 2.0 app (using C#) that shows some dynamically constructed HTML
in my jsp i have a table constructed dynamically like the following: ' retour.append();
I have this code $(.delete2).click(function() { $('#load2').fadeIn(); } I have dynamically added item via
I have some dynamically created inputs which are not server-side controls. I want to
I have a dynamically created image that I am saving to a stream so
I have a dynamically created table which in the last <td> there is a
I have a dynamically generated rss feed that is about 150M in size (don't
I am looking for a way to edit data and have values dynamically calculated
So, I have JQuery dynamically generating controls. The input controls are called EnterLink +

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.