Posting Events
I need to post some events to the event queue. And I think I'm doing that, but it doesn't seem like any event listeners are getting the events.
Here is how I am posting the events:EventQueue evtq = Toolkit.getDefaultToolkit().getSystemEventQueue();
evtq.postEvent(new ActionEvent(this, java.awt.Event.ACTION_EVENT, ITEM_SELECTED));
//ITEM_SELECTED is a stringThis is in a class I call ResultSetComboBox because it extends JComboBox and it populates its model by what the user types into the editor from a database. The problem is I need to know when it is changed. If I use action listeners, its notifies me everytime the user presses the up/down arrow keys, and if I use an ItemListener, then it notifies me twice when something is actually selected. And I don't want to do lots of extra db lookups because I get the event twice. That is why I'm trying to post my own event and then just look at action command to see if I'm the one who posted it.
The problem is that I've added ActionListeners, but they never ever seem to get the event that I thought I posted. Just to make sure that I was executing the code, I put a println statement after the post command, and it printed out, so I know that is executing. Does anyone know why my event isn't getting posted/distributed properly? I've also tried using dispatchEvent, but that didn't work either.
Peter
I did try component.dispatchEvent, if you completely read all the paragraphs. I would like to avoid using that since I have to manually notify all listeners, and I have to have references to all the components directly.
I added an action listener to the component itself, then tried this.dispatchEvent, and it never received it for some reason. No exceptions were through, and code after the dispatching of the event was executed.
Peter
Similar Messages
-
Hi,
I have created a post event handler and registered it. Then i checked in the PLUGINS table, my event handler exist there. But this event handler never called after create user.
I have added like:
<action-handler class="xxxxx"
entity-type="User" operation="CREATE" name="DBPostProcessEventHandler" stage="postprocess"
Do I missing any?
thanks
RobbI've got the same problem, I follwed instruction as in 1262803.1. its ok for pre-process, but for post-process it dosn't work. Did you success?
I also tried to unregister the pre-process EvenHandler (with command ant -f pluginregistration.xml unregister) I got info "Unregistred succesful" but handler still works.. Do I omit something?
Regards
Magda -
Hi all
I've got a real problem here:
I've implemented a website which is to be used both by a browser directly, and also using an embedded browser within our application.
I finished the standalone browser version, and assumed that the embedded one would be as easy as pointing a JEditorPane at the site.
But how wrong I was :-0
I have used a JTextPane and pointed it at the URL of the site, and added a hyperlink listener to handle the link clicks. At first I had some problems with CSS, but I've managed to overcome those by using the methods of HTMLEditorKit. My big problem now is that the JTextPane doesn't seem to provide support for SUBMIT, POST events etc, and my site relies heavily on these.
Does anyone know of a component that supports this? Or some code which can be plugged in to a JEditorPane to make it work?
I found some information on this here:
http://forum.java.sun.com/thread.jspa?forumID=257&threadID=414212
The user nfalck very helpfully demonstrates how to gain access to the Java representations of the OPTION, SUBMIT elements etc within the Document object, and suggests that you can manually store them and pass them to the URL.
I am under severe time pressure though, so I wonder if anyone knows a way to achieve this using existing code / components.
Thanks in advance for any help.
Cheers,
PaulThanks.
I've seen that thread already actually. I did try using the jdic library and I got it working well, but I found that I got a few native crashes in the DLL's. I cannot risk that kind of thing happening in production deployments...
From looking around it seems that the POST stuff worked in JDK 1.4 but not in 1.5 - I think that explains why it works for some users and not for others. That's annoying, as I need to embed this browser in two different applications - one of which uses 1.4 and one uses 1.5!
The last link on that page is dead but I discovered that it points to a component called CalPane, but I can't find out if this is a viable browser component to use. It doesn't look like it.
Message was edited by:
moschops -
Oracle.apps.gl.Journals.journal.post event parameter
I have written a subscription on the oracle.apps.gl.Journals.journal.post event and it's raising fine and I would like to control this event's subscription to a particular set of books id instead of firing across all set of books. How can I send the parameter to my event subscription?
Thanks,
Srini CThe note shows the raising the subscription, I have successfully generated the subscription but I need to know the how can I pass the set of books id to my custom subscription.
Thanks,
Srini C -
Since loading mavericks my calendar posts events one hour late. That is, if mtg invite is for 9am it posts at 10am. my pc clock and time zone are correct.
Hey Armando Stettner,
Thanks for the question, and what a great question it is!
With time zone support on, you can edit an individual event and change the time zone for that event. This list will include options for your default time zones, UTC, and "floating" - the latter of which is what you are looking for. Floating changes the event to occur at the specified time, local time.
For information on changing an event's time zone, see the following resource:
Calendar: Change an event’s time zone
http://support.apple.com/kb/PH11531
I look forward to hearing how this works for you.
Cheers!
Matt M. -
RE: (forte-users) Posted Event Not Seen by EventLoop
Hi,
Event registration occurs when an event loop is activated. If your event
loop is activated before your SO is ready and registered (Init must be
finished) the event loop will be not registered for the event on your SO.
This is a typical example of race condition. A race condition may occur when
two or more processes execute simultaneously and the final result depends on
which process finishes first. Please redesign your project.
Regards,
Zenon Adamek
Purolator
-----Original Message-----
From: Denver Jobs [SMTP:fortejobsindenveryahoo.com]
Sent: Wednesday, June 14, 2000 2:48 PM
To: kamranaminyahoo.com
Subject: (forte-users) Posted Event Not Seen by Event Loop
I have two classes & an SO in a given project.
ManagerClass : object
InterfaceClass : object
ManagerSO : ManagerClass
ManagerClass has the attribute
theInterfaceClass : InterfaceClass
InterfaceClass has the attribute
theManagerClass : Manager Class
The ManagerClass Init method performs a new on
theInterfaceClass and then does a start task on a
method within theInterfaceClass which starts an
external connection listening on a port.
The method also sets theInterfaceClass.theManagerClass
to ManagerSO.
A method gets called in the ManagerClass which writes
to the external connection port within the
theInterfaceClass and then starts an event loop in the
ManagerClass to wait for notification.
When the started task for listening on the external
connection receives data, it calls a method within the
ClassManager - theClassManager.CallMethod(returndata);
The CallMethod actually posts an event within the
ClassManager which the event loop started earlier is
waiting on.
The event does get posted, however, the event loop
that was started never receives the event?!?!?
There are no lower level event loops that
should trap this event prior to this point.
The call to perform the "write" on the external
connection is done as a postregister in the event
loop, so that the event is registered before a post
for the event occurs.
Am I missing something here?
Thanks in advance for any light you might shed.
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comCheck if ManagerSO = ManagerSO.theInterfaceClass.theManagerClass
Why does InterfaceClass call a methon the the SO? Why doesn't it simply post
its own event, that the SO is registered for?
-----Original Message-----
From: Denver Jobs [SMTP:fortejobsindenveryahoo.com]
Sent: Wednesday, June 14, 2000 8:48 PM
To: kamranaminyahoo.com
Subject: (forte-users) Posted Event Not Seen by Event Loop
I have two classes & an SO in a given project.
ManagerClass : object
InterfaceClass : object
ManagerSO : ManagerClass
ManagerClass has the attribute
theInterfaceClass : InterfaceClass
InterfaceClass has the attribute
theManagerClass : Manager Class
The ManagerClass Init method performs a new on
theInterfaceClass and then does a start task on a
method within theInterfaceClass which starts an
external connection listening on a port.
The method also sets theInterfaceClass.theManagerClass
to ManagerSO.
A method gets called in the ManagerClass which writes
to the external connection port within the
theInterfaceClass and then starts an event loop in the
ManagerClass to wait for notification.
When the started task for listening on the external
connection receives data, it calls a method within the
ClassManager - theClassManager.CallMethod(returndata);
The CallMethod actually posts an event within the
ClassManager which the event loop started earlier is
waiting on.
The event does get posted, however, the event loop
that was started never receives the event?!?!?
There are no lower level event loops that
should trap this event prior to this point.
The call to perform the "write" on the external
connection is done as a postregister in the event
loop, so that the event is registered before a post
for the event occurs.
Am I missing something here?
Thanks in advance for any light you might shed.
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
Cannot post events between 1.00am-2am, Sunday 27th March 2011
Hi All
I am experiencing a weird problem in that I am unable to post events within this 1hr time slot on this particular day. If I drag events through this slot they will happily take up a position before or after but not during this period. It is as if this 1hr slot either does not exist or is reserved. I never had this problem before the MobileMe upgrade. Does any member know what could be wrong or maybe experienced something similar?
Regards
PhilHi All
Maybe I am partly answering my own question but could this be a daylight saving time bug?
Regards
Phil -
Posting event from JSP/Servlet to Agent?
Hi everyone!
I would like to know if it is possible that a jsp file or servlet (runs behind the JWS) can post an event and be captured in the Agent (runs behind the IFS Server).
Any insight regarding this matter will be greatly appreciated.
VinceI don't think that's possible and even if it is there's an easier way. Normally you just create an instance of the session bean in a servlet and pass it the information. The session bean then calls the entity bean which updates the database. You don't have to forward the request - just pass the data to the bean.
-
Hi all,
We are trying to save some images but only after spotting an event. This way we do not end up with huge data sets due high frequency imaging. Our idea is to use some sort of a buffer. We would really appreciate any hints on how to approach this issue.
thanks in advance
Solved!
Go to Solution.We use IMAQdx to capture images at 10 frames/second of biological activity in mice. We have an external sensor that tells us when the event we want has occurred, and we save videos from 2.5 seconds before the event to 5 seconds after. And we do this for 24 mouse stations running simuultaneously, with a recording session lasting about two hours (requires 24 cameras, of course ...).
The basic technique is to configure a number of buffers in the camera (actually, in the driver, I suspect). We save the buffer numbers in a lossy queue, and when we get a signal that an Event has occurred, we start emptying the Queue (which contains buffer numbers -- we get a buffer number, use that to pull up an image, and write that to an image file) until we have saved the proper number of images (75, in the example above).
BS -
OIM 11g R2 Post Event Handler not trigerred
Hi,
I have developed the event handler that request resources on user load into OIM (its a GTC load). I can see that:
1. event handler is registered in "PLUGINS" table,
2. appearing in em
3. see the following under /dms/spy
PostEventRequestResourceCreate company.com oim_server1:14000 active, threads 0 oim_server1
avg, msecs 1.67
completed, ops 3
maxActive, threads 1
maxTime, msecs 3
minTime, msecs 1
time, msecs 5
As per the 11g R2 doc, I have included eventhandlers.xml as part of META-INF folder of my pluign zip -I did not import it into MDS as it was not mentioned in the doc (as it was mentioned in the case of 11g R1).
I have updated the lib of the plugin zip with the custom class jar.
I have few SOPs in my Eventhandler which are not getting printed and hence events are not triggered.
Is there anything that I am missing here?
ThanksHashMap eventDataHashMap = bulkOrchestration.getInterEventData();
Identity[] currentUserStates = (Identity[]) eventDataHashMap.get("CURRENT_USER");
You can loop through the same way you are through the bulkParameters and pull the database from there.
-Kevin -
Ical-email reminders sent late/post event
this is inconsistent, but ical often sends email reminders AFTER the date of the event - sometimes i set it for 3 days before & i get it the day after - no, my computer has not been asleep or off for those days... i am guessing this happens at least 1/3 to 1/2 of the time - help???
if ical is closed or the computer is in sleep mode, does that mean it won't send?
Yes. The application has to be running and your computer needs to be "awake" for anything to happen. It's not possible to take any action when your computer isn't in a state to take the action. That doesn't mean your screen needs to be lit; it can be blacked out by the screen saver after a few minutes of inactivity.
You can use an alarm, if you're at the computer, but the point of using the feature you describe is avoid having to be at your computer to make it happen. I've never used the feature, but I'm sure Apple tested it beforehand. Even so, you should test it by using it to send emails to one of your email accounts (not the one you're sending from) before using it for something important.
Mulder -
Posting events from iphoto to facebook
any idea why I can no longer publish my event in iPhoto to Facebook? The publish button is there but I can not select it., any idea why I can no longer publish my event in iPhoto to Facebook? The publish button is there but I can not select it.
Back up all data.
Quit the application, if it's running.
Triple-click anywhere in the line below on this page to select it:
~/Library/Containers/com.apple.ShareKitHelper
Right-click or control-click the highlighted line and select
Services ▹ Reveal
from the contextual menu. A Finder window should open with a folder selected. If it does, move the selected folder — not just its contents — to the Desktop.
The folder you're moving has a name that begins with "com." It is not the subfolder named "Data" or anything else.
Log out and log back in. Launch the problem application and test. If it works now, delete the folder you moved. Otherwise, quit again, and put the folder back where it was, overwriting the one that may have been created in its place.
Caution: If you delete some or all of the contents of the selected folder, but leave the folder itself in place, the application may not launch. Deleting the folder will cause it to be rebuilt automatically. -
Catching JE Event (before posting the JE)
Hi there,
can anyone tell me how can i cacth the Journal Entry event, and change it before its posted to the system?
Example, when I click the "add button" on the A/R Invoice, catching the posting event before it gets posted and change it (add 2 more lines,1 debit and one credit)
Thank you.
LBHello Luis,
YOU ARE NOT ABLE TO MODIFY THE JE RELATED TO INVOICE
What you can do is add a new JE with your adjusments !
Use the following in SBO_SP_TransactionNotification
ALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(20), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
BEGIN
-- Return VALUES
declare @error int -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
SELECT @error = 0
SELECT @error_message = N'Ok'
DECLARE @docnum nvarchar(50)
if not exists (select * from sysobjects where name = 'T_TransactionNotification')
begin
create table T_TransactionNotification(
TransactionDate datetime,
ObjectType nvarchar(20),
TransactionType nchar(1),
NumOfColsInKey int,
ListOfKeyColsTabDel nvarchar(255),
ListOfColsValTabDel nvarchar(255) );
end;
insert into T_TransactionNotification
( TransactionDate,
ObjectType,
TransactionType,
NumOfColsInKey,
ListOfKeyColsTabDel,
ListOfColsValTabDel)
values( getdate(),
@object_type,
@transaction_type,
@num_of_cols_in_key,
@list_of_key_cols_tab_del,
@list_of_cols_val_tab_del);
-- SELECTthe return VALUES
SELECT @error, @error_message
END
then issue and invoice, and see the results:
-- all records
select * from T_TransactionNotification order by
-- Invoices with JE numbers only
select T1.Transid, * from T_TransactionNotification T0, OINV T1 where T0.ListofColsValTabDel = T1.DocEntry and T0.ObjectType = '13'
As a next step, write your DI API Code, and do the adjusment based on the result of the Query (transid)
This solution is can be extended for every documents
Edited by: János Nagy on Oct 7, 2009 12:03 PM -
Trouble with a script that deletes event in iCal
Used this script over the summer and it worked fine. Can't figure out the issue now, but it isn't working. Here is a few lines of the output I get and then the error I get is at the bottom. I'll post the full script at the bottom of this posting. Error # -1728??? File doesn;t exist?
Thanks,
dan
get summary of item 2 of every event of calendar "Untitled"
--> "Enviro C Lab Period 3-4"
get summary of item 2 of every event of calendar "Untitled"
--> "Enviro C Lab Period 3-4"
get description of item 2 of every event of calendar "Untitled"
--> missing value
get status of item 2 of every event of calendar "Untitled"
--> none
get start date of item 2 of every event of calendar "Untitled"
--> date "Tuesday, April 26, 2011 10:30:00 AM"
get summary of item 2 of every event of calendar "Untitled"
--> "Enviro C Lab Period 3-4"
get end date of item 2 of every event of calendar "Untitled"
--> date "Tuesday, April 26, 2011 11:55:00 AM"
get allday event of item 2 of every event of calendar "Untitled"
--> false
make new event at end of every event of calendar "Untitled" with properties {status:none, start date:date "Tuesday, April 26, 2011 10:30:00 AM", summary:"Enviro C Lab Period 3-4", end date:date "Tuesday, April 26, 2011 12:25:00 PM", allday event:false}
--> event id "AF27EFB6-3949-4977-A153-1EFE31FD8206" of calendar id "0EDA6DFD-52AD-4E7F-BC81-984CFF7D3F39"
delete item 2 of every event of calendar "Untitled"
--> error number -1728 from item 2 of every event of calendar "Untitled"
Result:
error "iCal got an error: Can’t get item 2 of every event of calendar \"Untitled\"." number -1728 from item 2 of every event of calendar "Untitled"
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;"
title="this text can be pasted into a HTML editor">
tell application "iCal"
repeat with theEvent in (events of calendar "Untitled")
set control to {}
set control to summary of theEvent
set AppleScript's text item delimiters to space
set theSummary to summary of theEvent
set textSummary to text items of theSummary
if the third item of textSummary is "Lab" then
if the fifth item of textSummary is "5-6" then
get theEvent
set theDescription to description of theEvent
set theStatus to status of theEvent
set theStartDate to (start date of theEvent) - 0.5 * hours
set theSummary to summary of theEvent
set theEndDate to end date of theEvent
set theAllDay to allday event of theEvent
set newEvent to (make new event at end of events of calendar "Untitled" with properties {status:theStatus, start date:theStartDate, summary:theSummary, end date:theEndDate, allday event:theAllDay})
set oldEvent to ""
set theEvent to oldEvent
get theEvent
delete theEvent
end if
if the fifth item of textSummary is "3-4" then
get theEvent
set theDescription to description of theEvent
set theStatus to status of theEvent
set theStartDate to start date of theEvent
set theSummary to summary of theEvent
set theEndDate to (end date of theEvent) + 0.5 * hours
set theAllDay to allday event of theEvent
set newEvent to (make new event at end of events of calendar "Untitled" with properties {status:theStatus, start date:theStartDate, summary:theSummary, end date:theEndDate, allday event:theAllDay})
delete theEvent
end if
end if
end repeat
end tell
</pre>Hello
The posted event log indicates some inconsistent behaviour of iCal in referencing item 2 of every event. I.e., it could access it first and failed to do so after a new event is created. Scent of bug here. Or possibly inserting ugly small delay after event creation might let the script delete the newly created event...
Anyway, the 'by index' reference form of object must be used very carefully when object can be deleted or added dynamically.
Also I wish to add that it is not recommended to use an object specifier, that returns list of objects, as the base list for repeat statement, such as :
--CODE1
-- # not recommended
repeat with theEvent of (events of calendar "Untitled")
-- omitted
end repeat
--END OF CODE1
Instead, you'd better get the list first and use it, such as :
--CODE2
-- # recommended
repeat with theEvent of (get events of calendar "Untitled")
-- omitted
end repeat
--END OF CODE2
The reason is as follows.
In CODE1, the iterator is assigned as item k of events of calendar "Untitled", where k iterates from 1 to count of events of calendar "Untitled" at the time of loop entrance. The problem is that this list of events is dynamic list which may change when event is deleted or added, and consequently item k as iterator may no longer refer to the item k of the original collection of events.
In CODE2, the iterator is assigned as item k of a static list which is obtained by statement 'get events of calendar "Untitled" at the time of loop entrance. If the event object is returned in 'by ID' reference form (or any form other than that depends upon index in the container), item k as iterator is guaranteed to refer to the item k of the original collection of events whether or not collection changes.
Thus you may try something like this :
--SCRIPT
(* not tested *)
tell application "iCal"
tell calendar "Untitled"
repeat with theEvent in (get its events) -- # get the objects list
set theEvent to theEvent's contents -- # dereference each once
set AppleScript's text item delimiters to {space}
set textSummary to text items of summary of theEvent
set AppleScript's text item delimiters to {""} -- # reset astid
if item 3 of textSummary is "Lab" then
if item 5 of textSummary is "5-6" then
tell theEvent
set prop to {¬
start date:(its start date) - 0.5 * hours, ¬
end date:its end date, ¬
status:its status, ¬
summary:its summary, ¬
allday event:its allday event}
end tell
make new event at end of events with properties prop
delete theEvent
end if
if item 5 of textSummary is "3-4" then
tell theEvent
set prop to {¬
start date:its start date, ¬
end date:(its end date) + 0.5 * hours, ¬
status:its status, ¬
summary:its summary, ¬
allday event:its allday event}
end tell
make new event at end of events with properties prop
delete theEvent
end if
end if
end repeat
end tell
end tell
--END OF SCRIPT
Hope this may help,
H -
Use abap class event as terminating event
Hi,
The class is say ZCL_WF_CLASS and the event END_WF.
What needs to be done to have this event used correctly as a terminating event of a workflow? Does this event require a parameter to hold the workitem id (or workflow id), as currently this event has no parameters?
Previous developer has developed the class and event and installed as a terminating event but the workflow is going into error not terminating correctly. I believe the incorrect development of the event and/or its use in the workflow is the issue. Note that nowhere is this event currently raised in any code of the workflow.
Cheers,
RossHello,
Unless I'm mistaken, a terminating event for a workflow is just like any wait-for event in a workflow.
It can be based on any object or class and it can be used in various ways - to terminate a branch or terminate the workflow, for example.
The workflow listens out for the event and checks if there is a matching key. You could base it on the key of a workflow object but it makes more sense to base it on an object or class that's used in the workflow - e.g. the POSTED event of an object would be used to terminate a workflow seeking approval for the posting of an object.
It definitely won't work if the event has no parameters. I guess if you do base it on the workflow object then you would use the top-level workitem id. Try it with a test workflow and SWUE to generate the event.
regards
Rick Bakker
hanabi technology
Maybe you are looking for
-
Incorrect clearing date on AP payment document
We did a payment run (F110) on 1/31/2008 for various vendors and all the payments were posted on that same day. However, we noticed that there are 4 invoices that now show clearing date = 02/02/2008, even though these invoices were included in the
-
Hello everyone, I have an issue: I Know the aggregate function ORDER BY and I know we can specify the columns we need to put in order and if they have to be ASCENDING or DESCENDING But I'd like to create a "personal criterium", for example i have the
-
How can I show tree's nodes in a Popup List of values
I have a tree and in a different form for an item I want to write nodes together for example computer/desktop/asus/.... computer/pda/hp/... this must be shown in a popup list of values can you help? thanks
-
RMS and offline purchase order creation
Hi, We are currently in CRP for RMS13 and discussing the options for buyers to have something on their laptop for PO creation while at the vendor or factory. Unfortunately in the far Far East, the buyers tell us that internet bandwidth is scarse and/
-
Saving CSV file on Share Point folder
Hi, When trying to save a project map to a csv file on a Share Point folder we got this error: "Project does not support resource pooling on a web server". can anyone help me with this? thanks, Yuval