How to block execution of event listeners

Hi all,
JDev version : 11.1.1.6
My requirement is that I want to block all event listeners like ActionListeners, SelectionListeners, DisclosureListeners, RowDisclosure listeners when the screen is opened in readonly mode.
I could block ActionListeners by disabling command links and command buttons etc.
But there's no way to block SelectionListeners, DisclosureListeners, RowDisclosure listeners.
So Is there any common code which can block all listeners?
Or is there any EventController or something like that which will allow me to control event execution?

I would have if it was just one screen.
There are hundreds of screens.
Anyways, can't I use any javascript to do this? There are some interfaces like EventListeners , classes like EventConsumer etc. Do none of them provide feature to block event listeners?

Similar Messages

  • How to block JTree key event listeners

    I have a JToolbar I am managing keyboards events for (e.g. PageUp, PageDown, right, left, up, down). I also have a JTree in another panel. I have to use 'Alt + PageUp' instead of PageUp because, if I use 'PageUp' (without also using the Alt key), and, the JTree gets the focus, then the JTree will respond to 'PageUp' instead of my JToolbar.
    I have my key actions in a 'getKeystrokeActions()' method which I pass the JToolbar into so I tried passing the JTree to the same method. This doesn't quite do what I want as both components now respond to a 'PageUp' key event.
    There must be some way to tell the JTree not to handle key events but I can't seem to find it. Any help much appreciated.

    Remove the key listeners?
    JTree tree = new JTree();
    for(KeyListener listener : tree.getKeyListeners()) {
        tree.removeKeyListener(listener);
    }Another option would be to just do
    tree.setFocasable(false);

  • Order of execution for event listeners..??

    Hi there,
    Looking at the JDK source, I see that all classes that generate events, iterate through the listeners in reverse order. What is more, they start at size - 2. I am first, confused as to why it goes in this direction, and second, why size - 2 is used. Does the last added one not get called?
    As for reverse order, the problem I see with this is if a class that implements a listener in one way, then you want to add a listener, but your listener code depends on something being done within the first listener. For example, I created a simple file selection component. On the left is all files. On the right is the selected files. The component works fine. You can dbl-click a file to move it, or click the > or >> (or < or <<) to move selected files or ALL files in one direction or the other. The problem is, my component implements the ActionListener of the > and >> buttons. I made it public so that classes using this component could also add listeners. The main reason is, in the case of a "wizad", you do NOT want the NEXT button to be enabled until at least one selected file is in the right list box. So, when I add the listener, the component listener does NOT get called before my newly added listener. That listener does the job of moving the file and redisplaying the list of all files and selected files. But since my listener gets called first, that is not done, therefore the "selected" files list is NOT yet updated based on the button clicked. I am guessing that this occurs because of the reverse execution of listeners, and my listener is added after the component listener.
    So, is there any way to reverse this without having to reimplement the list myself? I'd hate to extend JButton just to handle executing listeners in the order they are added. Seems silly to me that this is not at least an optional boolean choice to indicate the direction to execute listeners, but I sure would love to know why Sun has gone this direction.
    Thanks.

    Thanks for the reply.
    That seems very odd to me, that it puts two entries per one listener. So let me ask you this, is this so that it can store the listeners in a list, but also store the type of listener? While at first this seems an odd way to use a list, I have come across several times when I wish I could store two objects in the list as one. I thus have created an inner class taking the two objects (usually a String for a "key" and an object), and then stored that in the list. The reson is, I want to store MORE than one of the same type, so a Set is out of the question, but a list only adds one object. I wish there was a class that allowed multiple values stored under the same key. I guess this would be easy enough to create, but it seems like something so often used that the JDK would have this in it already. Unless I am mistaken, I have not seen any Collection implementec class that can have multiple keys, and each key can have multiple values. Have you? So, I take it, just to verify, that the reason for storing the class type, then the actual instance is just this reason..to figure out the type it is, then the actual object that implements it (the reference to it).
    Thanks.

  • How to block the workflow event

    hi all,
    we use the custom BAPI to trigger the workflow.
    in the custom BAPI we used <b>assigned</b> event from the <b>BOR object IFARCH21- it's related to SAP archive link .</b>. the custom BAPI is conatins the API's of  create a shipment,and shipment cost based on this opearations billing wii be done.....now the user will get the <b>error message</b> in SAP workplace from this BAPI.
    now i want to block the billing creation.
    please give a suggestion on this...
    regards
    Sukumar<b></b>

    Hi,
    Can you clarify a bit further????
    I think you have used SAP_WAPI_CREATE_EVENT in your BAPI to create the event "assigned". This event gets triggered whenever a shipment is created and the workflow send out a message to the inbox. Now you want to deactivate this message that is being sent. i.e in other words you want to disonnect the workflow itself from being triggered.
    If i am right in understanding your requirement then you will have to deactivate the linkage to the workflow that sends out the mail in the transaction SWETYPV. Or you will have to comment out the code written for SAP_WAPI_CREATE_EVENT.
    Thanks,
    Prasath N

  • LoadMovie - How to block background events

    Hello,
    I use loadMovie to load a movie into a current movie clip,
    the movie is
    currently on the top, but how to block other objects/events
    so that only
    if this movie is closed, other can interact?
    I mean the loaded movie should be `modal`
    Thanks.

    Not sure if this is what you mean but basically you have a
    movie clip on top of other objects that can have mouse interaction
    in them. You want to prevent those objects from having mouse events
    happening when this current movie clip is on top of them.
    In as2 unless you can turn the visibility of everything in
    the back to 'false' you need to create a movieclip/button that
    act's like a click blocker. It will lie between the current
    movieclip and everything behind it.
    create movielclip called clickblocker and give it this code:
    clickBlocker.onRelease = function () : Void {};
    clickBlocker.useHandCursor = false;
    so basically it acts like a button that does nothing and
    prevents the mouse cursor from turning into a hand.

  • Urgent: How to add event listeners to a null object?

    I have an object that is lazy loaded, and therefore starts out null.
    How can I add an event listener onto this null object, so that it fires whenever the object is instantiated?
    WHY does arrayCollection.addEventListener(CollectionEvent.COLLECTION_CHANGED, function) not work??
    Thanks!
    C

    C,
    the answer to your question "WHY does arrayCollection.addEventListener(CollectionEvent.COLLECTION_CHANGED, function) not work??" is that addEventListener is not a static method, ie it has to be attached to an actual instance. I agree that in your situation it would be handy to have it as static, something like ArrayCollection.addEventListener(etc) but I'm not at all sure that is a good plan in general, as usually we want events to fire from an actual instance of the class, not generically. A quick look through the adobe docs has convinced me there are not many static methods at all, and none that appear to help you.
    I take it from your description that you don't know exactly when the collection is instantiated? But presumably though you do have a point where new is called? Or something equivalent like populating it from something else?
    Richard

  • How can I get all the Listeners of an ObservableMap?

    This is my use case:
    A MapListener can be added/removed to an ObservableMap in any node. To remove a listener I need a reference to the listener object to use the removeMapListener(MapListener listener) method. But if the listener was registered in the node A, and it will be removed by the node B how do I get this reference in this node?
    This can be easily solve if there is a way to get a Set of all the active MapListerner that an ObservableMap have.
    Thanks in advance,

    ggarciao.com wrote:
    OK ... this is very interesting. So, what happen if the node that registered the event goes down?
    What I actually need is a way to register clustered-aware events that can be created/removed from any node, and the cluster should guarantee its execution. The use case? a workflow implementation.
    I have several entities with an state field. every time that the state field change, I need to capture that event and do something (like update another system).
    There is a way to do this using listeners in coherence?
    Thanks in advance, and sorry for the delay (vacation) :-)Yes, there are several kind of events and event listeners.
    For your purpose you can take two approaches.
    You can either have a cache listener which listens for all changes in a cache and submits events to some other place.
    Alternatively, you can have a backing map listener which would put events into another cache on the same service and you would syphon the content of this cache to your external system. In the Coherence Incubator there is the Event Distribution pattern and Push Replication pattern projects which provide functionality to achieve this. It has been indicated at on several Coherence SIG meetings that a later Coherence release is going to contain the functionality of these projects out-of-the-box but I believe specific release version and timeline for that release is not confirmed yet, so your safe bet at the moment is the Coherence Incubator (Release 10, I believe is the latest, which you can find at http://coherence.oracle.com/display/INC10/Home ).
    Best regards,
    Robert

  • 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.

  • How to block the creation of a Sales Orders without a linked Purchase Order

    Hi. I'm trying to block the creation of a Sales Order that doesn't have a linked Purchase Order. The first thing I did is using the SBO Transaction Notification as follows:
    IF  @transaction_type = 'A' AND @object_type='17'
    BEGIN
         IF (SELECT PoPrss FROM ORDR WHERE DocEntry = @list_of_cols_val_tab_del) = 'N'
         BEGIN
              SET @error = 1
              SET @error_message = 'Purchase Order Missing...'
         END
    END
    This works good. I create the Sales Order, I tick the purchase order field on the logistics tab, I click Add, and then the purchase order window appears...
    Then, the problem begins... If I click the Cancel button, the purchase order is obviously not created, but the Sales Order is created.
    Can someone tell me how to block the creation of the sales order If the user press the cancel button on the purchase order window (and the purchase order is not created)
    As far as I can see, after clicking the add button in the sales order document, the Sales Order is created on the DB. If there's no way of blocking the creation of the Sales Order, can I avoid closing the purchase order window by the SBO_TransactionNotification? (if the purchase order has not been created)
    Thanks...

    Hi Yail,
    I think you can't close the purchase order with the stored procedure.
    Try to catch the Event when the user click on Cancel button.
    So you can list the vents with event logger : https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ede3be37-0e01-0010-1883-cd1b5293473e
    You can block the cancel button and force the user to create the purchase order.
    Hope i help you
    Best regards
    Michael

  • How to block the Creation of Mulitple Excise Invoice in J1IS

    Hi Sap Gurs,
    Can any tell me how to block the System allowing  to Create One more Excise Invoice in J1IS against Same GI Material Document no (Ref Trans Type:MATD) for Outgoing Materials ie:Stock Transfer from One Plant to onother Plant by Mvt Type 351(Single Step Procedure)
    In SD, System is not allowing to Create One more Excise Invoive against One Billing Document Untill we Cancell the same.
    I want to make it like same for the above Issue.
    Pls check it in your system and give a Feed Back.
    Thanks in advance.
    Bye
    Sathish

    Hi Yail,
    I think you can't close the purchase order with the stored procedure.
    Try to catch the Event when the user click on Cancel button.
    So you can list the vents with event logger : https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ede3be37-0e01-0010-1883-cd1b5293473e
    You can block the cancel button and force the user to create the purchase order.
    Hope i help you
    Best regards
    Michael

  • Help me I'm trying to create event listeners

    I am trying to create event listeners
    Whenever any keyboard event occurs the string s gets appended by a,c
    or p.At the end of the program its supposed to print value of s
    But s always happens to null.Please tell me how to correct it....so
    that detection is possible for any case
    import java.io.*;
    import java.awt.event.*;
    public class trial {
    int x;
    public static String s;
    //OutputStream f1=new FileOutputStream("file2.txt");
    public static void keyReleased(KeyEvent e)
    s=s+"a";
    public static void keyPressed(KeyEvent e)
    s=s+"c";
    public static void keyTyped(KeyEvent e)
    s=s+"p";
    public static void main(String args[])
    throws IOException
    char c;
    BufferedReader br =new BufferedReader(new
    InputStreamReader(System.in));
    System.out.println("Entercharactes,'q' to quit.");
    do
    c=(char)br.read();
    System.out.println(c);
    while(c!='q');
    // for(int i=0;i<s.length();++i)
    System.out.println(s);

    I suggest looking at the java tutorial. Your code completely misses the mark and you need to see examples.

  • How to block a business partner...in sales order????

    Hi all,
               While generating the sales order....In the customer tab i will select one business partner from CFL,after choosing i want one particular customer to be blocked....means it should unable to post the sales order.....i know that i should write my coding in the customer tab LOST FOCUS event......can anybody suggest me the coding for this problem....
    regards,
    shangai.

    Shangai,
    How about blocking some partner from ChooseFromList of BP in Sales Order?
    Meaning that blocked some bp with criteria in Choose From List. Sample code:
    If pVal.FormType = 139 And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
                If pVal.ItemUID = "4" Then
                    If pVal.InnerEvent And pVal.Before_Action Then
                        BubbleEvent = False
                        Dim oForm As SAPbouiCOM.Form
                        oForm = SBO_Application.Forms.Item(FormUID)
                        Dim oCons As SAPbouiCOM.Conditions                   
                        Dim oCFL As SAPbouiCOM.ChooseFromList
                        'oCFL = oCFLs.Add(oCFLCreationParams)
                        oCFL = oForm.ChooseFromLists.Item("2")
                        oCons = oCFL.GetConditions()
                        'Note: Add the condition only once.
                        If 0 = oCons.Count Then
                            Dim oCon As SAPbouiCOM.Condition
                            oCon = oCons.Add()
                            oCon.Alias = "Cardcode"
                            oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                            oCon.CondVal = "C0001"
                            'Set your own condition here instead of the system conditions
                            oCFL.SetConditions(oCons)
                        End If
                        BubbleEvent = True
                    End If
                End If
            End If
    Regards, Yatsea

  • [JS] Basic question about event listeners and event handlers

    I am very new to the whole topic of event listeners and event handlers.  I'd run the test for the following problem myself, but I don't know where to start, and I just want to know if it's impossible -- that is, if I'm misunderstanding what event listeners and event handlers do.
    Say I have an InDesign document with a text frame that is linked to an InCopy story.  Can I use an "afterImport" event listener on the text frame to perform some action any time the link to the InCopy story gets updated?  And will the event handler have access to both the story that is imported, and the pathname of the InCopy file?
    Thanks.

    Thank you, Kasyan.
    Both of those are good solutions.
    We are currently using InDesign CS4 and InCopy CS5.  I'm hoping to get them to purchase the whole CS5 suite soon, since I'd like to start writing scripts for InDesign CS5 as soon as possible, as long as I'm going to have to be doing it in the not too distant future anyway.  The greater variety of event handlers sounds like it might be something that is crucial to the project I'm working on, so that adds to the argument for getting CS5.
    Thanks again.  You have no idea how helpful this is.  I made some promises to my boss yesterday that I later realized were  based on assumptions of mine about the InDesign/InCopy system that didn't make any sense, and I was going  to have to retract my promises.  But after reading your response I think I can still deliver, in a slightly different way that I had been thinking before.
    Richard

  • How to suppress 'spurious' update events where the entry is identical

    We often have clusters with event listeners on reference data caches. These caches are refreshed by calling putAll() to update values efficiently. Although this is efficient, and keeps refresh code simple, many unwanted 'spurious' update events are generated. Spurious in the sense that in most of update events the old and new values are the same.
    We considered using a MapTrigger to suppress these uninteresting update events. The problem is how to implement a 'veto' in the MapTrigger.process method. What we'd like to do from a trigger is:
    if (old value == new value)
      ignore new entry
    else
      process, enrich, or validate new entry as desired...
    end ifWe'd like a clean way to signal from a MapTrigger that an entry should be ignored (rather than rejected). The Javadoc shows two possibilities:
    *(1)* undo the pending change by resetting the entry value to the original value obtained from MapTrigger.Entry.getOriginalValue();
    *(2)* reject the pending change by throwing a RuntimeException, which will prevent any changes from being committed, and will result in the exception being thrown from the operation that attempted to modify the map
    Of these *(2)* Causes a put() failure in the client. That is appropriate for something like a validation failure, but not for simply ignoring an unwanted update. Option *(1)* unfortunately generates an update event!
    Our current workaround is a MapEventTransformer to suppress the spurious updates:
    public class UpdateSupressionTransformer implements MapEventTransformer {     
      /** Avoid sending an update event if the value is unchanged */
      public MapEvent transform(MapEvent e) {
        if (e.getId() == MapEvent.ENTRY_UPDATED) {
          if (e.getNewValue().equals(e.getOldValue())) {
            return null;
        return e;
    }This works well but requires client code to register event listeners correctly. It also means that the unecessary change is still generated in the cache. For example a cache stores will be called needlessly.
    Can a feature be considered to allow a clean way for identical updates to be ignored, or to not generate events?
    Ideally this would be before the update is made - like a trigger. It seems a pity the MapTrigger design does not allow this.
    Such a feature would allow simple cache refresh logic using putAll() - without having to check for deltas - avoiding large numbers of unwanted update events. We think this is likely to be a common requirement.
    Cheers,
    phil

    Hi,
    I dont think that this is the problem associated with portal.You are working on BI queries in portal but BI screen that you are working on is of SAP R/3 correct me is i am wrong??And the message you are getting is of R/3 screen,BI screens are shown in an iview and an iview cant show any message..
    Regards,
    Ameya

  • Documentation for custom event listeners

    Hi,
    I am searching in portal 8.1 documents for using custom events, coding and registering event listeners, and using them in jsp pages. So far my search has been unsuccessful.
    Can some one let me know where i find this info?
    -thanks

    Hi J, 
    Thanks for your reply.
    I didn’t find the custom work item Web Access control Official documents, but you can refer to the information in these articles(it’s same in TFS 2013):
    http://blogs.msdn.com/b/serkani/archive/2012/06/22/work-item-custom-control-development-in-tf-web-access-2012-development.aspx
    http://blogs.msdn.com/b/serkani/archive/2012/06/22/work-item-custom-control-development-in-tf-web-access-2012-deployment.aspx
    For how to debug TFS Web Access Extensions, please refer to:
    http://www.alexandervanwynsberghe.be/debugging-tfs-web-access-customizations/.
    For the custom work item Web Access control Official documents, you can
    submit it to User Voice site at: http://visualstudio.uservoice.com/forums/121579-visual-studio. Microsoft engineers will evaluate them seriously.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Apple TV + connecting to audio

    Just installed Apple TV, want to run it through stereo system, which is dated (no optical audio input) but works just fine.  Should I be able to connect Apple TV directly to my Blu-ray via optical audio and get stereo output through receiver?

  • Album Artwork didn't add to my library files

    the albums are available in iTunes Store but I already owned the CDs and when I imported them the artwork didn't upload on several of them. The Preferences/General box for that is checked and most of the ones imported did get the cover art. How can I

  • Wich software should I use to create a game??

    I'm sorry if I did not find answer to my question in the forum, but I don't understand so much english. I would like to create a game, and I'm searching for the software. could you help me? Thank you

  • Final Cut  4.5 on a Mac Pro

    Hi guys, New here. I've been using my FCP 4.5 on an old G4 for ages and now am installing it on my new Mac Pro OS X Leopard. Installed okay - but getting message that I need a Power Mac G4/350 and a AGP card. How do I get over this? Love you all Keit

  • Coloring tools not working in CS3.  How do I fix them?

    My paint brushes, pencil and clone stamp have stopped working in CS3 for Windows 7.  How can I fix tem?