A clear workaround for JComboBox bug 4199622 please.

Hi,
I'm writing a project management software where you assign a project leader to a project via combo box and in the same step this user must be added to the team member list. Now look what happened! When I open the combo and navigate via arrow keys all project leaders are added just because they are highlighted. This is very funny but I need only 1 project leader, that which is finally selected by the user. So I've spent several hours looking for a solution and find this amazing bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4199622. So regarding JComboBox since 1998 you dont have a way to identify a final selection, is this true (I'm using java 1.6 already)? Anyway, I applied
projectLeadC.putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE);
and now finally I can make a difference by receiving a new action "comboBoxEdited"
if (event.getActionCommand().equals("comboBoxEdited") && !item.equals(oldItem)) {
pushMember(item);
So now keyboar navigation is ok. But now how can I identify a selection commited by mouse click????? All I get is "comboBoxChanged" but both keyboard and mouse based selections issue this command, so I never know if an item was selected by mouse. I'd need "comboBoxEdited" issued by click or even better something like "CommitedByMouseClick". So can someone help me find a solution, preferably by subclassing JComboBox and fixing the action commands (I dont want to use itemSelectionChange listeners or other listeners just because of this, I dont care which item is selected before commiting, I just care for the action)? Note also, that if my combo is in a table this issue is not that severe, because I can call stopCellEditing on the table which issues a "comboBoxEdited" command.
Thanks for the help,
Marton Bokor

You could use a popup listener to identify the final selection. The popup listener will store the previous selection, and everytime the popup is made invisible you can check whether the new selection is different from the previous selection. If it is, then you notify whoever you need to notify. Example program,
import javax.swing.*;
import javax.swing.event.PopupMenuListener;
import javax.swing.event.PopupMenuEvent;
public class Tester {
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                new Tester();
    JComboBox theBox;
    public Tester() {
        JFrame frame = new JFrame();
        theBox = new JComboBox(new String[]{"One","Two","Three"});
        theBox.addPopupMenuListener(new FinalSelectionListener());
        frame.setContentPane(theBox);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    private class FinalSelectionListener implements PopupMenuListener {
        private Object oldSelectedItem;
        public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
            Object newSelectedItem = theBox.getSelectedItem();
            if(newSelectedItem != oldSelectedItem) {
                oldSelectedItem = newSelectedItem;
                selectionChanged(newSelectedItem);
        public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
        public void popupMenuCanceled(PopupMenuEvent e) {}
    private void selectionChanged(Object changedTo) {
        System.out.println("The selection was changed to: " + changedTo);
}This way new selections can be made only when the combo box popup is closed. Hence it will still work with the mouse, and it won't have the action event problem mentioned in the bug.

Similar Messages

  • Extensions like Ghostery, WOT or AdBlock stop working after two or three times. Restarting the webpage in a new tab the extensions will work again for several times and then stop again. Has anybody an explanation or a workaround for this bug in Safari 5?

    Extensions like Ghostery, WOT or AdBlock stop working after two or three times. Restarting the webpage in a new tab the extensions will work again for several times and then stop again. Has anybody an explanation or a workaround for this bug in Safari 5?

    Remove the extensions, redownload Safari, reload the extensions.
    http://www.apple.com/safari/download/
    And if you really want a better experience, use Firefox, tons more choices and possibilities there.
    Firefox's "NoScript" will block the Trojan going around on websites. Best web security you can get.
    https://addons.mozilla.org/en-US/firefox/addon/noscript/
    Ghostery, Ad Block Plus and thousands of add-ons more have originated on Firefox.

  • [svn:fx-trunk] 10526: Temporary workaround for A+ bug SDK-23387.

    Revision: 10526
    Author:   [email protected]
    Date:     2009-09-22 21:48:33 -0700 (Tue, 22 Sep 2009)
    Log Message:
    Temporary workaround for A+ bug SDK-23387.
    The LinkNormalFormat, LinkHoverFormat, and LinkActiveFormat classes have been removed from FXG, and the FXG compiler was autogenerating static vars of these types (for linkage reasons?) that no longer compiled. I've commented out the offending lines in FXGCompiler.java, but we need a correct fix to cope with the fact that the way hyperlinks are formatted in FXG has changed.
    Instead of formatting hyperlinks by writing
    tag) but at least it can once again compile FXG as long as it doesn't involve styled hyperlinks.
    QE notes: None
    Doc notes: None
    Bugs: SDK-23387
    Reviewer: Carol
    Tests run: ant checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23387
        http://bugs.adobe.com/jira/browse/SDK-23387
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FXGCompiler.java

    error dateField not selecion date 27/11/2002 ?
    This is bug flex 3 ?
    thanks

  • [CC] Search for Workaround for old Bug: XML Validation fails

    In Dreamweaver the validation of an XHTML document "as XML" fails.
    Result:
    An exception occurred! Type:NetAccessorException, Message:Could not open file: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd[xml]
    The bug seems to be very old:
    http://forums.adobe.com/thread/874435
    Do you know any workaround? Is there may be a plugin which can validate XML?
    Thanks.

    I appreciate your detailed answers, David. It's a pleasure to discuss with you
    My own criterium, if a non-fixing is shameful or not, does not depend on the frequency of the usage of a function (by me or any other user).
    It depends on the facts, that Adobe knows the bug since many years and that it is a bug in a very basic module - the search and replace module.
    I take it as a proof of my assumption, that Adobe behaves arrogantly in many ways.
    They just don't care about maintanance.
    Thanks for filing the bug about "validate as xml".
    I logged into my prerelease account (I took part some years ago). But it seems that I have no access to the bug database.
    In my prerelease account there's no link to the bug database.
    I agree with you, that concerns would have more chances to be read by developers when you talk about them in the pre release forums.
    But my experiences with filing bugs are so disappointing, that I do not like to spend my time anymore for that.
    While betatesting we had a "personal usability engineer" to talk to him. I talked a lot to him, constructively and polite. But in fact, he has no influence to the decisions which bugs will fixed and which not.
    We can talk about the search and replace module in 10 years.
    I'm sure it will look the same as today. It will have the same bugs as today. It will have the same functionality as today.
    No improvement at all in such an important module.
    That's my assumption based on the experience of the last 8 years.

  • WRT55AGv2 -- Workaround for firmware bug

    In the latest firmware version of the WRT55AGv2 (v1.79), sometimes we are unable to connect or have other problems, requiring a reboot of the router (unplugging the power cable).
    One workaround I've found that seems to calm some of the troubles is setting the "Setup>Basic Setup>Client Lease Time" less than the default of one day (I use 720 minutes).  Before this, leased IPs listed in "Status>Local Network>DCHP Client Table" would often give negative experation times, in the tens of thousands of (negative) hours.
    I just thought I'd pass this along and perhaps save a few people some headaches.  If anyone has any other ideas, I'm listening.
    I wish Linksys would give this product some attention, like the new daylight savings times in the USA.
    --W5WMW

    Even in libraries, macros are a bad idea.
    Why don't you just turn off Xcodes autoindentation? Personally, I can't stand it anyway.

  • Workaround for H264 playback bug on Android?

    We have been doing extensive testing on H264 playback in both FLV and MP4 containers on Android AIR 3.2 / 3.3 (beta 3) for ICS. The process is documented here:
    https://bugbase.adobe.com/index.cfm?event=bug&id=3164920
    Summarized:
    ==========
    Android AIR 3.2 / 3.3 (beta 3) H264 playback (both in FLV and MP4 container) on Android 4 is severely broken.
    Video object (not StageVideo) with H264 content is:
    1) not playing videos consistently ("NetStream.Play.Stop" is triggered to early) so the movie stops before the end is reached. This also happens on Android 3. Note! The bug is not in AIR 3.1.
    2) not supporting filters (video frame is being scaled). Only Android 4 (ICS).
    3) not supporting seeking when video is paused (video frame is not being updated). Only Android 4 (ICS).
    Is there any known workarounds for these bugs?
    Best,
    Bjørn Rustberggard
    Co-founder
    WeVideo

    Hi,
    I just wanted to follow up.  It looks from your bug comments like the issues you experienced in AIR 3.2 have been resolved AIR 3.3.
    Are there any outstanding problems that you're seeing with regard to the issues you've described that we need to look into further for AIR 3.3? 
    Thanks!

  • How to find description for the bugs fixed in a CPU ( Critical patch alert)

    Hi
    I am having a hell of a time trying to figure out WHICH BUGS are fixed in the recent Critical patch alert
    I looked into the README file of the patch ( in my case its 8534387 for Solaris SPARC ) - but even in the README file there is only the list of the bugs fixed:
    +2.1 Bugs Fixed by This Patch+
    This patch includes the following molecules:
    +7155248 - DB-10.2.0.4-MOLECULE-001-CPUJUL2008+
    +7155249 - DB-10.2.0.4-MOLECULE-002-CPUJUL2008+
    +7155250 - DB-10.2.0.4-MOLECULE-003-CPUJUL2008+
    +7155251 - DB-10.2.0.4-MOLECULE-004-CPUJUL2008+
    +.....+
    +.....+
    But its impossible to even find them in metallink by the bug ID !
    I tried the first one and you get multiple document where this patch is mentioned , but no clear place for the bug description .
    Is there a convenient way to know exactly the DESCRIPTION of each bug that was fixed in a CPU ?
    thanks in advance
    Orna

    >
    But its impossible to even find them in metallink by the bug ID !
    I tried the first one and you get multiple document where this patch is mentioned , but no clear place for the bug description .
    Is there a convenient way to know exactly the DESCRIPTION of each bug that was fixed in a CPU ?
    thanks in advance
    OrnaDo a BUG search using the BUG ID rather than a Knowledge Base search. After that if you look closely at those multiple documents you mentioned that was returned, there should be only one for your Platform and for your product. Ignore the rest and click on only the one relevant to your Platform and Product.

  • Workaround for safari extension that are subjected to CSP?

    I tried injecting an iframe to webpages with the help of a safari extension but this introduced me to an error. On reading about it, looks like the sites have to specifically allow 'safari-extension:' under their CSP response header. The sites which do not include that, will not let the safari extension work. I was wondering whether there is any workaround for the same. Please let me know. Thanks

    Try going to the View menu and choosing "Customize Address Bar." From there you should be able to drag the back/forward buttons back onto the Safari toolbar.

  • Ios7 bookamrking web application to home screen via Safari crashes after login and when we try to open any link inside. Can anyone please tell me if there is any scheduled fix for this bug in safari?

    ios7 bookmarking web application to home screen via Safari, crashes after login and when we try to open any link inside from the icon that gets created on the home screen. Can anyone please tell me if there is any scheduled fix for this bug in safari?
    From what i understand i see that - Cookies are not transferred between your website and your webapp when installing the icon on the home screen (for authentication purposes for example). It was working until 6.1 and now it’s not working anymore.
    Can someone please tell me if this bug will be fixed in any future release, if so the ticket number of some kind that i can track, or if there is a workaround for this issue?

    ios7 bookmarking web application to home screen via Safari, crashes after login and when we try to open any link inside from the icon that gets created on the home screen. Can anyone please tell me if there is any scheduled fix for this bug in safari?
    From what i understand i see that - Cookies are not transferred between your website and your webapp when installing the icon on the home screen (for authentication purposes for example). It was working until 6.1 and now it’s not working anymore.
    Can someone please tell me if this bug will be fixed in any future release, if so the ticket number of some kind that i can track, or if there is a workaround for this issue?

  • Workaround for JSFL shape selection bug?

    There seems to be a bug in the document selection reporting in JSFL in  CS4 (haven't tested earlier versions).  I submitted it as a bug to Adobe  but I'd really like to find a workaround for it.  I've included my bug  report below.  Has anyone else encountered this?  If so, have you  figured out a workaround?  It's pretty annoying, making the tool I'm  working on really difficult to manage.
    ******BUG******
    After performing a publish preview, fl.getDocumentDOM().selection  reports an incorrect selection of raw shapes.
    Steps to reproduce bug:
    1. Create a JSFL command with the following contents:
    doc = fl.getDocumentDOM();
    fl.trace("there are " + doc.selection.length + " items selected");
    2. Start the authoring environment fresh, with a new document.
    3. Draw several shapes on the stage, not touching each other, all in  the same frame and layer.
    4. Select one of those shapes but leave the others unselected.
    5. Run the previously created JSFL command.  It will send the following  text to the output panel, as one would expect:
    "there are 1 items selected"
    6. Do a publish preview (either Flash or HTML).
    7. When it comes up, close the preview window.
    8. Deselect all and then select one of the shapes (again, keeping the  others unselected).
    9. Run the JSFL command again.  This time, it will say that there are n  items selected (where n is the number of shapes you drew in step 3).   So if you drew three shapes, it will print out the following:
    there are 3 items selected
    Note that this result will be the same even if you go to a different  document, do a publish preview on that document, then return to the  original.  It seems that simply doing a publish preview alters Flash's  state to report the selection incorrectly.
    Results: The JSFL command reports that all the shapes are selected,  despite the fact that only one of them is.  The only way I've found to  get Flash back to its normal behavior is to restart the authoring  environment.
    Expected results: In the steps above, the JSFL command should always  print out that there is one element selected.  There's no reason that  doing a publish preview should change that.

    When selected all shapes in selection are treated as one. You can see it if you run this script with selected multiple shapes:
    fl.trace( fl.getDocumentDOM().selection[0].contours.length );
    It will output you twise bigger number then selected shapes (because each Shape has two contours - one clockwise, other counterclockwise).
    Of course this. implementation is strange for me too. Thats how i found your post

  • I am using Adobe Pro 11 and on opening a pdf I am getting error 'Insufficient Data for an Image'. Please help and provide a workaround if the solution not there.

    Hi all,
    I am using Adobe Pro 11 and on opening a pdf I am getting error 'Insufficient Data for an Image'. Please help and provide a workaround if the solution not there.
    I have already set the preferences to for page view to low zoom settings, and page fit view settings, but it never opens the pdf. Please check and provide a solution asap.
    Thanks in advance!

    Most of the documents have sensitive info on them.  I will have to do some looking for some that i can share, but will get something to upload (dropbox) as soon as I can.
    Thanks for you help.

  • Is there a workaround for the Safari "clickable hidden content" bug?

    Hi,
    I'm encountering a bug in Safari where hidden content (non-visible content hidden with the CSS attribute overflow:hidden) to be clickable. I did some googling and found other people who are having this same problem:
    http://www.dmxzone.com/forum/go/?35908
    http://archivist.incutio.com/viewlist/css-discuss/76660
    http://lists.macosforge.org/pipermail/webkit-dev/2005-November/000496.html
    But no one seems to have a workaround for this. The last post contains a reply by an Apple developer saying he checked in a bug fix for this, but his reply was posted two years ago and I'm still seeing the problem.
    Does anyone know of a workaround for this? Hacks or kludges welcome.
    Cheers,
    -bri
    Message was edited by: omega-

    Hi
    As Safari uses the WebKit structure, you may find an answer to your question at the FreeNode Network. You may also find help at the WebKit Open Source Project.

  • Suggested workaround for list itemrenderer bug?

    Can someone point me in the right direction for a workaround for the problem described as Flex bug 28191:
    https://bugs.adobe.com/jira/browse/SDK-28191
    Steps to reproduce:
    1. Populate a Tree/List with data and provide a custom itemRenderer class factory.
    2. Change the class factory and dataProvider at the same time.
    3. List.createItemRenderer() will crash during since Factory is the key and it has been changed.
                    delete freeItemRenderersByFactory[factory][renderer];
    Actual Results:
    Crash because the renderer can not be found since it does not exist on that factory dictionary since the class factory was changed and the lookup is using the new factory.
    Expected Results:
    Not crash.
    Seems like a race condition, as sometimes during this process it skips that block of code but in other cases it falls into this block and fails.
    I need to change the data provider and item renderer of a tree control at runtime. Is there one or more methods I should run to prevent this? As the bug notes state, this is an intermittent problem. The error occurs here:
    if (factory == itemRenderer)
                if (freeItemRenderers && freeItemRenderers.length)
                    renderer = freeItemRenderers.pop();
                    delete freeItemRenderersByFactory[factory][renderer];

    Thanks. Actually, I have been updating (not setting or changing) the tree's dataprovider, and then changing the classFactory like this:
    processesXML = event.result as XML;
    nodeTreeData.source = processesXML.children();
    if (treeMultiSelect)
    nodeTree.itemRenderer=new ClassFactory(renderers.TreeItemRendererV1);
    nodeTree.allowMultipleSelection = true;
    nodeTree.setStyle("selectionColor", "0xFFFFFF");
    nodeTree.setStyle("disclosureOpenIcon", MinusIcon);
    nodeTree.setStyle("disclosureClosedIcon", PlusIcon);
    else
    nodeTree.itemRenderer=new ClassFactory(mx.controls.treeClasses.TreeItemRenderer);
    nodeTree.allowMultipleSelection = false;
    nodeTree.setStyle("selectionColor", "0x7FCEFF");
    nodeTree.setStyle("disclosureOpenIcon", OpenArrowIcon);
    nodeTree.setStyle("disclosureClosedIcon", ClosedArrowIcon);
    I had tried using validateNow after changing the ClassFactory before but did get the error again. I will try it again but update the data provider after. Since it's an intermittent error I'm finding it hard to know if a fix is really working.

  • Windows 8.1 do not show DISCONNECT option for VPN, why? bug? Please fix!!!

    I created a VPN connection. Once I connected to the VPN in Windows 8.1, it does not show DISCONNECT option when I click on the VPN again. It just keep showing CONNECT option only. Why? This has to be a bug! Please fix!

    Hi Dan5678,
    Is the connection an incoming VPN connection?
    If yes, then you may take a look at the KB article below:
    How to disconnect an incoming VPN connection in Windows 8 and in Windows Server  2012
    To disconnect an incoming VPN connection, follow these steps:
    Open Network Connections. To do this, use either of the following methods:
    Swipe in from the right edge of the screen, or point to the lower-right corner of the screen, and then click Search. Then, type ncpa.cpl, and then click the Ncpa.cpl icon.      
    Press Win+R to open the Run window, type ncpa.cpl,  and then  click
    OK.
    Right-click the incoming VPN connection that you want to disconnect,  and then  click
    Status.
    On the General tab,  click Disconnect. 
    Close Network Connections.
    Hope this may be helpful.
    Regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • WARNING: workaround for critical clustering bug in OC4J

    I found a workaround for the HTTP clustering bug described in my previous posting of August 16, 2001 "Urgent: serious HTTP clustering bug in OC4J?" (http://technet.oracle.com:89/ubb/Forum99/HTML/000261.html)
    The workaround:
    When adding the <cluster config/> tag in orion-web.xml specify and ID (numeric) with no more than 9 figures. The autogenerated ID is longer (14 figures on my test system)
    and will cause the error.
    Luciano
    null

    burricall wrote:
    ..Did you find a solution?See [this post|http://forums.sun.com/thread.jspa?threadID=5426321&messageID=11001580#11001580].

Maybe you are looking for

  • On Account Clearing Vendor/Customer

    Dear fellows We are to be implementing SAP ERP ECC 6 by u201CABACUS Consulting (Implementer)u201D here we enable the new GL functionality for segment reporting.  We have a hot issue with on account clearing in both customer and vendor. The scenario i

  • Difference between Business area and profit center accounting

    Hi Frnds, Can any body explain about difference between business area and profit center accounting .

  • Error when restarting admin server

    I'm testing clustering with WL 6.1.           I have one machine acting as the admin server and the EJB server and a           second machine clustered with it as another EJB server. When I restart           the non-admin machine everything works fla

  • Video camera wont connect

    i have just got a power mac g4 and installed ilife on it but i cant get my camera to connect to imovie. the camera is a canon mv901 and i am trying to connect it through a fire wire connection. every time i try to connect it imovie just tells me ther

  • Can't set document ownercode

    I'm trying to set de ownercode of a Delivery Note, this is my code:     DNote.CardCode = MyCardCode     DNote.DocDate = Today     DNote.DocDueDate = Today     DNote.DocumentsOwner = MyId     .....more code I add correctly the SBO object(result=0): Re