Tree nodes not updating when stopEditing called

I am getting some unusual issues with trees and inline editing. I have added my own component, a JPanel with a text field, check box and combo box. When the user edits or adds a new item to the tree, the editor shows up fine. When they click off of the node, I have it set to ACCEPT the edit (not cancel it). When ESC is pressed, everything is fine. When they click off of a node while adding/editing, the item is saved properly to the node, but it's not until I click on another node that the node just edited gets redrawn. Also, I added my won keyPressed handler so that if they hit ENTER or any of the components for my custom editor, it calls tree.stopEditing() as if they clicked off of it, to accept it. Both cases, the node doesn't get redrawn.
When I put a tree.updateUI() at the end of the stopEditing() or cancelEditing() method, I get a nice fast stack trace from the BasicUI@MouseListner:handleListSelection. So it appears calling tree.updateUI() while inside of a method being handled due to an evetn, causes problems. My guess is that firing off another event while inside of an event handler may not be allowed?
When I try tree.repaint() and tree.invalidate(), it seems to work when I click off of the node, but when I press ENTER on my custom editor, which calls the same stopEditing() method as clicking off of a node does, it doesn't repaint.
Any help would be appreciated? I update the panel the tree is in as well, so I am lost as to why it wont update properly.

here is the stack trace I get. Man this bugs me, it doesn't seem to break anything, yet it keeps showing up:
java.lang.NullPointerException
     at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(BasicTreeUI.java:2815)
     at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTreeUI.java:2801)
     at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:218)
     at java.awt.Component.processMouseEvent(Component.java:5131)
     at java.awt.Component.processEvent(Component.java:4931)
     at java.awt.Container.processEvent(Container.java:1566)
     at java.awt.Component.dispatchEventImpl(Component.java:3639)
     at java.awt.Container.dispatchEventImpl(Container.java:1623)
     at java.awt.Component.dispatchEvent(Component.java:3480)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3162)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
     at java.awt.Container.dispatchEventImpl(Container.java:1609)
     at java.awt.Window.dispatchEventImpl(Window.java:1590)
     at java.awt.Component.dispatchEvent(Component.java:3480)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

Similar Messages

  • Tree display not updating when adding first node to expanded node

    Hi
    Please have a look at the following code. To reproduce the faulty behaviour you have to expand the item, then click "add" button and observe, that nothing happens. Collapsing, then expanding the node shows the added children. I use Flex 3.5.0
    Is this a bug in the SDK or am I missing some auto update switch?
    Thanks!!
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal"
         minWidth="955" minHeight="600"
         creationComplete="run()">
         <mx:Tree id="tree" width="300" height="500" labelField="name" />
         <mx:Button label="add" click="onClickAdd()" />
         <mx:Script>
              <![CDATA[
                   import mx.collections.ArrayCollection;
                   import mx.utils.ObjectProxy;
                   protected var itm1:Object;
                   protected function run() : void
                        var ac:ArrayCollection = new ArrayCollection();
                        this.itm1 = new ObjectProxy({name:"1", children:new ArrayCollection()});
                        ac.addItem(this.itm1);
                        this.tree.dataProvider = ac;
                   protected function onClickAdd() : void
                        this.itm1.children.addItem({name:"child"});
              ]]>
         </mx:Script>
    </mx:Application>

    Yep, that works! Thanks! Would have never thought of that...
    Here is my modified code:
              <mx:Tree id="tree" width="300" height="500" labelField="name"
              dataDescriptor="{new DefaultDataDescriptor2()}"
              />
    and new class
    package de.byteconsult.controls.tree
         import mx.collections.ICollectionView;
         import mx.controls.treeClasses.DefaultDataDescriptor;
         public class DefaultDataDescriptor2 extends DefaultDataDescriptor
              public function DefaultDataDescriptor2()
                   super();
              override public function hasChildren(node:Object, model:Object=null) : Boolean
                   var children:ICollectionView = this.getChildren(node, model);
                   return children != null;

  • IPod will not update when plugged into computer?

    Just recently my iPod with not update when I plug it into my computer. My iPod does not show up on my Mac or my iTunes. When I plug it in the screen shows the do not disconnect sign. I have tried to reset my iPod and checked for new updates, but they haven't worked. If anyone knows what to do that would be great.
    Thanks

    Yes. Since I installed the new system software (10.4.6) update Sunday night, I cannot update any of my iPods except the iPod video. The iPods also do not show up on my desktop. The battery charges but that's all that happens.

  • HT1277 Mail on my Mac computer does not update when I update my mail on my phone and iPad.  Can anyone help me with this?  Is there a setting I need to check?

    Mail on my Mac computer does not update when I update my mail on my iPhone and iPad. Can anyone help me with this?  Is there a setting that I need to check?

    All that you had to do was to sign into the old account in order to update those apps. What I mean is that you just needed to sign into that account in the store settings like I described and that should have worked. You didnt need to enter the credit card information again - you justed needed to use the old ID and password.
    Anyway, I think the good news is that if everything else is OK with the new account, just download iBooks with the new ID - it's a free app so its not like you have to pay for it again. I'm not sure what the other App is that you are talking about - but if it is the Apple Store App - that is free as well.
    Try this anyway, when you try to update iBooks, just use the old password if the old ID still pops up.
    Did you try signing into the store settings with your new ID and see what happens with the updates then?

  • Why the PO action history is not updating when i perform the vacation rules

    Hi,
    Can any one explain why the action history is not updating when performed the vacation rules using the below example
    Example: A >B>C>D are in the approval hierarchy here I have defined the vacation rules by login to the user C here I selected the item type as “All” and delegated to D.
    Now the buyer “A” has sent the document for approval. The user “B” can successfully reserve funds and approved the document. Now the document is automatically delegated to D. Here D can open the document from open notifications and approved the document. Now when I checked the Action history here I cannot find the performed name D who has actually approved the document.
    Note:we are using the 11.5.10.2 version.
    The Action History in the following manner
    Seq Action Performed By
    ================================
    4 Approve C
    3 Forward B
    2 Reserved B
    1 Forward A
    0 Submit A
    From the above action history why the user D name is not showing. Can any one let me know ASAP?
    Regards,
    Keivn.
    Edited by: user10960960 on May 5, 2009 3:36 AM

    When you set up the vacation rule, if you simply delegate the ownership to D, then C retains the ownership and the approval occurs with C's limits. And hence D is treated as the approver.
    If you transfer the ownership, then C is out of the picture. The notification goes to D and when he/she approves, D's limits kick in and he will be seen as approver.
    Hope this helps,
    Sandeep Gandhi

  • ITunes play count does not update when iPod is connected

    iTunes keeps track of how many times i play the song on my computer but does not update when I connect my iPod. Is there a way to fix this??
    thanks!!

    I just checked and it does update for me. I'm still waiting to see if it updates from the AppleTV though.

  • Content does not update when published

    My content is not updating when I publish updates to my app. Side loading shows the updates, but an updated published folio doesn't. On the third try, I got a blank light grey screen. I finally had to unpublish and republish the content, which is obviously not an ideal situation.
    Are there any known bugs or problems at the moment that could be causing this issue? The DPS Status page doesn't have any info.
    Thanks
    -Scott

    I'm not aware of a way to get out of this state cleanly. Uninstalling and reinstalling the app fixes the problem (unless your unpublish/republish again), but it's difficult to tell your customers to uninstall/reinstall. Another option is to unpublish and then publish the affected folios as different folios, but then some of your users will end up with two versions of a similar folio until they archive the older version.
    Let me ask around to make sure that I'm correct about the cause and to see if there's a cleaner workaround.

  • My phone will not ring when a call is coming in? Please help?

    My phone will not ring when a call is coming in.?

    Yeah, because if the switch isn't on, the phone is put on vibrate.

  • Microphone of my iphone is not working when i call anyone nobody can listen but me, its working with headphone but its also working with videocam recording, please help me to solve this probelm.

    microphone of my iphone is not working when i call anyone nobody can listen me its working with headphone. but it is working with videocam recording, please help me to solve this probelm.

    Try this:
    1. Reset the iPhone by pressing and holding the sleep/wake and home buttons and releasing them, when the Apple logo appears on the display. Now test again.
    2. If the issue persists: Restore the iPhone without any of your own content, using this description from Apple: http://support.apple.com/kb/HT4137
    3. If the issue persists, Your iPhone need repair.

  • My iPod touch 5th generation battery indicator does not update when being charged (Updated to iOS 8)

    Note that the iPod touch 5th generation was updated to iOS 8. When I connect my charger to my iPod touch, for the first time, the battery indicator does not update when connected to a power source. Instead of being charged, it says that the battery is being depleted. Please fix this issue. Thank you!

    Not Charge
    - See:    
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable. The cable for 5G iPod (lightning connector) seems to be more prone to failure than the older cable.
    - If a 5G iPod      
    Iphone 5 lightning port charging problem - SOLUTION!
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • My mail program does not update when I delete emails in my other email programs (i.e. it still shows messages in my mail inbox when I've deleted them).  I think this started with Maverick?  Any solutions?

    My mail program does not update when I delete emails in my other email programs (i.e. it still shows messages in my mail inbox when I've deleted them).  I think this started with Maverick?  Any solutions?

    one is gmail, one is a university email and they are both IMAP accounts (not that I know what that means)....

  • After the update when I call i call myself

    after the update when i call my iphone calls me at the same time.

    I found the value in about:config to fix this. Change browser.urlbar.trimURLs to false. Hope this helps.

  • I've just started using the App Tabs. I think this feature could be handy but why are the sites not updated when I start Firefox. Now I have to manually update the site which is somewhat of a downer. Does any of you know where I'm going wrong?

    I've just started using the App Tabs. I think this feature could be handy but why are the sites not updated when I start Firefox. Now I have to manually update the site which is somewhat of a downer. Does any of you know where I'm going wrong?

    To answer the post title FireFox save all downloads automatically in the download folder, which you can find in the Documents folder. If you want to choose where to save your downloads go to tools>options>check always ask me where to save files.
    Secondly, I am assuming you have IE 8 installed as this is the only version that supports this fix that is currently not in beta. Go to control panel>internet options>advanced tab and reset the settings at the bottom. This may or may not fix the problem but it is a good first step.

  • Will not ring when income calls

    I have tried with Verizon to get issue of phone will NOT ring when a call comes in.  Have checked settings and all seem correct.  Help

    Call *73 to insure your phone is not forwarded. Is it all calls or a specific number?

  • Text not updated when changing the ResourceBundle

    this is an abstraction of what i have on my code:
    controller
    public class controller extends VBox{
         @FXML protected Label ex2;
         public CtrlMainMenu() throws Exception{
              FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/view/View.fxml"));
              fxmlLoader.setController(this);
              fxmlLoader.setRoot(this);
              fxmlLoader.setResources(CtrlLanguage.resource);
              fxmlLoader.load();
         @Override public void initialize(URL arg0, ResourceBundle arg1) {
              ex2.setText(arg1.getString("ex2"));
    }View
    <fx:root type="VBox" xmlns:fx="http://javafx.com/fxml">
         <children>
              <Label text="%ex1"/>
              <Label fx:id="ex2"/>
         <children>
    </fx:root>Language controller
    public class CtrlLanguage{
         private static String PATH =
              new File(
                   CtrlImageLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath()
              ).getParentFile().getPath() + "/language/";
         public static ResourceBundle resource;
         public static void setLanguage(String file) throws Exception{
              try {
                   if(new File(PATH + file).exists())
                        resource = new PropertyResourceBundle(new FileInputStream(PATH + file));
                   else
                        resource = new PropertyResourceBundle(CtrlLanguage.class.getResourceAsStream("/language/"+file));
              } catch (Exception e) {
                   resource = new PropertyResourceBundle(CtrlLanguage.class.getResourceAsStream("/language/EN"));
         public static String get(String key){
              try {
                   return resource.getString(key);
              } catch (Exception e) {
                   return key;
    }problem comes when I try to change the language without changing the current root
    the elements of the view are not updated when the bundle is changed (CtrlLanguage.setLanguage("file");) until the root is changed/loaded again
    is there any way so i can make the content change without having to reload again the root?

    A method which returns an instance of the following class:
    * A localizable read only property for internationalization of string properties.
    * @author Christian Schudt
    public final class LocalizableStringProperty extends ReadOnlyStringProperty {
        private String resourceKey;
        private StringProperty text;
        private String baseName;
        private ClassLoader classLoader;
        // Keep the listener as hard reference in the class, so that it won't get GCed, until this class has no references any more.
        private ChangeListener<Locale> changeListener;
        public LocalizableStringProperty(LocaleManager localeManager, String baseName, String resourceKey) {
            this(localeManager, baseName, resourceKey, null);
        public LocalizableStringProperty(LocaleManager localeManager, String baseName, String resourceKey, ClassLoader classLoader) {
            changeListener = new ChangeListener<Locale>() {
                @Override
                public void changed(ObservableValue<? extends Locale> observableValue, Locale locale, Locale locale1) {
                    localeChanged(locale1);
            localeManager.localeProperty().addListener(new WeakChangeListener<Locale>(changeListener));
            this.baseName = baseName;
            this.classLoader = classLoader;
            this.resourceKey = resourceKey;
            text = new SimpleStringProperty();
            localeChanged(localeManager.getLocale());
        private void localeChanged(Locale locale) {
            ResourceBundle resourceBundle;
            Locale.setDefault(locale);
            if (classLoader == null) {
                resourceBundle = ResourceBundle.getBundle(baseName, locale);
            } else {
                resourceBundle = ResourceBundle.getBundle(baseName, locale, classLoader);
            text.set(resourceBundle.getString(resourceKey));
        @Override
        public String get() {
            return text.get();
        @Override
        public Object getBean() {
            return text.getBean();
        @Override
        public String getName() {
            return text.getName();
        @Override
        public void addListener(ChangeListener<? super String> changeListener) {
            text.addListener(changeListener);
        @Override
        public void removeListener(ChangeListener<? super String> changeListener) {
            text.removeListener(changeListener);
        @Override
        public void addListener(InvalidationListener invalidationListener) {
            text.addListener(invalidationListener);
        @Override
        public void removeListener(InvalidationListener invalidationListener) {
            text.removeListener(invalidationListener);
    }

Maybe you are looking for