How prevent simultaneous execution of multiple button threads?

My AS 3 program has multiple buttons. Users can select one and then immediately select another and this causes 2 threads that collide.  Once one button is executing, I want the other buttons to ignore clicks.
I've tried using a lock:Boolean to indicate a button is being processed.  Each button checks lock.  My logic is such that when the AS 3 processor detects a locked condition, it abandons execution of that button.  However, surprisingly, it abandons execution only termporarily ... once the the boolean is unlocked, AS 3 comes back and executes the button.
The problems are twofold:  1)  the first time the 2nd button attempts to execute (by checking lock), when it returns (from checking lock) and attempts to pick up processing where it left off, it seems to forget where it was and does not utlimately complete its task(s); possibly variables have been altered, it is difficult to say.  That is, AS 3 is unable to successfully pickup where it left off on the first button.
2) the second problem is that AS 3 incorrectly returns to button 2 after the lock condition is cleared.  It persists and will execute that button.
Can anyone tell me how once one button is selected, the others can be locked out and won't execute??  Multiple threads from these buttons is a problem.
Thanks in advance.
Steve @ U Iowa

dmennenoh - OK.  The downside to that type of solution is that each button has to "know" which other buttons are on the stage at that time, but, yes, that should work.  Do you think turning their visibility off would or would not be as effective as removing the event listeners?  I'm thinking turning visiblity on or off is simpler and simpler to manage.  Thanks for your help.

Similar Messages

  • How to use one pop up window for multiple buttons and input fields?

    Hi Experts,
    I have created a pop up window that will be opened from multiple buttons in the same view. There are input fields that the data will be populated from a pop up window.  How can I set up which button that a pop up window is opened from? I also would like to populate the data from a pop up window to the input field next to a clicked button. There are 6 buttons and 6 input fields that share the same pop up window. I would very appreciate your responses.
    Thank you,
    Don

    Hi,
    Try creating 2 context attributes, one in your component controller and the other in the pop-up view. Bind the attribute of pop-up view to the component controller attribute.
    In the main view, on click of every button set a unique code in the controller's context which helps you in identifying the button clicked. Since u have created a binding to the pop-up view attribute the value flows from the controller.
    In the init method of your pop-up view, check the value of the attribute and based on that display which ever UI elements are required.
    Eg:
    On Button 1 click set value "B1", Button 2  value "B2" etc. In the init() of pop-up view u can check the values and perform the required operation:
    if(("B1").wdContext().currentContextElement().getButtonIdentifier()){
    else...{
    Hope this helps you.
    Regards,
    Poojith MV

  • How to add multiple button/choices in  button choice

    HI all ,
            How to add multiple button/choices in  button choice ?

    Initialize a cluster array (CrsrList type) with as many cursors as you think you would ever need.   Setup your cursors dynamically, then delete the unused cursors (array elements) and then update your CursorList property.
    Message Edited by vt92 on 03-20-2009 04:04 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    cursors.PNG ‏5 KB

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • How do you scroll multiple buttons/interactive content???

    Hi, I'm having a lot of trouble trying to figure out how to
    make multiple buttons(my content) scroll through the use of an
    invisible scroller that works on rollover. I've figured out how to
    make text and movie clips scroll but not buttons. Please
    help!

    Take a look at this tutorial and see if it helps

  • "CLOSED":How to plan inventory from multiple orgs simultaneously using MRP?

    Hello everybody,
    How to plan inventory from multiple organizations simultaneously using SCP?
    My customer found that in supply chain planning (MRP) system always plans in single manufacturing organization, say, ATC, firstly. If set in organization item master, the source type as 'Inventory' and the source organization as another trading organization name, say, ANX. if there is insufficient inventory in ATC, SCP-MRP would plan in ANX, disregard of the inventory exist in ANX for the item.
    But for some items, there are both inventory in ATC and ANX and we want plan BOTH their inventory simultaneously instad of firstly ATC and then ANX.
    Is there any standard function in Oracle that can do so? I found that the sourcing rule cannot help in this case.
    A simple test case is described in
    https://gtcr.oracle.com/gtcr-dir/gtcr_4607/5580425.992/Alternative_to_plan_multi-org_MRP.doc
    Thanks
    Catalina
    Message was edited by:
    user447176

    Catalina,
    Net the inventory simultaneously? Its not quite clear what your client wants.
    Even in the old SCP, you can use sourcing rules to first net inventory in org1 and then net the inventory in org 2 via a transfer from rule. The key point is it is always incremental based on where you place teh demand and then you provide source to fill that demand.
    One restriction that ASCP still has up to 11.5.10 is that you can only have sourcing rules going in one direction. This means that you can't have a rule that sources ORG1 from ORG2 for item A, then have the revers in ORG2 sourcing from ORG1. That won't work, ASCP will randomly ignore one of the rules.
    The best choice may be to use GOP with a sourcing split % so that yo do consider the inventory in both orgs when demanding the order, but it would still be done by checking ORG1 then ORG2.
    Hope this helps.
    Kevin Creel

  • How to start a thread after the execution/termination of another thread.???

    Hello,
    How to start a thread after the execution/termination of another thread....???
    For example:
    consider two threads: ThreadA and ThreadB
    I could start the ThreadB after the execution of ThreadA.
    How to identify the termination of one thread.....???
    Please help me...
    Thanks & Regards,
    Kayalvizhi

    What do you mean with "it doesn't work"? Do you get a compiler error? Do you get an exception at runtime? What's the error message?
    Jesper

  • Is this roughly how the labVIEW Execution Systems work?

    I've not taken a class in OS design, so I don't know the strategies used to implement multitasking, preemptive or cooperative. The description below is a rough guess.
    LabVIEW compiles Vis to execute within its own multitasking execution environment. This execution environment is composed of 6 execution systems. Each execution system has 5 priority queues (say priorities 0->4). Vis are compiled to one or more tasks which are posted for execution in these queues.
    An execution system may either have multiple threads assigned to execute tasks from each priority queue, or may have a single thread executing all tasks from all priority queues. The thread priorities associated with a multithreaded execution system are assigned according to the queue that they service. There are therefore 5 available thread priority levels, one for each of the 5 priority level queues.
    In addition to the execution queues, there are additional queues that are associated with tasks suspended in various wait states. (I don't know whether there are also threads associated with these queues. It seems there is.)
    According to app. note 114, the default execution environment provides 1 execution system with 1 thread having a priority level of 1, and 5 execution systems with 10 prioritized threads, 2 threads per priority queue. NI has titled the single threaded execution system "user interface" and also given names to the other 5. Here they will be called either "user interface" or "other".
    The "user interface" system is responsible for all GUI actions. It monitors the keyboard and mouse, as well as drawing the controls. It is also used to execute non-thread-safe tasks; tasks whose shared objects are not thread mutex protected.
    Vis are composed of a front panel and diagram. The front panel provides an interface between the vi diagram, the user, and the calling vi. The diagram provides programmatic data flow between various nodes and is compiled into one or more machine coded tasks. In addition to it own tasks, a diagram may also call other vis. A vi that calls another vi does not actually programmatically branch to that vi. Rather, in most cases the call to another vi posts the tasks associated with the subvi to the back of one of the labVIEW execution system�s queues.
    If a vi is non-reentrant, its tasks cannot run simultaneously on multiple threads. This implies a mutex like construction around the vi call to insure only one execution system is executing the vi. It doesn�t really matter where or how this happens, but somehow labVIEW has to protect an asynchronous vi from simultaneous execution, somehow that has to be performed without blocking an execution queue, and somehow a mutex suspended vi has to be returned to the execution queue when the mutex is freed. I assume this to be a strictly labVIEW mutex and does not involve the OS. If a vi is reentrant, it can be posted/ran multiple times simultaneously. If a vi is a subroutine, its task (I think there is always only one) will be posted to the front of the caller's queue rather than at the back of the queue (It actually probably never gets posted but is simply mutex tested at the call.) A reentrant-subroutine vi may be directly linked to its caller since it has no restrictions. (Whether in fact labVIEW does this, I don�t know. In any event, it would seem in general vis that can be identified as reentrant should be specified as such to avoid the overhead of mutexing. This would include vis that wrap reentrant dll calls.)
    The execution queue to which a vi's tasks are posted depends upon the vi execution settings and the caller's execution priority. If the caller's execution priority is less than or equal the callee's execution settings, then the callee's tasks are posted to the back of the callee's specified execution queue. If the caller's execution priority is greater than the callee's specifications, then the callee's tasks are posted to the back of the caller's queue. Under most conditions, the vi execution setting is set to "same as caller" in which case the callee�s tasks are always posted to the back of the caller's execution queue. This applies to cases where two vis are set to run either in the other execution systems or two vis are set to run in the user interface execution system. (It�s not clear what happens when one vi is in the �user interface� system and the other is not. If the rule is followed by thread priority, any background tasks in the �other� systems will be moved to the user interface system. Normal task in the �other� systems called by a vi in the �user interface� system will execute in their own systems and vice versa. And �user interface� vis will execute in the caller�s �other� system if the caller has a priority greater than normal.)
    Additionally, certain nodes must execute in the "user interface" execution system because their operations are not thread-safe. While the above generally specifies where a task will begin and end execution, a non-thread safe node can move a task to the �user interface� system. The task will continue to execute there until some unspecified event moves it back to its original execution system. Note, other task associated to the vi will be unaffected and will continue to execute in the original system.
    Normally, tasks associated with a diagram run in one of the �other� execution systems. The tasks associated with drawing the front panel and monitoring user input always execute in the user interface execution system. Changes made by a diagram to it own front panel are buffered (the diagram has its own copy of the data, the front panel has its own copy of the data, and there seems to be some kind of exchange buffer that is mutexed), and the front panel update is posted as a task to the user interface execution system. Front panel objects also have the advanced option of being updated sequentially; presumably this means the diagram task that modifies the front panel will be moved to the user interface execution system as well. What this does to the data exchanged configuration between the front panel and diagram is unclear as presumably both the front panel and diagram are executing in the same thread and the mutex and buffer would seem to be redundant. While the above is true for a control value it is not clear whether this is also true for the control properties. Since a referenced property node can only occur on the local diagram, it is not clear it forces the local diagram to execute in the user interface system or whether they too are buffered and mutexed with the front panel.
    If I were to hazard a guess, I would say that only the control values are buffered and mutexed. The control properties belong exclusively to the front panel and any changes made to them require execution in the �user interface� system. If diagram merely reads them, it probably doesn�t suffer a context switch.
    Other vis can also modify the data structure defining the control appearance and values remotely using un-reference property nodes. These nodes are required to run in the user interface system because the operation is not thread-safe and apparently the diagram-front-panel mutex is specifically between the user interface execution system and the local diagram thread. Relative to the local diagram, remote changes by other vis would appear to be user entries.
    It is not clear how front panels work with reentrant vis. Apparently every instance gets its own copy of the front panel values. If all front panel data structures were unique to an instance, and if I could get a vi reference to an instance of a reentrant vi, I could open multiple front panels, each displaying its own unique data. It might be handy, sort of like opening multiple Word documents, but I don�t think that it�s available.
    A note: It is said that the front panel data is not loaded unless the front panel is opened. Obviously the attributes required to draw an object are not required, nor the buffer that interfaces with the user. This rule doesn�t apply though that if property references are made to front panel objects, and/or local variables are used. In those cases at least part of the front panel data has to be present. Furthermore, since all data is available via a control reference, if used, the control�s entire data structure must be present.
    I use the vi server but haven�t really explored it yet, nor vi reference nodes, but obviously they too make modifications to unique data structures and hence are not thread-safe. And in general, any node that accesses a shared object is required to run in the user interface thread to protect the data associated with the object. LabVIEW, does not generally create OS level thread mutexes to protect objects probably because it becomes to cumbersome... Only a guess...
    Considering the extra overhead of dealing with preemptive threading, I�m wondering if my well-tuned single threaded application in LV4.1 won�t out perform my well-tuned multithreaded application in LV6.0, given a single processor environment�
    Please modify those parts that require it.
    Thanks�
    Kind Regards,
    Eric

    Ben,
    There are two types of memory which would be of concern. There is temporary and persistent. Generally, if a reentrant vi has persistent memory requirements, then it is being used specifically to retain those values at every instance. More generally, reentrant code requires no persistent memory. It is passed all the information it needs to perform its function, and nothing is retained. For this type of reentrant vi, memory concern to which you refer could become important if the vis are using several MBytes of temporary storage for intermediate results. In that case, as you could have several copies executing at once, your temporary storage requirements have multiplied by the number of simultaneous copies executing. Your max memory use is going to rise, and as labview allocates memory rather independently and freely, the memory use of making them reentrant might be a bit of a surprise.
    On the other hand, the whole idea of preemtive threading is to give those tasks which require execution in a timely fashion the ability to do so regardless of what other tasks might be doing. We are, after all, suffering the computational overhead of multithreading to accomplish this. If memory requirements are going to defeat the original objective, then we really are traversing a circle.
    Anyway, as Greg has advised, threads are supposed to be used judiciously. It isn't as though your going to have all 51 threads up at the same time. In general I think, overall coding stategy should be to minimize the number of threads while protecting those tasks that absolutely require timely execution.
    In that sense, it would have been nice if NI had retained two single threaded systems, one for the GUI and one for the GUI interface diagrams. I've noticed that control drawing is somewhat slower under LV6.0 than LV4.1. I cannot, for example, make a spreadsheet scroll smoothly anymore, even using buffered graphics. This makes me wonder how many of my open front panel diagrams are actually running on the GUI thread.
    And, I wonder if threads go to sleep when not in use, for example, on a wait, or wait multiple node. My high priority thread doesn't do a lot of work, but the work that it does is critical. I don't know what it's doing the rest of the time. From some of Greg's comments, my impression is it in some kind of idle mode: waking up and sleeping, waking up and sleeping,..., waking up, doing something and sleeping... etc. I suppose I should try to test this.
    Anyway that's all an aside...
    With regard to memory, your right, there are no free lunches... Thanks for reminding me. If I try this, I might be dismayed by the additional memory use, but I won't be shocked.
    Kind Regards,
    Eric

  • Multiple Buttons in JTable Headers:  Listening for Mouse Clicks

    I am writing a table which has table headers that contain multiple buttons. For the header cells, I am using a custom cell renderer which extends JPanel. A JLabel and JButtons are added to the JPanel.
    Unfortunately, the buttons do not do anything. (Clicking in the area of a button doesn't appear to have any effect; the button doesn't appear to be pressed.)
    Looking through the archives, I read a suggestion that the way to solve this problem is to listen for mouse clicks on the table header and then determine whether the mouse clicks fall in the area of the button. However, I cannot seem to get coordinates for the button that match the coordinates I see for mouse clicks.
    The coordinates for mouse clicks seem to be relative to the top left corner of the table header (which would match the specification for mouse listeners). I haven't figured out how to get corresponding coordinates for the button. The coordinates returned by JButton.getBounds() seem to be relative to the top left corner of the panel. I hoped I could just add those to the coordinates for the panel to get coordinates relative to the table header, but JPanel.getBounds() gives me negative numbers for x and y (?!?). JPanel.getLocation() gives me the same negative numbers. When I tried JPanel.getLocationOnScreen(), I get an IllegalComponentStateException:
    Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    Can someone tell me how to get coordinates for the button on the JTableHeader? Or is there an easier way to do this (some way to make the buttons actually work so I can just use an ActionListener like I normally would)?
    Here is relevant code:
    public class MyTableHeaderRenderer extends JPanel implements TableCellRenderer {
    public MyTableHeaderRenderer() {
      setOpaque(true);
      // ... set colors...
      setBorder(UIManager.getBorder("TableHeader.cellBorder"));
      setLayout(new FlowLayout(FlowLayout.LEADING));
      setAlignmentY(Component.CENTER_ALIGNMENT);
    public Component getTableCellRendererComponent(JTable table,
                                                     Object value,
                                                     boolean isSelected,
                                                     boolean hasFocus,
                                                     int row,
                                                     int column){
      if (table != null){
        removeAll();
        String valueString = (value == null) ? "" : value.toString();
        add(new JLabel(valueString));
        Insets zeroInsets = new Insets(0, 0, 0, 0);
        final JButton sortAscendingButton = new JButton("1");
        sortAscendingButton.setMargin(zeroInsets);
        table.getTableHeader().addMouseListener(new MouseAdapter(){
          public void mouseClicked(MouseEvent e) {
            Rectangle buttonBounds = sortAscendingButton.getBounds();
            Rectangle panelBounds = MyTableHeaderRenderer.this.getBounds();
            System.out.println(Revising based on (" + panelBounds.x + ", "
                               + panelBounds.y + ")...");
            buttonBounds.translate(panelBounds.x, panelBounds.y);
            if (buttonBounds.contains(e.getX(), e.getY())){  // The click was on this button.
              System.out.println("Calling sortAscending...");
              ((MyTableModel) table.getModel()).sortAscending(column);
            else{
              System.out.println("(" + e.getX() + ", " + e.getY() + ") is not within "
                                 + sortAscendingButton.getBounds() + " [ revised to " + buttonBounds + "].");
        sortAscendingButton.setEnabled(true);
        add(sortAscendingButton);
        JButton button2 = new JButton("2");
        button2.setMargin(zeroInsets);
        add(button2);
        //etc
      return this;
    }

    I found a solution to this: It's the getHeaderRect method in class JTableHeader.
    table.getTableHeader().addMouseListener(new MouseAdapter(){
      public void mouseClicked(MouseEvent e) {
        Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
        Rectangle buttonBounds = sortAscendingButton.getBounds();
        buttonBounds.translate(panelBounds.x, panelBounds.y);
        if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){  // The click was on this button.
          ((MyTableModel) table.getModel()).sortAscending(column);
    });

  • When button pressed: Multiple buttons

    Regarding the 'When Button pressed' condition available in various places (computations, branches, processes, etc), it offers me the option to select exactly one button.
    How can I make it so that I want the thing to fire when either Button 1 or 2 or 3 is pressed?
    Thanks

    Martin - Whenever a page is submitted with a button, the request value is set to a property from the button, either the button name for standard buttons or the request value attribute for item buttons. In either a PL/SQL expression condition or in some of the declarative condition types that look at the request value, you can compare it to a list of values that you're interested in.
    Note that the request value doesn't necessarily tell you which button was pressed. It tells you that some event set the request value. If your page can be submitted with a tab or with javascript that you put somewhere on the page, or if you've given multiple buttons the same request value, it's up to you to prevent ambiguity about the button-to-request mapping.
    Scott

  • Calling pl/sql api through multiple java threads

    Hi All,
    I need to call a pl/sql api from multiple java threads simultaneously and all thread will use same db connection.
    I want to know if all the threads will simultaneously call the pl/sql api then will the local variable inside pl/sql procedure be shared between them or they will get separate instances of variables.
    TIA

    You cannot make multiple parallel client calls over the same Oracle session handle. There is a single non-threaded/non-fibre serialised server process servicing client requests for that session. (physical process on Linux/Unix, thread in the oracle.exe process on Windows).
    Each thread on the client side, needs its very own Oracle session. Thus each thread will have a server process footprint on the server. Which could be problematic if 10 clients each starts 10 threads - as it means a 100 processes on the server are needed to service these client threads.
    Have a look at Overview of OCI Multithreaded Development in the Oracle® Call Interface Programmer's Guide for how to use the threading call interface of the OCI - as oppose to rolling your own where each thread manually needs to deal with is OCI session context.

  • Changing Font Of Multiple Buttons

    Hey ya'll! First off i'm new here and it looks like you guys
    know what you're talking about. i searched the forums but could not
    find any help (perhaps i wasn't' looking hard enough) ANYWAY here
    is the deal:
    i'm a complete n00b.
    I have a flash movie with multiple buttons and want to change
    the fonts of ALL buttons simultaneously (it changes color on
    mouseover, so i want to change the font of the text which is a
    different color... ... the fla file is here.... i can make any
    changes necessary and start over if need be (its a pretty simple
    flash menu i guess) any help with optimization and efficiency would
    be appreciated.
    thanks in advance
    http://gmoonit.com/matt/flashmenu.swf
    http://gmoonit.com/matt/flashmenu.fla
    http://gmoonit.com/matt/flashmenu.html
    you can send files to [email protected]
    aim: gmoonit
    msn: [email protected]
    yahoo: [email protected]
    meebo: gmoonit

    gmoonit wrote:
    > Hey ya'll! First off i'm new here and it looks like you
    guys know what you're
    > talking about. i searched the forums but could not find
    any help (perhaps i
    > wasn't' looking hard enough) ANYWAY here is the deal:
    > i'm a complete n00b.
    > I have a flash movie with multiple buttons and want to
    change the fonts of ALL
    > buttons simultaneously (it changes color on mouseover,
    so i want to change the
    > font of the text which is a different color... ... the
    fla file is here.... i
    > can make any changes necessary and start over if need be
    (its a pretty simple
    > flash menu i guess) any help with optimization and
    efficiency would be
    > appreciated.
    You need to edit each button individually, one by one.
    The only time when multiple buttons get changed all at once
    is when you
    design it fully dynamic. One button/movie clip, duplicated,
    multiplied and
    control by action script.
    In your case, you need to change one by one manually.
    By the way, take note that the forum is connected to News
    Server. Many of us
    never use the browser based forum so by bumping your post,
    you only make it appear
    answered and your chances of getting help get smaller as we
    usually go for the
    unanswered threads only.
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • How do I use Tooltip in a thread?

    Hello Everyone.
    I'm trying to use Tooltip in a (added) thread, but I've got IlligalStateException.
    Task task = new Task<Void>() {
        @Override
        protected Void call() throws Exception {
            Tooltip tooltip = new Tooltip();
            return null;
    new Tread(task).start();NetBeans 7.1
    JDK 1.6.0_30
    JavaFX 2.0.1
    I can use other controls (like Button, etc).
    Thank you in advance.

    How do I use Tooltip in a thread? You can only create Tooltips on the JavaFX Application Thread due to this bug: http://javafx-jira.kenai.com/browse/RT-17716

  • How do you set up multiple accounts in itunes so phones don't automatically sync each others data ?

    How do you set up multiple itunes accounts to prevent multiple phones from sharing contact data?

    To add to Rod's answer, I have been blogging to explain more in detail the work flows for Question and Score slides, and some tweaking possibilities in these articles:
    http://lilybiri.posterous.com/question-question-slides-in-captivate
    http://lilybiri.posterous.com/question-question-slides-part-2
    Lilybiri

  • How can i disable a submit button and execute submit_action method on click

    Good Day,
    On my page I have a submit button that execute the submit_action method of the page backing bean that submit data captured on the page into a database and activate another class that send mail at the same time on a click of the submit button,the mail process takes a while before returning back to the page.I was able to disable the submit button to prevent the user from keep click while the process is running but the issue is on clicking the submit button it only disable the submit button without executing the submit_action method of the page backing bean.How can i disable the submit button and execute submit_method of the backing bean at the same time.
    Thanks in advance.

    I tried this out on one of my pages to see if it works.
    First, I added the following JavaScript to my submit button's onClick event:
    this.disabled=true; return true;When I clicked the submit button, it was disabled but the form was not submitted.
    I deleted the JavaScript from the onClick event and added the following JavaScript to the form's onSubmit event:
    var button = document.getElementById("form1:submitButton"); button.disabled=true; return true;When I click the submit button, it was disabled and the form was submitted but the button's action method was not called.
    The next thing I tried was to change the onSubmit event code:
    var button = document.getElementById("form1:submitButton"); setTimeout("button.disabled=true", 500); return true;This seemed to work. The difference was that I added a 1/2 second delay before disabling the button.
    See if that works for you. If not then I'm fresh out of ideas.

Maybe you are looking for