Simple Custom Events in Java

Hello All
I am new to Java hailing from C++ and ActionScript. I need to create a custom event system for use with various design patterns I'm using in a project (starting with MVC for the overall structure).
From what I understand, I need to use the EventObject and EventListener base classes to derive my own custom classes from, in order to do this. In ActionScript, the events system works quite differently, having an EventDispatcher class you inherit from, etc. It also specify types of events as constants. So I'm a little confused as to how to do this.
The following example seems to explain pretty much what I need:
[http://exampledepot.com/egs/java.util/CustEvent.html|http://exampledepot.com/egs/java.util/CustEvent.html]
...but adapting this is giving me a bit of a headache, maybe because I'm stuck in the ActionScript event paradigm. Am I right in assuming I could simply pass an integer parameter in the event, specifying what type it is?Or do I need to specify a different class for each event type (extending either EventObject, or an interface which extends from EventObject each time)?
Lastly, can someone tell me whether or not a native List implementation using generics might not work just as well for the given example as the EventListenerList used above ? (I see no reason to use Swing classes when I won't be using Swing at all... it just seems unclean. My app is a socket server and needs no UI functionality.)
Thank you in advance.
-Nick

NickZA wrote:
...but adapting this is giving me a bit of a headache, maybe because I'm stuck in the ActionScript event paradigm. Am I right in assuming I could simply pass an integer parameter in the event, specifying what type it is?Or do I need to specify a different class for each event type (extending either EventObject, or an interface which extends from EventObject each time)?Noone forces you to use EventObjects of any kind. If you like (and it's sufficient for you), then you can simply pass any value you want or even no value to the event method in the Listener interface.
So an event that's represented by the worldIsCollapsing() method might not need any additional information.
Lastly, can someone tell me whether or not a native List implementation using generics might not work just as well for the given example as the EventListenerList used above ? (I see no reason to use Swing classes when I won't be using Swing at all... it just seems unclean. My app is a socket server and needs no UI functionality.)Basically yes, it would work just as well. The difference is that the EventListenerList can handle Listeners of different types (i.e. you can manage your FooListeners and your BarListeners using a single object, if you used simple Lists instead, you'd need two of those).

Similar Messages

  • A simple custom event

    Hello everyone, I am dispatching an event from one document  class and listening for it via another document class.
    My code in class A.
    this.dispatchEvent(new MYEvent(MyEvent.APERTURE_DONE));
    trace("Dispatching
    APERTURE_DONE");
    In my code in class B.
    addEventListener(MyEvent.APERTURE_DONE, onDoorsOpen,true);
                      trace("Lisetning
    for APERTURE_DONE");
    private function
    onDoorsOpen(event:MyEvent):void
    trace("Open
    doors");
    My listener is registering before the event is dispatched, based on my output window, however I never get the "Open Doors" trace statement to fire.
    Does anyone have any suggestions?
    Thanks, I appreciated it.

    Kglad,
    Thanks so much for the help and example.  Though I have a few questions as 1.  I am not sure what exactly is going on here and 2. not sure excly how to implement it in my situation.  So here goes....
    Class B.... the one that dispatches my event.
    Your Code:
    package{
        import flash.display.MovieClip;
        import flash.events.Event;
        public class B extends MovieClip{
            function B(){
    this.addEventListener(Event.ADDED_TO_STAGE,init);
            function
    init(e:Event){
            function
    addlistenerF(mc:MovieClip){
    trace("addlistenerF in B",mc);
    mc.dispatchEvent(new Event("ce"));
    I aready had theEvent.ADDED_TO_STAGE,init implemented, so all is good there, however I actaully dispatched my event within a timer like so:
    A timer method within my classB...Aka Aperture class
    private function timerListener(event:TimerEvent):void
                   if (Aperture_mc.currentFrameLabel == "Done")
                        _apertureTimer.stop();
                        _apertureTimer.removeEventListener(TimerEvent.TIMER, timerListener);
    this.dispatchEvent(new AcesEvent(AcesEvent.APERTURE_DONE));
    trace("Dispatching APERTURE_DONE");
    So I changed my code to the following:
    private function timerListener(event:TimerEvent):void
                   if(Aperture_mc.currentFrameLabel == "Done")
                        _apertureTimer.stop();
                        _apertureTimer.removeEventListener(TimerEvent.TIMER, timerListener);
                        addlistenerF(); //what gets passed to this method?
              private function addlistenerF(mc:MovieClip)
                   trace("addlistenerF in B",mc);
                   mc.dispatchEvent(new AcesEvent(AcesEvent.APERTURE_DONE));
                   trace("Dispatching APERTURE_DONE"
    Ok, so what movie clip am I supposed to pass into the addlistenerF method, the Aperture_mc? And not sure I understand why I need a separate function for this.
    Ok the Class A aka LoadingDoors, the one that will listen for the event.
    Your code:
    package{
        import flash.display.MovieClip;
        import flash.events.Event;
        public class A extends MovieClip{
            function A(){
                this.addEventListener(Event.ADDED_TO_STAGE,init);
            function init(e:Event){
                this.addEventListener("ce",listenerF);
                MovieClip(MovieClip(this.parent.parent).loaderB.content).addlistenerF (this);
            function listenerF(e:Event){
                trace(e)
    this.addEventListener("ce",listenerF);....... this I get
    MovieClip(MovieClip(this.parent.parent).loaderB.content).addlistenerF (this); .... this confuses me a little.
    1. Does this enable me to pass "this (Class A/LoadingDoors)" to the addlistenerF method in the other class (class B/Aperture)? and if so, how, since I call it from within that timer function?
    2. Though I deffently appricate your help on this, it simply seems complicated on convoluted just to listen for an event, so with that said it leads me to my next question.
    3. Simply dispatching an event from one object can not be heard from any other object that registers a listener?
    Sorry for my confusion and ignorance, but I do highly appreciate all the help you guys give to me on this forum,  you are all life savers.

  • Query regarding creating a Custom Event and Firing.

    I have created a custom event,a custom listener and a custom button.
    But when I click on custom button,my event is not being fired.
    When and how do I need to invoke the fireEvent() ?
    Please can any body tell me if I have overlooked any thing ?
    Thanks,
    // 1 Custom Event
    import java.util.EventObject;
    public class MyActionEvent extends EventObject{
            public MyActionEvent(Object arg0) {
         super(arg0);
    // 2 Custom Listener
    import java.util.EventListener;
    public interface MyActionListener extends EventListener {
          public void myActionPerformed(MyActionEvent myEvent);
    // 3 Custom Button
    public class MyButton extends JButton {
        // Create the listener list
        protected javax.swing.event.EventListenerList listenerList = new javax.swing.event.EventListenerList();
          public MyButton(String str){
         super(str);
         public void addMyActionEventListener(MyActionListener listener) {
             listenerList.add(MyActionListener.class, listener);
        protected void fireMyActionEvent() {
            MyActionEvent evt = new MyActionEvent(this);
            Object[] listeners = listenerList.getListenerList();
           for (int i = 0; i < listeners.length; i = i+2) {
                 if (listeners[i] == MyActionListener.class) {
                      ((MyActionListener) listeners[i+1]).myActionPerformed(evt);
    } // end of class MyButton.
    // 4 Test my Custom Event,Listener and Button
    public class MyButtonDemo extends JPanel {
        protected MyButton b1;
        public MyButtonDemo() {
            b1 = new MyButton("Disable Button");
            b1.setToolTipText("Click this button to disable the middle button.");
            b1.addMyActionEventListener(new MyActionListener() {
         @Override
         public void myActionPerformed(MyActionEvent myEvent) {
         System.out.println("My ActionEvent....");
            add(b1);
        private static void createAndShowGUI() {
            JFrame frame = new JFrame("ButtonDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            MyButtonDemo newContentPane = new MyButtonDemo();
            newContentPane.setOpaque(true);
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

    Hi Stan,
    I would like to use my custom action listener rather that using the the normal actionPerformed(ActionEvent e)
    But some how this event is not being fired.
    Any suggestions to fire this?
    b1.addMyActionEventListener(new MyActionListener() {
             @Override
             public void myActionPerformed(MyActionEvent myEvent) {
         System.out.println("My ActionEvent triggered....");
    });

  • Please Help me with my Custom Event

    I am new in java, please help me about my custom event
    I have a simple source code about custom event but it doesn't work like I want. This code generate result :
    start
    end
    but I want result :
    start
    my custom event (from aaa method)
    end
    Thank you
    package TestBean;
    class MyEvent extends java.util.EventObject {
    public MyEvent(Object source) {
    super(source);
    interface MyEventListener extends java.util.EventListener {
    public void myEventOccurred(MyEvent evt);
    class MyClass {
    protected javax.swing.event.EventListenerList listenerList =
    new javax.swing.event.EventListenerList();
    public void addMyEventListener(MyEventListener listener) {
    listenerList.add(MyEventListener.class, listener);
    public void removeMyEventListener(MyEventListener listener) {
    listenerList.remove(MyEventListener.class, listener);
    protected void fireMyEvent(MyEvent evt) {
    Object[] listeners = listenerList.getListenerList();
    for (int i=0; i<listeners.length; i+=2) {
    if (listeners==MyEventListener.class) {
    ((MyEventListener)listeners[i+1]).myEventOccurred(evt);
    public class BeanFrame extends javax.swing.JFrame {
    public BeanFrame() {
    initComponents();
    MyClass c = new MyClass();
    System.out.println("start");
    c.addMyEventListener(new MyEventListener()
    public void myEventOccurred(MyEvent evt)
    aaa(evt);
    System.out.println("end");
    private void aaa(MyEvent evt) {                    
    System.out.println("my custom event");
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 400, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 300, Short.MAX_VALUE)
    pack();
    }// </editor-fold>
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new BeanFrame().setVisible(true);

    package TestBean;
    class MyEvent extends java.util.EventObject {
        public MyEvent(Object source) {
               super(source);
    interface MyEventListener extends java.util.EventListener {
        public void myEventOccurred(MyEvent evt);
    class MyClass {
        protected javax.swing.event.EventListenerList listenerList =
        new javax.swing.event.EventListenerList();
        public void addMyEventListener(MyEventListener listener) {
              listenerList.add(MyEventListener.class, listener);
        public void removeMyEventListener(MyEventListener listener) {
              listenerList.remove(MyEventListener.class, listener);
        protected void fireMyEvent(MyEvent evt) {
             Object[] listeners = listenerList.getListenerList();
             for (int i=0; i<listeners.length; i+=2) {
                    if (listeners==MyEventListener.class) {
                          ((MyEventListener)listeners[i+1]).myEventOccurred(evt);
    public class BeanFrame extends javax.swing.JFrame {
          public BeanFrame() {
                initComponents();
                MyClass c = new MyClass();
                System.out.println("start");
                c.addMyEventListener(new MyEventListener(){
                                  public void myEventOccurred(MyEvent evt){
                                              aaa(evt);
                System.out.println("end");
          private void aaa(MyEvent evt) {
                System.out.println("my custom event");
         // ><editor-fold defaultstate="collapsed" desc=" Generated Code ">
         private void initComponents() {
               setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
           javax.swing.GroupLayout layout = new 
           javax.swing.GroupLayout(getContentPane());
           getContentPane().setLayout(layout);
           layout.setHorizontalGroup(
           layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
           .addGap(0, 400, Short.MAX_VALUE)
           layout.setVerticalGroup(
           layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 300, Short.MAX_VALUE)
          pack();
    }// </editor-fold>
    public static void main(String args[]) {
             java.awt.EventQueue.invokeLater(new Runnable() {
             public void run() {
                      new BeanFrame().setVisible(true);
    }just enclosed it with the code tags.

  • Mac OS / classpath / custom event problem

    I'm having a bit of trouble with a particular classpath
    anomaly, and I have a feeling that it might be a Mac thing.
    Not sure if anyone else can reproduce this, but I managed to
    make a custom event and a class that extends the EventDispatcher
    once. Since then, Flash has refused to admit that any class
    associated with a custom event exists - mostly producing the error
    1046. Even after you take out any references to the event
    dispatcher or a custom event, the class is ignored.
    All my classes are kept in a single 'Packages' folder with
    sub folders that I include in the import statement (I've
    triple-checked the classpath settings, the import statements, and
    the classes themselves - I have probably a hundred or so other
    classes that are fine, and all referenced in the same way, some
    that extend EventDispatcher, some that don't.
    I come across this a few times now - once I was able to fix
    it by putting the .as file in the same folder as my first custom
    event, but this no longer works.
    I'm running Mac OS X 4.11 on two computers - both have the
    same trouble.
    I've tried copying the classes to other folders and changing
    the package/import path accordingly - no go.
    Even stranger, if you copy and paste to a new .as file, and a
    different package folder, the problem persists in that Flash claims
    the revised Package statement (to reflect the new location) does
    not reflect the position of the file - when it clearly does.
    I haven't had this problem with any other home-grown class -
    only those that reference a custom event.
    It sounds like it should be pilot error, and I've spent a
    long time trying to spot a silly mistake. But as this problem has
    recurred a few times now, I'm beginning to think it isn't me.
    Anybody else experience similar classpath problems with AS3
    on a Mac? Anybody have any suggestions?

    I am also a newbie and my answer could be wrong.
    But from the looks of it, You are Unable to load performance pack.
    The solution is "Please ensure that libmuxer library is in :'.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    I hope BEA or someone can tell you the file name of libmuxer. And make sure it is in the Folder where the script is searching/looking.
    Good luck.
    fred

  • Custom Event generation and Handling

    HI all,
    I am new to java. I have a dataset which changes dynamically and this dataset is responsible for some other dataset(s). So whenever the original dataset is modified, the other datasets based on this dataset should be updated automatically so as to preserve the consistency.
    What I want to do is to write a custom event which is to be fired whenever the original dataset is modified and notify it to other datasets so as to ensure the consistency.
    Any help in this regard is extremely appreciated.

    HI Duffymo,
    Here is my problem for better understanding:
    I have a vector data in a NodePanel (this vector data originates from some other datastructure...but that is immaterial as we know that this data is an instance of that datastructure). This vectordata in NodePanel is responsible for another vectordata in SchedulePanel. The NodePanel and SchedulePanel are tabbedPanels in a tabbedframe. Whenever I update the vector data in NodePanel, the vector data in SchedulePanel needs to be updated.
    The solution you gave me, taught me an insight of the event handling in Java.
    I am quoting my source for your reference as I am unable to incorporate your idea into my project.
    Event class:
    import java.util.*;
    public class VectorUpdateEvent extends EventObject
         public VectorUpdateEvent(Object source)
              super(source);
    Interface to EventListener
    public interface VectorUpdateListener
         public void eventVectorUpdated(VectorUpdateEvent event);
    class EventGenerator
    import java.util.*;
    public class VectorUpdateEventIssuer
         implements EventListener
         public VectorUpdateEventIssuer()
              listListeners = new ArrayList();
         public synchronized void addVectorUpdateEventListener(VectorUpdateEvent l)
              listListeners.add(l);
         protected synchronized void removeVectorUpdateEventListener(VectorUpdateEvent l)
              listListeners.remove(listListeners.indexOf(l));
         protected void notifyVectorUpdateEvent(Object source)
              VectorUpdateEvent evt = new VectorUpdateEvent(source);
              Iterator itr = listListeners.iterator();
              while (itr.hasNext())
                   ((VectorUpdateListener)itr.next()).eventVectorUpdated(evt);
         private ArrayList listListeners;
    class where the event originates
    class NodePanel
         extends JPanel
         implements ActionListener, ListSelectionListener
         /////////////Constructors/////////////////////////
         public NodePanel()
              addNodeButton = new JButton("Add Node");
              delNodeButton = new JButton("Delete Node");
              dumpNodeButton = new JButton("Dump Node");
              reloadNodeButton = new JButton("Reload Node");
              browseButton = new JButton("Browse Node");
              exitButton = new JButton("Exit");
              add(addNodeButton);
              add(delNodeButton);
              add(dumpNodeButton);
              add(reloadNodeButton);
              add(browseButton);
              add(exitButton);
              setButtonsEnabled(false);
              addNodeButton.addActionListener(this);
              delNodeButton.addActionListener(this);
              dumpNodeButton.addActionListener(this);
              reloadNodeButton.addActionListener(this);
              browseButton.addActionListener(this);
              exitButton.addActionListener(this);
              nodesVector = new Vector();
              nodesList = new JList(nodesVector);
              this.vectorNodeAttributes = new Vector();
              JScrollPane scrollPane = new JScrollPane(nodesList);
              add(scrollPane,BorderLayout.CENTER);
              nodesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
              nodesList.addListSelectionListener(this);
         ////////////////Methods///////////////////////////
         /////////////Event valueChanged///////////////////
         public void valueChanged(ListSelectionEvent evt)
              JList source = (JList) evt.getSource();
              setButtonsEnabled(true);
              desiredNode = (String) source.getSelectedValue();
              if (desiredNode == null)
                   setButtonsEnabled(false);
         //////////////Event actionPerformed////////////
         public void actionPerformed(ActionEvent evt)
              Object source = evt.getSource();
              if (source == addNodeButton)
                   addNodeButtonClicked();
              else if (source == delNodeButton && desiredNode != null)
                   deleteNodeButtonClicked();
              else if (source == dumpNodeButton && desiredNode != null)
                   JFileChooser d = new JFileChooser();
                   //d.setCurrentDirectory("");
                   d.setFileFilter(new XMLFilter());
                   int result = d.showSaveDialog(this);
              else if (source == reloadNodeButton && desiredNode != null)
                   JFileChooser d1 = new JFileChooser();
                   //d.setCurrentDirectory("");
                   d1.setFileFilter(new XMLFilter());
                   int result = d1.showOpenDialog(this);
                   //String filename=d1.getSelectedFile().getName();
              if (source == browseButton && desiredNode != null)
                   browseButtonClicked();
              else if (source == exitButton)
                   System.exit(0);
         //////////Enables or Diables the Buttons////////
         private void setButtonsEnabled(boolean enable)
              delNodeButton.setEnabled(enable);
              dumpNodeButton.setEnabled(enable);
              reloadNodeButton.setEnabled(enable);
              browseButton.setEnabled(enable);
              private void deleteNodeButtonClicked()
              if (noFieldDlg != null)
                   noFieldDlg.dispose();
              noFieldDlg = new NoFieldDialog("Delete the Node?");
              noFieldDlg.show();
              if (noFieldDlg.getDialogResult() == DialogResult.OK)
                   int nodeToRemove=0;
                   for (int i=0; i< vectorNodeAttributes.size(); i++)
                        if(((NodeAttributes)(vectorNodeAttributes.get(i))).getNodeName().compareTo(nodesList.getSelectedValue()) == 0)
                             nodeToRemove = i;
                   vectorNodeAttributes.remove(nodeToRemove);
                   nodesVector.removeElement(nodesList.getSelectedValue());
                   this.nodesList.setListData(nodesVector);
                   NodePanel.nodesPresent = nodesVector;
                   updateStaticNodeList();
    /*************** as soon as the NodePanel.nodesPresent is updated, the changes are to be reflected in the Schedule Panel ******************/
                   VectorUpdateEvent e = new VectorUpdateEvent(this);
                   VectorUpdateEventIssuer v = new VectorUpdateEventIssuer();
                   v.addVectorUpdateEventListener(e);
                   v.notifyVectorUpdateEvent(this);
         ///////////////Data Members////////////////////
         private JButton addNodeButton;
         private JButton delNodeButton;
         private JButton dumpNodeButton;
         private JButton reloadNodeButton;
         private JButton browseButton;
         private JButton exitButton;
         private String desiredNode;
         private OneFieldDialog oneFieldDlg = null;
         private NoFieldDialog noFieldDlg = null;
         private JList nodesList;
         private Vector nodesVector;
         private Vector vectorNodeAttributes;
         private static Vector nodesPresent = null;
    } // end class NodePanel
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    ////////////////Class SchedulePanel////////////////
    class SchedulePanel extends JPanel
    implements ActionListener, ListSelectionListener, VectorUpdateListener
         ////////////////Constructors//////////////////
         public SchedulePanel()
              addScheduleButton = new JButton("Add Schedule");
              delScheduleButton = new JButton("Delete Schedule");
              dumpScheduleButton = new JButton("Dump Schedule");
              reloadScheduleButton = new JButton("Reload Schedule");
              browseScheduleButton = new JButton("Browse Schedule");
              exitButton = new JButton("Exit");
              add(addScheduleButton);
              add(delScheduleButton);
              add(dumpScheduleButton);
              add(reloadScheduleButton);
              add(browseScheduleButton);
              add(exitButton);
              setButtonsEnabled(false);
              addScheduleButton.addActionListener(this);
              delScheduleButton.addActionListener(this);
              dumpScheduleButton.addActionListener(this);
              reloadScheduleButton.addActionListener(this);
              browseScheduleButton.addActionListener(this);
              exitButton.addActionListener(this);
              scheduleVector = new Vector();
              scheduleList = new JList(scheduleVector);
              this.vectorScheduleOperations = new Vector();
              JScrollPane scrollPane = new JScrollPane(scheduleList);
              add(scrollPane);
              scheduleList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
              scheduleList.addListSelectionListener(this);
              //updateEventListener = new VectorUpdateEventIssuer();
              //updateEventListener.addVectorUpdateEventListener(this);
         /////////////Methods///////////////////////
         ////////////Event valueChanged/////////////
         public void valueChanged(ListSelectionEvent evt)
              JList source = (JList)evt.getSource();
              setButtonsEnabled(true);
              desiredSchedule = (String)source.getSelectedValue();
              if (desiredSchedule == null)
                   setButtonsEnabled(false);
         ////////////Event actionPerformed////////
         public void actionPerformed(ActionEvent evt)
              Object source = evt.getSource();
              if (source == addScheduleButton )
                   addScheduleButtonClicked();
              else if (source==delScheduleButton && desiredSchedule!=null)
                   deleteScheduleButtonClicked();
              else if (source == dumpScheduleButton && desiredSchedule!=null)
                   JFileChooser d = new JFileChooser();
                   d.setFileFilter(new XMLFilter());
                   int result = d.showSaveDialog(this);
              else if (source == reloadScheduleButton && desiredSchedule!=null)
                   JFileChooser d1 = new JFileChooser();
                   d1.setFileFilter(new XMLFilter());
                   int result = d1.showOpenDialog(this);
              else if (source == browseScheduleButton && desiredSchedule!=null)
                   browseScheduleButtonClicked();
              else if (source == exitButton)
                   System.exit(0);
         public void eventVectorUpdated(VectorUpdateEvent event)
              System.out.println("Hello! EventRaised");
         ///////////Data Members//////////////////
         private JButton addScheduleButton;
         private JButton delScheduleButton;
         private JButton dumpScheduleButton;
         private JButton reloadScheduleButton;
         private JButton browseScheduleButton;
         private JButton exitButton;
         private String desiredSchedule;
         private OneFieldDialog oneFieldDlg = null;
         private NoFieldDialog noFieldDlg = null;
         private JList scheduleList;
         private Vector scheduleVector;
         private Vector vectorScheduleOperations;
         private VectorUpdateEventIssuer updateEventListener;
    } // end class SchedulePanel
    I hope you understood my problem now. The NodeAttributes is a datastructure containing the node name and an associated table for that. THe ScheduleOperations is similar to the NodeAttributes but it contains a DefaultTableModel which inturn consists of a column which is filled with the list of current nodes available + their schedules.
    I am sorry for my long posting.
    Thanks once again in anticipation.

  • Problem reading custom property file from custom event handler.

    Hi,
    My custom event handler needs some bits of information that I have set up in a property file. However, when the event handler runs it throws a FileNotFound exception - actually its because permission was denied.
    I have added the code System.getProperty("user.name") to find out the actual user that the event handler is running as. It reports that "oracle" is the user.
    That's great. However, the permissions on the file will allow oracle to read/write the file. If I log onto the server where OCDB runs (as oracle), I can vi the file.
    The file is owned by another user, but the "oracle" is a member of the group that has read/write (we're running on a unix box). The file is not 777.
    The event handler is actually calling a static utility method that returns the Properties. This utility is used elsewhere in other custom apps in conjunction with OCDB (on the same server). It works there, so the utility is functioning correctly.
    Is there something going on that I'm missing? Like somehow the event handler is acually runn as somebody else?
    Here is the node log.
    2007/07/17 12:52:16 [oracle.ifs] [37] 434364 system FINE: Error /opt/csc/sfi/configuration/sfi.properties (Permission
    denied) Additional INFO: java.io.FileNotFoundException: /opt/csc/sfi/configuration/sfi.properties (Permission denied)
    Thanks in advance for the help.
    Winston

    Matt,
    Sorry to have wasted your time. It was a server reboot issue. The ocdb server hasn't been restarted since early July. We added the users and groups late last week. Although we tested on line, the server wasn't quite up to speed with the new changes.
    We bounced the server and all is well.
    Thanks
    Winston

  • Implementing Custom Event - non-static referencing in static context error

    Hi,
    I'm implementing a custom event, and I have problems adding my custom listeners to objects. I can't compile because I'm referencing a non-static method (my custom addListener method ) from a static context (a JFrame which contains static main).
    However, the same error occurs even if I try to add the custom listener to another class without the main function.
    Q1. Is the way I'm adding the listener wrong? Is there a way to resolve the non-static referencing error?
    Q2. From the examples online, I don't see people adding the Class name in front of addListener.
    Refering to the code below, if I remove "Data." in front of addDataUpdatelistener, I get the error:
    cannot resolve symbol method addDataUpdateListener (<anonymous DataUpdateListener>)
    I'm wondering if this is where the error is coming from.
    Below is a simplified version of my code. Thanks in advance!
    Cindy
    //dividers indicate contents are in separate source files
    //DataUpdateEvent Class
    public class DataUpdateEvent extends java.util.EventObject
         public DataUpdateEvent(Object eventSource)
              super(eventSource);
    //DataUpdateListener Interface
    public interface DataUpdateListener extends java.util.EventListener
      public void dataUpdateOccured(DataUpdateEvent event);
    //Data Class: contains data which is updated periodically. Needs to notify Display frame.
    class Data
    //do something to data
    //fire an event to notify listeners data has changed
    fireEvent(new DataUpdateEvent(this));
      private void fireEvent(DataUpdateEvent event)
           // Make a copy of the list and use this list to fire events.
           // This way listeners can be added and removed to and from
           // the original list in response to this event.
           Vector list;
           synchronized(this)
                list = (Vector)listeners.clone();
           for (int i=0; i < list.size(); i++)
                // Get the next listener and cast the object to right listener type.
               DataUpdateListener listener = (DataUpdateListener) list.elementAt(i);
               // Make a call to the method implemented by the listeners
                  // and defined in the listener interface object.
                  listener.dataUpdateOccured(event);
               System.out.println("event fired");
    public synchronized void addDataUpdateListener(DataUpdateListener listener)
         listeners.addElement(listener);
      public synchronized void removeDataUpdateListener(DataUpdateListener listener)
         listeners.removeElement(listener);
    //Display Class: creates a JFrame to display data
    public class Display extends javax.swing.JFrame
         public static void main(String args[])
              //display frame
              new Display().show();
         public Display()
         //ERROR OCCURS HERE:
         // Non-static method addDataUpdateListener (DataUpdateListener) cannot be referenced from a static context
         Data.addDataUpdateListener(new DataUpdateListener()
             public void dataUpdateOccured(DataUpdateEvent e)
                 System.out.println("Event Received!");
    //-----------------------------------------------------------

    Calling
        Data.someMethodName()is referencing a method in the Data class whose signature includes the 'static' modifier and
    might look something like this:
    class Data
        static void someMethodName() {}What you want is to add the listener to an instance of the Data class. It's just like adding
    an ActionListener to a JButton:
        JButton.addActionListener(new ActionListener()    // won't work
        JButton button = new JButton("button");           // instance of JButton
        button.addActionListener(new ActionListener()     // okay
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.swing.*;
    public class EventTest extends JFrame
        Data data;
        JLabel label;
        public EventTest()
            label = getLabel();
            data = new Data();
            // add listener to instance ('data') of Data
            data.addDataUpdateListener(new DataUpdateListener()
                public void dataUpdateOccured(DataUpdateEvent e)
                    System.out.println("Event Received!");
                    label.setText("count = " + e.getValue());
            getContentPane().add(label, "South");
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            setSize(300,200);
            setLocation(200,200);
            setVisible(true);
        private JLabel getLabel()
            label = new JLabel("  ", JLabel.CENTER);
            Dimension d = label.getPreferredSize();
            d.height = 25;
            label.setPreferredSize(d);
            return label;
        public static void main(String[] args)
            new EventTest();
    * DataUpdateEvent Class
    class DataUpdateEvent extends java.util.EventObject
        int value;
        public DataUpdateEvent(Object eventSource, int value)
            super(eventSource);
            this.value = value;
        public int getValue()
            return value;
    * DataUpdateListener Interface
    interface DataUpdateListener extends java.util.EventListener
        public void dataUpdateOccured(DataUpdateEvent event);
    * Data Class: contains data which is updated periodically.
    * Needs to notify Display frame.
    class Data
        Vector listeners;
        int count;
        public Data()
            listeners = new Vector();
            count = 0;
            new Thread(runner).start();
        private void increaseCount()
            count++;
            fireEvent(new DataUpdateEvent(this, count));
        private void fireEvent(DataUpdateEvent event)
            // Make a copy of the list and use this list to fire events.
            // This way listeners can be added and removed to and from
            // the original list in response to this event.
            Vector list;
            synchronized(this)
                list = (Vector)listeners.clone();
            for (int i=0; i < list.size(); i++)
                // Get the next listener and cast the object to right listener type.
                DataUpdateListener listener = (DataUpdateListener) list.elementAt(i);
                // Make a call to the method implemented by the listeners
                // and defined in the listener interface object.
                listener.dataUpdateOccured(event);
            System.out.println("event fired");
        public synchronized void addDataUpdateListener(DataUpdateListener listener)
            listeners.addElement(listener);
        public synchronized void removeDataUpdateListener(DataUpdateListener listener)
            listeners.removeElement(listener);
        private Runnable runner = new Runnable()
            public void run()
                boolean runit = true;
                while(runit)
                    increaseCount();
                    try
                        Thread.sleep(1000);
                    catch(InterruptedException ie)
                        System.err.println("interrupt: " + ie.getMessage());
                    if(count > 100)
                        runit = false;
    }

  • How to queue custom events with out using af:calientListener.- onKeyUp.

    Hi,
    I have a custom component ( extending richinput text).
    defined a new attribute called "onkeyup" and added necessary logic in Renderer. Some thing like
    write.writeAttribute("onkeyup" , "handleEvent()");
    I rendered the java script code too ..... in my custom renderer. ( I neigther want to write java script in metaContainer of document tag nor wants to use resource tag..)
    and the handleEvent code is something like this.
    function handleEvent()
    In this method i want to write the code which pushes my custom event to the queue.
    some thing like this..
    component = event.getSource();
    AdfCustomEvent.queue(component, "customEvent",{payload:component.getSubmittedValue()}, true);
    event.cancel();
    Usually if use a clientListener then it will call the method {  handleEvent(event)  } passing event parameter so that we can get the source of that event.
    But as i dont want to use the clientEventListener.... as of now... i can't get the component because i don have the event object with my method.
    So could any one please letme know , how can i queue my custom event in to my customcomponent... with out using ClientListeners.
    Edited by: mchepuri on Nov 9, 2009 10:04 AM

    Hi,
    AFAIK, you cannot queue an event to the serverListener without a clientListener.
    -Arun

  • Custom Event generation

    My question is in relation to generating events. Is there any means in Java to write your own custom Events. What I am looking for is to be able to produce an event and have the actionPerformed method react to it. If this is not possible, then writting my own interface similar to ActionListener and fully implementing it to act in the same way, except that it only listens to events that I have generated. Is this possible, or do I have to hit assembler and make my own ISR's and have it interface with Java somehow?
    Any guidance would be appreciated

    You can generate your custom events and it is very easy.
    You will have to extend the EventObject class in order to make an class representing the event.
    Iam giving a brief eg:
    class MyEvent extends EventObject
    MyEvent(Object source)
    super(source);//source which generated the event.
    //your own code
    interface MyEventListener
    public void myEventPerformed(MyEvent e);
    class abc
    java.util.ArrayList arr;
    abc
    arr = new java.util.ArrayList();
    public synchronized void addMyEventListener (MyEventListener l)
    arr.add(l);
    public synchronized void removeMyEventListener (MyEventListener l)
    arr.remove(arr.indexOf(l));
    protected void notifyTransEvent(Object source)
    MyEvent tEvent = new MyEvent(source);
    Iterator itr = arr.iterator();
    Iterator itr = arr.iterator();
    while(itr.hasNext())
    ((MyEventListener)itr.next()).myEventPerformed(tEvent);
    Now anyone implementing the MyEventListener inetrface can be added in the ArrayList.The ArrayList is the list representing the interesting parties who want to receive the event.When registered they will receive the event.
    This class abc is just like an component which on certain situations generate event.You can call notifyEvent in any case where you want the event to be generated.
    You will then add this class to your main class as this
    class xyz implements MyEventListener
    abc obj;
    xyz()
    obj.addMyEventListener(this);
    public void myEventPerformed(MyEvent e)
    //your handling code
    }

  • Observable vs Custom Events

    Hi.
    I'm creating a project that uses the MVC design pattern, and being eager to make sure I follow the best practices I have a couple of questions. When notifying a 'View' of changes to the 'Model' is it preferable to effect this notfication using the Observer/Observable pattern, or through a custom eventListener? I can understand that the Observer/Observable way of doing things allows the View to be completely independant of the Model. However if I were to use custom events and eventListeners it would certainly make things easier to read and implement (my model is quite a large beast, comprising of multiple sub-models), as I would be able to provide more information about the change with each notification.
    Is the answer to this just personal preference, or is there a convention?
    Thanks in advance.

    EventListener is an example of the [Subject] Observer
    pattern.
    If you are using swing/awt then use EventListener, if
    you wish to decouple your implementation from
    swing/awt, then implement your own solution based on
    the [Subject] Observer pattern.I disagree. Swing/awt have nothing to do with this. EventListener, EventObject, Observer, and Observable all belong to java.util. In theory you could do this without using any of these classes and making the event and listeners yourself without extending anything from java.util.
    Observer and Observable is good for a one to one relationship. It is quick, easy to do, and you don't have a lot to worry about. Multiple Observers watching one Observable is also nice. It is when you start watching multiple Observable classes that things get messy. Observer has one method that all Observable classes call. You have to do a lot of checking to see which class the Observable is before you know how to handle it.
    IMO the biggest disadvantage to Observer and Observable, is that something must extend Observable. This is bad if the class you want to observe extends something else. Instances of Observer and Observable are also bound tightly together.
    Events and Listeners are not bound together. Typically once the event is processed, it is disposed unless you want to save it and use it over and over. When using multiple listeners and events, you would implement each listener (or make anonymous) and it would have its own methods for a specific event, and not one large update method that handles everything. The events would be constructed as needed, and passed to the listeners.
    You are not limited to extend Event like you are with Observable. If you tried to handle an Observable the same way as an Event, you would have to register the Observable with the Observer, notify the Observer, then remove the Observable.
    Event/Listener is awesome for multithreading. You could write a Thread and Queue to manage all of your events (Similar to the AWTEventQueue). A class could put an event into the queue to be processed at a later time (or right away) by another thread. The Observer/Observable relationship cannot support this easily.
    The disadvantage is that you have to handle sending an event to each listener manually, where the Observer/Observable handles that on its own.
    In summary, Observer/Observable is a slightly more limitted version of Event/Listener, but it handles notifying the Observer/Listener on its own.

  • Custom Event

    I need to communicate between two different controllers associate with different sections of FXML.
    I create a custom even and implemented an event handler in one of my controllers.
    I can not seem to figure out how to fire the custom event from my other controller. So far the documentation I have found doesn't fill in the blank about firing an event from a controller or even any other class than one that already has .fireEvent as a member.
    Am I using the wrong design pattern here or is there an easy solution to fire an event?
    pseudo
    public class myEvent extends Event {
         private static final long serialVersionUID = 1261846397820142663L;
         public static final EventType<myEvent >MY_EVENT = new EventType<myEvent >(ANY, "MY_EVENT");
         public myEvent (EventType<? extends Event> arg0) {
              super(arg0);
              // TODO Auto-generated constructor stub
         public myEvent () {
              this(MY_EVENT);
    public class myClass implements EventHandler<myEvent> {
         @Override
         public void handle(TimelineDropEvent arg0) {
              // TODO Auto-generated method stub
              System.out.println("MyEvent");
    public class myOtherClass {
    //TODO what do I do here to fire an event
    }Obviously both of my sample classes also implement Initializable since they are controllers.
    In my event do I absolutely need serialVersionUID or is there another way to avoid the warning associated with removing it?

    Sorry for the delay. I had to create a Google Code project to host the example:
    http://code.google.com/p/sjmb/
    The source code for the message bus API is here:
    http://code.google.com/p/sjmb/source/browse/#svn%2Ftrunk%2Fsjmb%2Fsrc%2Fcom%2Foracle%2Fsjmb
    It essentially allows callers to subscribe to "message topics", which are simply Java types. Any time an instance of a given type is sent, subscribed listeners are notified. Any Java type can be used including enums, which provide a nice, type-safe way to define messages.
    An example demonstrating how to use the API is here:
    http://code.google.com/p/sjmb/source/browse/#svn%2Ftrunk%2Fsjmb%2Ftest%2Fcom%2Foracle%2Fsjmb%2Ftest
    The main application window presents a tab pane containing 3 identical tabs. Each tab's controller subscribes to a message of type com.oracle.sjmb.test.Message. Entering text in the text field and pressing the "Send Message" button sends a new message, causing the other two tabs to update the contents of their own text fields to match.
    The example application consists of the following files:
    Message.java - the message class
    MessageBusTest.java - the main JavaFX application class
    message_bus_test.fxml - FXML document containing the main scene
    tab.fxml - FXML document containing tab pane content
    TabController.java - tab content controller
    Javadoc and binaries are available here:
    http://code.google.com/p/sjmb/downloads/list
    Please note that this is an example only and is not an official part of any Oracle product. Let me know if you have any questions.
    Greg

  • Custom Event Bubble

    I'm new to flex and how it handles Event Bubbling.  I can make a custom event work with this code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   applicationComplete="init()" name="app">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import flash.events.Event;
                import mx.controls.Alert;
                private function init():void {
                    addEventListener("myEvent",testListener);
                    var testEvent:Event = new Event("myEvent",true);
                    dispatchEvent(testEvent);
                private function testListener(event:Event):void {
                    Alert.show("Trigger Worked");
            ]]>
        </fx:Script>
    </s:Application>
    But when I break out the code so the Event fires in a class the parent does not catch it.
    MyEvent.as file:
    package comp {
        import flash.display.MovieClip;
        import flash.events.Event;
        public class MyEvent extends MovieClip{
            public function MyEvent() {
                var testEvent:Event = new Event("myEvent",true);
                dispatchEvent(testEvent);
    TestEvents.mxml file:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   applicationComplete="init()" name="app">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import comp.MyEvent;
                import flash.events.Event;
                import mx.controls.Alert;
                private function init():void {
                    addEventListener("myEvent",testListener);
                    var tempEvent:MyEvent = new MyEvent();
                private function testListener(event:Event):void {
                    Alert.show("Trigger Worked");
            ]]>
        </fx:Script>
    </s:Application>
    I know I'm missing something simple.  Could someone please point me in the correct direction.
    Thanks,
    Sol

    Thanks for the help!!!  I got it to work using most of your code.  The only change I had to make was move the dispatchEvent out of the construtor and into it's own function.  That way the listener is definded before it fires.
    Now I noticed you added the listener to the object itself is this bubbling?  I thought if you have bubbling turned on the main app can have the listener and if a child fires an event it would bubble up.  If the listerner is not on the MyEvent class it does not work.
    Here is the new Working code if you take the : tempMyEvent off this line:
    addEventListener(MyEvent.MY_EVENT, myEventHandler);
    it does not work
    Should it?  Should the event bubble up and still be fired?
    Below is working code:
    MyEvent.as
    package comp {
        import flash.display.MovieClip;
        import flash.events.Event;
        public class MyEvent extends MovieClip{
            public static const MY_EVENT:String = 'myEvent';
            public function MyEvent() {}
            public function disEventTest():void {
                dispatchEvent(new Event(MyEvent.MY_EVENT,true));
    TestEvents.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   applicationComplete="init()" name="app">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import comp.MyEvent;
                import flash.events.Event;
                import mx.controls.Alert;
                private function init():void {
                    var tempMyEvent:MyEvent = new MyEvent();
                    tempMyEvent.addEventListener(MyEvent.MY_EVENT, myEventHandler);
                    tempMyEvent.disEventTest();
                private function myEventHandler(event:Event):void {
                    Alert.show("Trigger Worked");
            ]]>
        </fx:Script>
    </s:Application>
    Thanks again for your help this will at least get me moving forward again.
    Sol

  • How to define custom event and how to trigger the defined event

    hi,guys
    hurry issue....................hope get help.
    I am using oracle weblogic 10gr3 portal.and we choiced java portlet.as of now,we got some question about custom Event.hope you can give some idea....
    thank you so much.
    question detail:
    1.for java portlet ,how to define custom event.
    2.how to trigger this event.
    3 about the data,may be sometime need to transit Biz data.
    auctully,I just want to implements between two portlets communicate.
    for example:
    existing portletA,portletB.
    portletA is a list,like:
    A AA <button>
    after I click this buttom,then portletB will be effect,it means they are interact with each other.
    does anybody hit this issue before,if you solved pls share me .
    thank you for you help....

    Hello,
    Please note that everything below applies to JSR168 portlets ONLY- JSR286 portlets and other portlet types handle events a little differently.
    From inside your JSR168 portlet you can send an event during processAction or when receiving another event by using the PortletBackingContext object, such as:
    import javax.portlet.ActionResponse;
    import javax.portlet.ActionRequest;
    import javax.servlet.http.HttpServletRequest;
    import com.bea.netuix.servlets.controls.portlet.backing.PortletBackingContext;
    public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
    HttpServletRequest httpRequest = (HttpServletRequest) actionRequest.getAttribute("javax.servlet.request");
    PortletBackingContext portletBackingContext = PortletBackingContext.getPortletBackingContext(httpRequest);
    portletBackingContext.fireCustomEvent("customEvent", "This is a custom event");
    To receive an event, in your .portlet file you just need to put in a "handleCustomEvent" tag specifying which method to call when the event is received, such as:
    <?xml version="1.0" encoding="UTF-8"?>
    <portal:root xmlns:netuix="http://www.bea.com/servers/netuix/xsd/controls/netuix/1.0.0"
    xmlns:portal="http://www.bea.com/servers/netuix/xsd/portal/support/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/servers/netuix/xsd/portal/support/1.0.0 portal-support-1_0_0.xsd">
    <netuix:javaPortlet title="Listening Portlet" definitionLabel="yourPortletName">
    <netuix:handleCustomEvent event="customEvent" eventLabel="customEvent" filterable="true" description="custom event handler">
    <netuix:invokeJavaPortletMethod method="processCustomEvent"/>
    </netuix:handleCustomEvent>
    </netuix:javaPortlet>
    </portal:root>
    Then, in your receiving portlet the method "processCustomEvent" would receive the event, such as:
    public void processCustomEvent(ActionRequest actionRequest, ActionResponse actionResponse, Event event)
    The event payload can be any Serializable object you want, but for forward-compatibility with JSR286 it would be ideal if it had a valid JAXB binding.
    Kevin

  • Regarding custom events

    I got some difficulties using custom event listeners.
    What I would like to achieve is pretty simple. With a bunch
    of movable fruits, when dragging one of them(this becomes the
    'active' object) to collide with others(these are the 'inactive
    objects'), I need Flash to tell me who is colliding whom.
    So I setup the Fruit Class, with the ability to dispatch and
    listen the custom event: "EXECUTE_HITTEST". For me the code looks
    good, but there's must be something wrong...
    The full .fla & .as files can be downloaded
    here, and you can
    preview
    the
    snapshot here.
    Thanks in advance.
    It's in the .zip file as well but for your convenience I just
    put the Fruit Class here:
    ================================================================

    your event (and everything else in your class) is specific to
    class instances. no two instances can communicate with each other
    directly.
    you can create another class that contains references to them
    all, but that won't get you any further than using each instance to
    get to the root timeline which then allows access to the others.
    there are several strategies for increasing efficiency of
    hitTests. i like to use a grid.
    imagine the stage divided into a grid. if your objects are
    not changing position with time t, you have an easy task. if they
    change position with time, you'll have more work to do.
    but for each time t, each grid contains a list of objects
    within it. for each time t, each object has a property referencing
    the grid within which it's contained.
    when you want to perform a hittest for a particular object,
    check its grid. then execute a hittest against all objects in that
    grid and the eight (assuming rectangular shaped) surrounding grids.
    there are several strategies for picking a grid size. but, in
    general, you don't want grids to be so small that when you check
    for collisions, you have to check beyond the surrounding 8 plus the
    center grid.

Maybe you are looking for

  • How do i transfer photos from camera roll to photostream on my iPad2?

    I have 100s of pics on my iPad2 and set up Photostream ages ago, but only 2 pics are on it. I want to transfer all of my photos to Photostream so they appear in iCloud and so I can delete them from iPad2 and free up storage space. How do I do this?

  • How do I transfer Notes from my iPhone4s and iPad to my new MacBook Pro?

    How do I transfer Notes from my iPhone4s and iPad to my new 13" MacBook Pro with retina display?

  • Text not showing properly in Internet Explorer

    I am in the process of redeveloping a website for a client. My text is not cooperating in  internet explorer. The url is www.ragrouponline.com.Please complare it with Firefox and IE. What is cause this difference?

  • Wall adapter issues ?

    Hi, Recently one of my parents heard on the radio that it was dangerous to keep the iphone wall adapter plugged in while nothing was connected to it. I thought it was silly and I believe he's wrong. Now I want to prove it, but I can't seem to find an

  • Enterprise Manager / Guest stuck as "Editing"

    There is a bug in EM Grid Control with OVM where if a guest is in Error, and you edit it, it will allow the edit but then error out. The issue is that EM thinks the edit is successful (all the steps show it as successful), but if you dig into the pro