File-Change event?

i have a config file that can be altered a certain JPanel A. I
have another panel, B, that displays info from that file and
its current values. If that file is changed by Panel A, i
want to be able to fire an event so that B will know to read
the file again and update whatever needs to be updated.
Also, because the file is XML, i use a single class to handle
all writes to this file. So, every time it is changed i could fire
an event. I just don't know which event to fire or if this is even
possible!
any info is appreciated...

You might take a look at the Listener Pattern.
Edit 2: Removed the link for having broken links.
Edited by: Danniel_Willian on Feb 12, 2008 7:42 PM

Similar Messages

  • File Change Event Notification

    Hi,
    Is file event notification available on Solaris 10?
    If it is not, could someone help me on this -
    I want to monitor a directory for a new file addition event. Once a new file is added, i want to do some processing.
    How to do this?
    Edited by: Pratz_Pratz on Sep 12, 2008 3:47 AM

    Closest thing I know of is to turn on acct (accounting) and deal with acctdisk.
    -r

  • Dynamic action on File browse change event

    Hi Experts,
    apex version 4.1
    This is what i'm trying to do..
    i have a file browse control and a text field. when user selects a file, selected fiel's name (without file type extension) should be set to text field.
    I tried adding a dynamic action to file browse control's change event and within pl/sql Set Value logic i queried the wwv_flow_files and tried to return the file name it didn't work. i got no data found error. i assumed file is being inserted into wwv_flow_files when a page submission happens.
    In my second approach within the SetValue pl/sql logic i got the file browser control's (by directly accessing field, not by querying wwv_flow_files)value and did some string manipulation and tried to return only the file name. yet i got the same no data found error.
    Any idea how can i implement this ?
    Thanks in advance.
    - kurubaran

    Hi,
    I think PL/SQL approach will not work before you submit data to database.
    Have you think use $v function to get value from file browser?
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#BGBGDGIH
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Event handling to listen directory file changes?

    I want to write a Java program that watches directories for changes. If there are any new files, or files are deleted in a directory, notify the user. I think this is a multi-thread program that watches files changes in specific directories. But I don't know what listener that the program should implements. please help!!

    There are no events that do what you ask (actually, there are native OS events in Win32 that do this, but I suspect that isn't what you are going for).
    You'll need to write your own event source for this (and hey, if you are feeling crazy, you could even create your own event type - FolderChangedEvent or such).
    Start a thread that wakes up periodically and checks the contents of a specified folder for changes. If there is a change, fire your event to any listeners.
    Now, how you actually define a change in a folder is an entirely different matter. It may be sufficient to calculate a CRC (or Adler32) on the modified date of all files in the folder, then compare that to a previous version to see if there has been a change.
    If you have to drop into sub-folders, you'll need to create a recursive call to do that.
    - K

  • Changing event dates of MOV files

    I've found it straightforward changing event dates (so the Event Library will sort chrono), simply by going to Finder and changing the yyyy-mm-dd format for DV files that may not have been captured correctly. However, when I do the same with MOV files, the fix will not work. Any suggestions? Thanks.
    BTW, these files were captured via a Canopus ADVC110. Years ago, I consolidated my video library (various old formats) on DVDs via a Panasonic DVD-R player. Now I've captured all of this video, via the Canopus converter, and am ready to edit in iMovie. When I captured the video recently, I simply created new folders, labeling each by year, so the sub-folders are easy to recognize. They all show up under "2007" I can live with this, but if there is a fix it would be nice.

    On Karsten Schluter's website, she lists at least four ways to change dates. Here is a link... http://karsten.schluter.googlepages.com/im08changeeventdate
    IIRC, the .mov files are really a package of files and you will need to change the dates of the files in the package. Alternatively, you could import the .mov files into iMovie 06, and export as a Quicktime .dv file, at which point, it becomes easy to change the dates.

  • No Data Change event generated for a XControl in a Type Def.

    Hello,
    Maybe I am missing something but the Data Change event of a XControl is not called when the XControl is used in a Type Def. or Strictly Type Def. (see the attached file).
    There may be some logics behind it but it eludes me. Any idea of why or any idea of a workaround still keeping the Type Def. ?
    Best Regards.
    Julian
    Windows XP SP2 & Windows Vista 64 - LV 8.5 & LV 8.5.1
    Attachments:
    XControl No Data Change event.zip ‏45 KB

    Hi TWGomez,
    Thank you for addressing this issue. It must be a XControl because it carries many implemented functions/methods (though there is none in the provided example).
    Also consider that the provided non-working example is in fact a reduction of my actual problem (in a 1000-VI large application) to the smallest relevant elements. In fact I use a  typedef of a mix of a lot of different XControls and normal controls, some of them being typedef, strictly typedef or normal controls and other XControls of XControls (of XControls...) in a object oriented like approach...
    Hi Prashant,
    I use a typedef to propagate its modifications automatically everywhere it is used in the application (a lot of places). As you imply a XControl would do the same, though one would like to construct a simple typedef when no additional functionality is wanted.
    The remark "XControl=typedef+block diagram" is actually very neat (never thought of it that way) because it provides a workaround by transforming every typedef into a XControl. Thanks very much, I will explore this solution.
    One issue remains: All normal controls update their displayed value when inserted into a typedef but not XControls. Data change event is not triggered. I known that XControls have some limitations (no array of XControls) but I would say, like TWGomez, that this is a “bug” considering the expected functionality.

  • How to generate selection change event through code in JTree?

    I am developing an application which downloads the file from other system and adds it into the tree. On selecting any file in the tree I m displaying it's contents. But now i am trying to display the contents of downloaded file as soon as it's download completes. Here i am not getting the way to how to generate the event as the download completes, because i tried that setSelectionPath(TreePath path), but it also don't generates the selection change event. Is there any other way to do so?

    Put null in place of oldLeadSelectionPath. From the API for TreeSelectionEvent:
    protected TreePath     oldLeadSelectionPath:
    leadSelectionPath before the paths changed, may be null.
    I'm at the office and can't try out anything, so please let me know whether that works for you.
    db
    edit Or it may be easier to put all code from your valueChanged (...) override in a new method and invoke that method both from valueChanged (...) and wherever else you need.
    Edited by: Darryl.Burke

  • Contextual Event - "Currency Change Event" not raised?

    Hey,
    I am trying to raise contextual event on a table when I click on a row. The event type for a table is eventType="Currency Change Event" But is not working.
    Here is the event in the PageDef file.
    <events xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
    <event name="paramValueChangedEvent"
    customPayLoad="${bindings.PolicyId.inputValue}"
    eventType="Currency Change Event"/>
    </events>
    After that I want to raise custom method:
    <methodAction id="testEvent" InstanceName="myBean.dataProvider"
    DataControl="myBean" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="testEvent"
    IsViewObjectMethod="false"/>
    Here is the event map:
    <eventMap xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
    <event name="paramValueChangedEvent">
    <producer region="*">
    <consumer region="" handler="testEvent" handleCondition=""/>
    </producer>
    </event>
    </eventMap>
    When I raise the event programmatically, then the event is raised and my function is called.
    Here is the code. I call this function on a custom selection listener of the table.
    public void riseCurrencyChangeEvent(String treeID, String nodeID,
    String attributeValuedPassedName) {
    DCBindingContainer bc = ADFFacesUtils.getDCBindingContainer();
    FacesCtrlHierBinding tbl =
    (FacesCtrlHierBinding)bc.findCtrlBinding(treeID);
    FacesCtrlHierNodeBinding node =
    (FacesCtrlHierNodeBinding)bc.findCtrlBinding(nodeID);
    EventDispatcher dispatcher = bc.getEventDispatcher();
    node = (FacesCtrlHierNodeBinding)tbl.getRootNodeBinding();
    dispatcher.queueEvent(node.getEventProducer(),
    node.getCurrentRow().getAttribute(attributeValuedPassedName));
    bc.getEventDispatcher().processContextualEvents();
    My idea is not to call custom method after clicking on a table row, but I want to raise declaratively the event because I will need so generics.

    Hi,
    there is a bug 10045872 filed for this. The bug is scheduled for fixing in PS4 (11.1.1.5) I'll work on a manual - though code centric - alternative for the time being and publish it on ADF Code Corner when done.
    Frank

  • [svn:osmf:] 14474: Adding a 'dispatchInitialChangeEvent' parameter to the ' watch' method in order to allow the initial change event from being dispatched, continued.

    Revision: 14474
    Revision: 14474
    Author:   [email protected]
    Date:     2010-02-28 23:53:31 -0800 (Sun, 28 Feb 2010)
    Log Message:
    Adding a 'dispatchInitialChangeEvent' parameter to the 'watch' method in order to allow the initial change event from being dispatched, continued.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/metadata/MetadataWatcher.as

    *Feedback*
    "Use the form below to send us your comments. We read all feedback carefully, but please note that we cannot respond to the comments you submit."
    http://www.apple.com/feedback/ipad.html
    We can complain about Apple's business decisions, but these discussions are user to user talk about possible solutions.
    Here are the places to report bugs:
    Get an account at
    http://developer.apple.com/  then submit a bug report to http://bugreporter.apple.com/
    Once on the bugreporter page,
       -- click on New icon
       -- See if you need to attach a log file or log files, clicking on Show instructions for gathering logs.  Scroll down to find the area or application that matches the problem.
       -- etc.

  • Suggest  to track file download event with applet or any other way

    Hello,
    I am trying to write a code which will handle a file download event. I want my program to to do a change in database when a file downloading completes.
    I thought there might have some way to track this event through javascript and if tracked I'll make an ajax call to a serverside page to serve my purpose. But haven't found any way to track such event.
    I don't know whether it is at all possible or not.
    Any one has any idea??
    Thanks in advance.
    Edited by: Atanu_from_Tollygunge on Mar 20, 2009 2:01 PM
    Edited by: Atanu_from_Tollygunge on Mar 20, 2009 2:56 PM
    Edited by: Atanu_from_Tollygunge on Mar 20, 2009 3:00 PM
    Edited by: Atanu_from_Tollygunge on Mar 20, 2009 3:01 PM

    Thanks for your reply...
    But if the size of the file is say 4mb and somehow in the halfway of downloading, if any problem occurs through any browser, will java server be able to track that exception??
    I'm not sure, I'm trying to figure out....
    Edited by: Atanu_from_Tollygunge on Mar 20, 2009 4:22 PM

  • Azure Website restarts due to file change when no file has been changed

    Hello,
    I have a paid subscription site running at LMFitInc.azurewebsites.net. The site seems to randomly restart throughout the day with no obvious reason. Logs (below) indicate that this is in response to a file change though I'm not changing any files & can't
    find anything changed searching by date. 
    Any thoughts?
    <Event>
    <System>
    <Provider Name=".NET Runtime"/>
    <EventID>0</EventID>
    <Level>0</Level>
    <Task>0</Task>
    <Keywords>Keywords</Keywords>
    <TimeCreated SystemTime="2015-04-01T01:25:13Z"/>
    <EventRecordID>276896843</EventRecordID>
    <Channel>Application</Channel>
    <Computer>RD0003FF453E2C</Computer>
    <Security/>
    </System>
    <EventData>
    <Data>
    _shutDownMessage=CONFIG change HostingEnvironment initiated shutdown Change Notification for critical directories. File Change Notification Error in App_Browsers Change Notification for critical directories. File Change Notification Error
    in App_Code Change Notification for critical directories. File Change Notification Error in App_WebReferences Change Notification for critical directories. File Change Notification Error in App_GlobalResources Change Notification for critical directories.
    File Change Notification Error in bin Directory rename change notification for 'D:\home\site\wwwroot'. File Change Notification Error in wwwroot HostingEnvironment caused shutdown _shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
    at System.Environment.get_StackTrace() at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal() at System.Web.Hosting.HostingEnvironment.InitiateShutdownWithoutDemand() at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace) at System.Web.Configuration.HttpConfigurationSystem.OnConfigurationChanged(Object
    sender, InternalConfigEventArgs e) at System.Configuration.Internal.InternalConfigRoot.OnConfigChanged(InternalConfigEventArgs e) at System.Configuration.BaseConfigurationRecord.OnStreamChanged(String streamname) at System.Web.Configuration.WebConfigurationHostFileChange.OnFileChanged(Object
    sender, FileChangeEvent e) at System.Web.DirectoryMonitor.FireNotifications() at System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback) at System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(Object state) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object
    state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback,
    Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
    </Data>
    </EventData>
    </Event>
    Thanks,
    Geoff

    Thanks Aram, I agree that it looks like a full deployment, however I'm sure I'm not deploying anything. I also filtered the files by date to look for anything that might be changing without my knowledge but came up dry. 
    I'm in the process of setting this up on a VM where I've got full IIS access with the hope of getting more information. 
    Geoff

  • Problem Changing Event Banners

    I can no longer change event banner images after I've created an event. The first banner I upload when creating the event works, but it does not work if I try to change to a different banner image later. I either still see the original image or a blank space appears instead. I've tried with multiple file types and in different browsers, but the problem persists. Has anyone else experienced this problem? Is there a way to fix it?

    @Grlobi - We're having the same problem, but we just see a giant blank space where the large, small and speaker banners should be. It just happend today and we can't find any information on how to go about fixing it.
    Has anyone had this issue before and was able to resolve it?

  • [svn:osmf:] 15527: Fix bug FM-696: Capability change events being dispatched after the trait to which they refer has been modified .

    Revision: 15527
    Revision: 15527
    Author:   [email protected]
    Date:     2010-04-16 17:21:06 -0700 (Fri, 16 Apr 2010)
    Log Message:
    Fix bug FM-696: Capability change events being dispatched after the trait to which they refer has been modified.  Updated unit tests.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-696
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as
        osmf/trunk/framework/OSMFTest/org/osmf/media/TestMediaPlayer.as

    Major Update: The G-Keys can now be edited without recompiling by editing shell scripts at "/usr/share/g15daemon/macros/"
    Each button has it's own script file named by it's label (e.g. to edit the functionality of G1, open the script named G1.) The button will try to execute the scripts as programs, so make sure they are executable (chmod +x) and as long as the name remains the same, if you want to replace the files with something different, know that the arguments currently given to the files ($1 and $2) are ($1)on/off and ($2)0-2  (where 0 is M1 and 2 is M3)
    To download the updated sources, go here (only the g15daemon source/patch was updated). This thread's OP has been updated.
    Last edited by rabcor (2015-02-12 04:46:48)

  • How to tackle the dataflow problem when Value Change event always triggers after another GUI event

    We know that Value change event always triggers after another GUI event. Eg, the user modifies string control, the user clicks on a boolean control. Then event boolean clicked is triggered before event string control value change.
    Now suppose somehow the GUI event that must happen to subsequently trigger the Value change event can potentially affect the data that Value change event is supposed to work on. How can we tackle this problem ?
    For example, in a mockup application that the grand purpose is to have user entered values in a textbox logged to a file (no missing information is accepted, and there is a boolean to determine how the information is logged).
    There are 2 controls, boolean A when clicked (mouse down) will load random number in text box B. Text box B is designed with event structure VALUE change which saves whatever values user enters into text box B to a log file.
    There are 3 problems when instead of clicking anywhere on the front panel after modifying text box B, the user ends up clicking on boolean control A.
    1. Event mouse down on Boolean control A will execute first, modifying text box B content before the user entered values in B get saved.
    2. The value of boolean A can potentially affect how textbox B is loggged.
    3. The value of boolean A affects how the file is logged and this is indeterminate. Somehow when running this VI with no Highlighting, the textbox B Value change event executes -before- boolean A value is updated (F to T). When running this VI with Highlighting, the boolean A value is updated (F to T) (because we click on it) -before- textbox B value change event occurs. Why is it like this ?
    Now the situation I made up seems non-sense, but I believe it resembles one way or another a problem that you might run into. How would you solve this problem elegantly ?
     

    You can set the string control to "update while typing".
    Are you sure appending the log to itself is reasonable? Wouldn't it grow without bounds if the users keeps entering strings or pressing the ingore button?
    Why isn't the "constant" a diagram constant instead of a control. Is the user allowed to change it?
    To reset just write empty strings or a false to local variables of the controls (renit to defaults" seems a bit heavy handed).
    All you probably need is a single event case for "ignore:value change" and "String" value changed", no need for the local variable..
    Also add a stop button and an event for it.
    You don't need the timeout event.
     

  • Issue in execution of Dynamic action on change event

    Hi,
    Greetings.
    I have scenario, where I have one select list (P_CATEGORY) and one shuttle control (P_ROOMS) on page.
    The values of the shuttle list is being populated based on the selected value in select list.
    The left pane of shuttle control's value based on LOV and source of the shuttle item is a plsql function, which returning colon separated value list.
    So that returned values shown in the right pane of shuttle.
    The LOV values are getting being populated using cascading LOV i.e based on the of Select List item. But the Shuttle source values not getting auto refresh and for achieving that I've created a dynamic true action on change event of Select list.
    The dynamic action is with :
    Action : Set Value
    Set Type : PL SQL funciton body
    Page items to submit : P_CATEGORY (this is select list)
    Escape Special Character : Yes
    Suppress Change event : Yes
    Affected Elements -
    Selection type : Item(s)
    Item(s) : P_ROOMS
    This is perfectly working on Firefox but not working on IE9 & Google Chrome.
    I've debugged in both IE9 & Google chrome and found the dynamic action get executes ajax call and the values get back but not rendering on the screen. i.e not assigning to the item.
    So can you please advice me what will be a workaround for this issue?
    I am using Application Express 4.1.0.00.32 .
    I'll appreciate your prompt response.
    Thanks & Regards,
    Jaydipsinh Raulji

    I don't understand why this is not working withouth seeing an example, there might be multiple processes working on the item.
    Anyway if the value is returned check if the value is in the session aswell. If it is in the session but not on the page that means you will need to find a way to bring it from the DB to the page. You can do this by adding an action to your DA:
    Action: Execute PL/SQL code
    PL/SQL code: NULL;
    Page Items to Return: your shuttle item

Maybe you are looking for

  • 865pe Neo2-V problem. need some help, please

    i clocked my CPU [email protected](box culer-40C idle) and i believe that i can raise FSB more but i have problem.my Kingmax(512ddr400) goes to 505 MHz, and i can't stop her. i can't put FSB/DRAM 1:1. it is allways 4:5. My old Transcend too. So it is

  • Can I use an external hard drive on my iMac if the internal drive is dead?

    The internal 1 TB hard drive on my 2009 w/Mavericks hard drive is failing.  I clone that drive to an external hard drive as a backup and often boot from the external when I want to do some maintence (Disk Warrior) on the iMac drive.  So far Disk Warr

  • How to change workflow for expired qualification in HR Module

    Hi, My question how to change workflow for expired qualification in HR Module.We need to when date is expired tcode OOQA that system will check and that time workflow should be triggred. I have serached sap help but i am not understand please below m

  • XI 3.0 or PI 7.0 - how to check?

    This is the component level in the system: SAP Component     SAP Component Version     Patch Level     Support Package PI_BASIS     2006_1_700     2     SAPKIPYM02 SAP_ABA     700     9     SAPKA70009 SAP_BASIS     700     13     SAPKB70013 I think i

  • If database field increases in size, how to change report to display this increase?

    Hello Everyone,        I'm working with Oracle Reports 10g and have a report that was already created.  I need to increase the size of a field from 50 to 200 in width to accomadate a database change.  When i click on the field and choose properties,