Events,firing,listening-GUI/Networking seperation.

I'm having a little trouble finding info on how to write my own events, event listeners and then how to fire these events. Basically i want to listen on a socket for info and then fire an event. I want to have a JList listen for this event and update itself.
I'm not sure if this is the best way to do it but I'd really be interested in any ideas or pointers to info on other ways this could be done.
Cheers.
-T

1. By default, reading from a socket blocks, so the simplest thing to do is start a thread to do the reading. (I haven't checked the i/o facility for polling in 1.4, but that would help if you were listening to several sockets).
2. Once you read some data, you need to update your ListModel. If you're using DefaultListModel, you're laughing because it manages its listener list and fires off events for you. But see point 4.
3. If you are subclassing AbstractListModel, you would need to call the appropriate fire*() method whenever your model changes state.
4. Watch out for Swing and threads. Listeners assume their being called in the EDT (Event Dispatch Thread). Typically, this means your socket reading thread uses SwingUtilities method invokeLater().
--Nax

Similar Messages

  • QT in html, events fired and movie internals doc

    Hi,
    The Javascript Scripting Guide says under "Executing JavaScript Functions From QuickTime", page 11:
    Wired actions can be triggered by user interaction, as a result of a frame in the movie being displayed, or as the
    result of arbitrary wired calculations.
    It also briefly describes (page 23) the matrix and rectangle properties, saying "You can use a movie’s transformation matrix to scale, translate, and rotate the movie image. For details on the transformation matrix, see Movie Internals."
    And the Rectangle is defined as "void SetRectangle(string rect)"
    Where can I find the reference to the events fired by QT automatically ?
    Where can I find this Movie Internals description ?
    I'm not very familiar with javascript... That's not a QT issue, but where can I find a description of the rect ?
    Many thanks
    Jean-Pierre
      Windows XP Pro  

    Yes, you can navigate to other pages using buttons/code in an swf file.  And you can trigger an event as well, though I don't know if that's what you intended to say if navigating to another page is what you are really after.
    In AS3, to make a button work with code, you need to add an event listener and event handler function for it.  You might need to add a few (for different events, like rollover, rollout, clicking it, but for now we'll just say you want to be able to click it to get a web page to open.  In the timeline that holds that button, in a separate actions layer that you create, in a frame numbered the same as where that button exists, you would add the event listener:
    btn1.addEventListener(MouseEvent.CLICK, btn1Click);
    The name of the unique function for processing the clicking of that button is specified at the end of the event listener assignment, so now you just have to write that function out:
    function btn1Click(evt:MouseEvent):void {
       var url:String = "http://www.awebsite.com/awebpage.html";
       var req:URLRequest = new URLRequest(url);
       navigateToURL(req);

  • Event Handling without GUI!!!!

    Hi everybody,
    I want to design a mult-threaed application which will process Key events without displaying any GUI components! (I know it is stupid but these are the requirements). I tried to use java.awt.event.*; but it seems that it is not working without displaying anything. Is there any method to capture keyboard events without using GUI components?
    Thank you very much in advance,

    Do you mean you want your program running on the
    console? while having Events dispatched!!Yes, I am also stuck in a similar problem.
    I want to detect mouse move system wide. The problem is that, my code recognizes mouse move only on components those are added in my program.
    i.e., if I add a frame then MouseMove (or any AWTEvent)will be listened by the AWTEventListener on that frame only. And I want such a Listener which can listen to System-wide Mouse events so that I can capture mouse position throught the System at any random time.
    I hope someone will have any link to my topic and will provide me any kind of knowledge.

  • Qt_ended Event firing in IE

    I want to add image at end of quicktime movie,for that i m firing qt_ended and its working alright in Firefox,for IE im getting confused abt what change i have to made.Read the tutorial here http://developer.apple.com/library/safari/#documentation/QuickTime/Conceptual/QT ScriptingJavaScript/bQTScripting_JavaScri_Document/QuickTimeandJavaScri.html#//appleref/doc/uid/TP40001526-CH001-SW6 But unable to make it work.If someone can please give me some example for making me do above functionality in IE.Below is my code
    <script src="AC_QuickTime.js" language="JavaScript" type="text/javascript">
    </script>
    <script language="JavaScript" type="text/javascript">
    <!--
    /* define function that shows percentage of movie 1 loaded */
    function showProgress()
    var percentLoaded = 0 ;
    percentLoaded = parseInt((document.movie1.GetMaxTimeLoaded() / document.movie1.GetDuration()) * 100);
    document.getElementById("loadStatus1").innerHTML = 'Movie loading: ' + percentLoaded + '% complete...';
    /* define function that executes when movie1 loading is complete */
    function movieLoaded()
    document.getElementById("loadStatus1").innerHTML = "Movie Loaded" ;
    /* define function that shows percentage of movie 2 loaded */
    function showProgress2()
    var percentLoaded = 0 ;
    percentLoaded = parseInt((document.movie2.GetMaxTimeLoaded() / document.movie2.GetDuration()) * 100);
    document.getElementById("loadStatus2").innerHTML = 'Movie loading: ' + percentLoaded + '% complete...';
    /* define function that executes when movie2 loading is complete */
    function movieLoaded2()
    document.getElementById("loadStatus2").innerHTML = "Movie Loaded" ;
    /* define function that adds another function as a listener for a DOM event */
    function myAddListener(obj, evt, handler, captures)
    if ( document.addEventListener )
    obj.addEventListener(evt, handler, captures);
    else
    // IE
    alert("IN IE");
    obj.attachEvent('on' + evt, handler);
    /* define functions that register each listener */
    function RegisterListener(eventName, objID, embedID, listenerFcn)
    var obj = document.getElementById(objID);
    if ( !obj )
    obj = document.getElementById(embedID);
    if ( obj )
    myAddListener(obj, eventName, listenerFcn, false);
    function alertonend()
    //document.getElementById("loadStatus2").innerHTML = "Movie Loaded" ;
    alert("HEREEE");
    /* define a single function that registers all listeners to call onload */
    function RegisterListeners()
    RegisterListener('qt_progress', 'movie1', 'qtmovie_embed', showProgress);
    RegisterListener('qt_load', 'movie1', 'qtmovie_embed', movieLoaded);
    RegisterListener('qt_progress', 'movie2', 'qtmovie_embed2', showProgress2);
    RegisterListener('qt_load', 'movie2', 'qtmovie_embed2', movieLoaded2);
    RegisterListener('qt_ended', 'movie1', 'qtmovie_embed', alertonend);
    //-->
    </script>
    Two Movies with JavaScript Play/Stop Controls
    and Progress/Load Monitors
    <script language="javascript" type="text/javascript">
    QT_WriteOBJECT('b.mp4', '760','416', '', 'obj#id', 'movie1', 'emb#id', 'qtmovie_embed', 'emb#name', 'movie1', 'postdomevents', 'true', 'enablejavascript', 'true');
    </script>   
    <!--<script language="javascript" type="text/javascript">
    QTWriteOBJECT('samplesorenson.mov', '360','256', '', 'obj#id', 'movie2', 'emb#id', 'qtmovie_embed2', 'emb#name', 'movie2', 'postdomevents', 'true', 'enablejavascript', 'true');
    </script>-->
    <table width="100%">
    <tr>
    <td align="center">
    MOVIE LOADING...
    </td>
    <td align="center">
    MOVIE LOADING...
    </td>
    </tr>
    <tr>
    <td align="center">
    Play 1
    </td>
    <td align="center">
    Play 2
    </td>
    </tr>
    <tr>
    <td align="center">
    Stop 1
    </td>
    <td align="center">
    Stop 2
    </td>
    </tr>
    </table>

    Very curious to see answers to this post — I'm not getting a 'qt_ended' event in either Safari or Firefox (3.5.2). Nor were some of the other events firing (qt_timechanged comes to mind). Have noticed numerous messages on boards regarding troubles with the QT events, so I may just keep using my workarounds -- setInterval() monitoring loops.
    N

  • How to Disable Event firing while updating a list item using poweshell

    Hi All,
    I am working on a powershell code which updates most of the list items in the entire web application. I am using SystemUpdate($false) to update the items so that 'modified' and 'modified By' and versions are not changed.
    However event receivers gets fired which is now a problem. I want to disable the Event receivers before update and enable it after update. I want powershell code for this. I am using SharePoint 2010.
    Your help would be much appreciated. Thank you in anticipation.
    Regards
    Karthik R.

    hi
    check this thread:
    How to disable event firing outside an event. It contains example on C#, but it is not difficult to convert it to PowerShell.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • Event Fired when a mxml component is shown on screen

    hello,
    I have following application structure nested up to 2/3 level.
    Application
         linkbar connected to viewstack
         viewstack
              NavigatorContent
                   mxml Component
              NavigatorContent
                   mxml Component
    mxml componet in turn has similar structure
    componet
         linkbar connected to viewstack
         viewstack
              NavigatorContent
                   mxml Component
              NavigatorContent
                   mxml Component
    and end component is form which is shown and actions performed
    I want to execute specific code when the form is first time shown
    which will collect data from server and will show for further actions.
    User will edit/delete/update data with various button clicks.
    I tried activate event on end component but it seems that it wont get
    fired at all. End components are enclosed in BorderContainer or Group.
    To test activate event I have used Alert.show only but popup is not shown
    when I select link button on penutimate linkbar.
    If I am doing something wrong please let me know as well please
    guide me which event shall I use so that whenever linkbutton is
    pressed on linkbar it will fire that event. In that event I can check
    whether it has been called earlier by checking some variable which
    will be null in creation complete and set in event fired when linkbutton is pressed.
    Thanks and regards
    Raja

    I think 'creationComplete' is the closest event to what you are looking for.

  • First event fired to event structure

    Hi all,
       Does anyone know what's the first event being fired to the event structure on VI startup? I set a breakpoint on the event structure and it breaks. However i wasn't able to capture whats the event.
    My intention was simple; i have a table which list all the IO names and values. So during VI startup, i wan to populate the IO names first. Then in a timed-loop, the values are updated respectively. In this case, i don't need to "refresh" the table every time which waste time and resources.
    It something like the OnLoad event.
    Another way out is to register an user event, and have this event fired during application startup. But i wonder if anyone has a better way?
    Many thanks!

    j3r3mi wrote:
    My intention was simple; i have a table which list all the IO names and values. So during VI startup, i wan to populate the IO names first. Then in a timed-loop, the values are updated respectively. In this case, i don't need to "refresh" the table every time which waste time and resources.
    Why don't you show us some code.
    Are the IO name static for the duration of the program? Are you using a regular table column or the "row header strings []" property for the IO names?
    If you want to write the row headers at the start of the program, place the code before the main loop containing the event structure. No event case needed. If you have a specific event to update the table headers if needed, fire the event once at startup using a signaling value property, again with the property node placed before the main loop.
    LabVIEW Champion . Do more with less code and in less time .

  • Disable event firing while updating list item in custom timer job

    Hi
    I am adding new items in the list usign custom timer job.
    While adding the items in the list event receiver of another list (which is not related to list which is updating) is getiing fired due to which I am getting data wrongly updated and exceptions are comming.
    why the another lists event recevier is executing while updating my list?
    How can I disable event firing from timer job code?
    please suggest any solution

    Hello,
    It seems you have deployed your event receiver globally and it is applied to all the lists. I can suggest two ways:
    1. Either you update your event receiver feature.xml file and attached to specific list, wherever you want. You can follow below link to attach event with specific list via code:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceiverdefinition.aspx
    Or instead of code you can also pass ListUrl in feature.xml file:
    http://msdn.microsoft.com/en-us/library/ff398052.aspx
    2. OR delete event receiver from the list: You can use below code in your timer job to delete event receiver
    http://sarangasl.blogspot.in/2009/11/remove-event-receiver-in-sharepoint.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • [svn:osmf:] 11159: Updating unit test with a check to all expected events firing properly.

    Revision: 11159
    Author:   [email protected]
    Date:     2009-10-26 12:12:10 -0700 (Mon, 26 Oct 2009)
    Log Message:
    Updating unit test with a check to all expected events firing properly.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkIntegrationTest/org/osmf/content/TestContentElementInt egration.as

    camickr wrote:
    Do you really expect us to read all that code to try and understand what you are attempting to do?
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
    http://homepage1.nifty.com/algafield/sscce.html
    Absolutely not, I wouldn't post such a large amount of code expecting people to read it. I indicated that I believe my error only lies within one of two classes, and that I highlighted the two methods with comments.
    I was told to create an SSCCE as you have mentioned, but I believe all of this code is necessary for the program to run properly, so I only provided it all for compilation purposes.
    I'll check the examples posted, and if I need to I'll see if I can change my methods to use the swing timer class as the first reply mentions, but I did not think this would be necessary.
    Edited by: Drew___ on Nov 29, 2007 3:28 AM
    I have just figured out what my problem was, sorry it was quite a simple mistake. When checking for user input, I was immediately resetting the eventFlag or something afterwards. This meant the object would stop moving as it couldn't remember my last keypress. Thanks for your help, those tutorials are really good.

  • Event firing multiple times (et_Got_Focus)

    Hi,
    I just noticed while debugging my Add On code that the et_Got_Focus event which I have added to my event filters is triggered 64 times when I change a field value and then move to a different field.  This not only happens in the matrix when changing field values and tabbing through but also in the header fields.
    This has got to be a bug and it is not only slowing down the A/P Invoice form but it is potentially very dangerous to have an event firing 64 times when it should only be fired once. 
    To test this all one needs to do is add the et_Got_Focus event to the event filter with the A/P Invoice form, then add a debug statement to write out the itemvalue properties and you will see once you edit a value and tab you will get 64 statements that are the et_Got_Focus event, BeforeAction false for the same field or column when it should only occur once.
    I have a very digrunted client that is very frustrated due to the amount this slows down data entry in the A/P Invoice.  I cannot get rid of this event because there is a particular field I am monitoring for the got focus event so I can stop it under certain circumstances.
    If anyone else has experienced this or knows how to resolve this please let me know.  I guess if I don't find out why this is happening I will post a CSN to SAP.
    Thanks very much,
    David Wall
    Here is a sample of my debug output messages for one update of a single field and then tabbing out:
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False

    Hi David,
    We at Self Informatique France have the same problem of getfocus firing many times at one of our customers in Algeria although wae are not using formated search.Any solution ?
    Best Rgds.
    Antoine Egeileh
    President
    Self Informatique
    [email protected]

  • Getting Error : Exception sending context initialized event to listener

    I am using JWSDP1.2 and tomcat that's bundled with it.
    I am trying out a simple jsf appln very similar to the "Usernamebean" example.Each time i deploy my war file and try to access my webapp, i get the following error in tomcat's log. Driving me nuts !
    Jun 12, 2003 12:23:04 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /finaljsf from URL jar:file:/C:/jwsdp-1.2/webapps/finaljsf.war!/
    Jun 12, 2003 12:23:05 AM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigListener
    javax.faces.FacesException: javax.faces.application.ApplicationFactory
         at javax.faces.FactoryFinder.getImplementationName(FactoryFinder.java:400)
         at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:203)
         at com.sun.faces.config.ConfigParser.parseConfig(ConfigParser.java:91)
         at com.sun.faces.config.ConfigListener.contextInitialized(ConfigListener.java:127)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3670)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4106)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:843)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:827)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:623)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:315)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:837)
         at org.apache.catalina.manager.ManagerServlet.install(ManagerServlet.java:712)
         at org.apache.catalina.manager.HTMLManagerServlet.install(HTMLManagerServlet.java:306

    I was using an older version of tiles.jar. Hence the error. Started working after I moved to the latest version of struts.jar

  • SEVERE: Exception sending context initialized event to listener instance

    Hi,
    I am seeing the following error when trying to deploy my war file using tomcat 6.0.18. War file is built with JSF 1.2 and Java 1.6.0_12. Could anyone please let me know what could be the reason.
    Thanks.
    Jun 12, 2009 3:09:37 PM com.sun.faces.config.ConfigureListener contextInitialized
    WARNING: JSF1059: WARNING! The com.sun.faces.verifyObjects feature is to aid developers not using tools. It shouldn''t be enabled if using an IDE, or if this application is being deployed for production as it will impact application start times.
    Jun 12, 2009 3:09:37 PM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! cvc-elt.2: The value of {abstract} in the element declaration for 'faces-config' must be false.
         at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:213)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
         at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: org.xml.sax.SAXParseException: cvc-elt.2: The value of {abstract} in the element declaration for 'faces-config' must be false.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:410)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3165)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1951)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:685)
         at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:273)
         at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:240)
         at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:186)
         at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:100)
         at javax.xml.validation.Validator.validate(Validator.java:127)
         at com.sun.faces.config.ConfigManager$ParseTask.getDocument(ConfigManager.java:434)
         at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:394)
         at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:351)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:619)

    More logs:
    Jun 12, 2009 3:09:37 PM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! cvc-elt.2: The value of {abstract} in the element declaration for 'faces-config' must be false.
         at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:213)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
         at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: org.xml.sax.SAXParseException: cvc-elt.2: The value of {abstract} in the element declaration for 'faces-config' must be false.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:410)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3165)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1951)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:685)
         at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:273)
         at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:240)
         at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:186)
         at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:100)
         at javax.xml.validation.Validator.validate(Validator.java:127)
         at com.sun.faces.config.ConfigManager$ParseTask.getDocument(ConfigManager.java:434)
         at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:394)
         at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:351)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:619)

  • Capturing events fired by ACtiveX control

    How can i capture events fired by ACtiveX control. i am using RegEventCallback vi, but that controls user driven events. i have an activeX control that fires events at unspecified time, now i want to know how to handle such events in LabView.
    Rubina

    Hi InformaticsComplex,
    Using the Register Event Callback VI is the correct method to capture events generated by an ActiveX control. Register Event Callback registers a VI to be called when the event occurs. I suggest checking out the LabVIEW Help articles Using ActiveX with LabVIEW and Register Event Callback as well as the following examples. I hope this helps!
    Examples (all found in NI Example Finder):
    ActiveX Event Callback for Excel VI: labview\examples\comm\axevent.llb
    ActiveX Event Callback for IE VI: labview\examples\comm\axevent.llb
    NET Event Callback for Calendar Control VI: labview\examples\comm\dotnet\Events.llb
    NET Event Callback for DataWatcher VI: labview\examples\comm\dotnet\Events.llb
    Mike Lyons
    National Instruments
    http://www.ni.com/devzone

  • Item added & item updated events fired twice.

    Hello everyone, 
    I have item added and item updated events and both sends e-mails twice cos they are fired twice. 
    I tried the below method but the problem still continues. Any suggessions?
    base.EventFiringEnabled=false;
    base.EventFiringEnabled=true;
    note: my list is custom list. (not document lib)

    If you have required checkout enabled the events can be triggered twice. See this post for more information and how to bypass it:
    Managing ItemUpdating and ItemUpdated Events Firing Twice in a SharePoint Item Event Receiver

  • Programmatically change GUI controls/ prevent event firing

    Hi,
    I often construct GUIs where user input in one control automatically changes other controls.
    A (simple) example:
    A GUI contains controls A and B. When the user changes control A the value of control B has to be adjusted, and the other way round. So the event handler of A tells B to change its value. An event is fired, and the event handler of B tells A to change its value. An event is fired... and you have an endless event handling loop.
    Please believe me, though the example is simple: this happens frequently in real life, too. Since setting Swing controls programmatically most often triggers events, I need a mechanism to prevent event handling loops. What I do so far is
    o set a "deaf" flag
    o change the control
    o the listener gets informed about the change, but since the "deaf" flag is set it does nothing
    o reset the "deaf" flag
    Another, equally awkward way, is removing event listeners before the change and reattaching them afterwards.
    Is there any elegant way to handle this? How do you handle this kind of problem, which can't be too rare in the GUI world (although a rather extensive search with Google did not find much)?
    Chris

    Personally, I usually choose the same approach as you did, implementing a flag which I'll check when events are fired. If you do this, however, be sure to make the flag volatile, otherwise it might (very rarely) happen that a thread caches the value (even though this points to faulty code on your side, it is well near impossible to debug). I would strongly recomment not to remove and readd the listeners since it will create a lot of overhead and is rather hard to maintain.

Maybe you are looking for