How to trap custom events

Hello
I am writing an addin for GroupWise Where I need to trap the event that
the user drags&drops a message(or whatever) from one folder to another. Does
this have to be done via a TPH dll, or can it be done completely via a C3PO?
(I realize this is a bit of a cross-post, but noone seems to be 'home' in
the c3po forum)
Thanks Muchly..
Andrew

Chris
Thank you for your reply. The only way I have been able to detect this
event is via a very convoluted method.
What I do is maintain a list of message ID's in a C3P0. On a timer, I scan
the messages to see if the message counts change. If so, I query my list to
find the new message and bounce that message ID back to my logic. The only
downside to this approach is performance and the occaisional misfire on
account of GW not liking to give up control very easily.
To help performance, I store the messageID's in a balanced binary tree. It
was the most efficient way I could think to do it.
Methinks this must be a bug in GW..... or there is some switch that must be
thrown to get the TPH to see those tokens.
Hope that Helps,
Andrew
<chr_white@yaNO_SPAMhoo.com> wrote in message
news:[email protected]...
>> Shane
>>
>> Thanks for your reply. What I tried to do is create a custom message
>> and
>> insert the registry key to hopefully 'tune in' to that event. The
>> documentation says that you can get custom messages by inserting keys
>> saying
>> for example GW#E#365 which will give you all commands with that
>> persistentID. However, in trying it, I did not get any response from
>> GroupWise for that event. I just REALLY dont want to have to make a TPH
>> dll
>> if I dont have to.
>>
>> Andrew
>>
>> <Shane>; "Devnet SysOp 57" <[email protected]> wrote in message
>> news:[email protected]...
>> > Hello, Andrew.
>> >
>> > I did a quick scan of the C3PO documentation and couldn't find anything
>> > that looked like it dealt with the moving of a message. I did notice
>> > that in the token documentation there is a token called ItemFolderLink
>> > and another called ItemFolderAltMove. I'm not sure if these would be
>> > the exact tokens that get generated (or even if any do..) when a
>> > message
>> > is moved but it looks like a place you might want to start
>> > experimenting
>> > with.
>> >
>> > Regards,
>> >
>> > Shane
>> >
>> > In article <[email protected]>,
>> > [email protected] says...
>> >> Hello
>> >>
>> >> I am writing an addin for GroupWise Where I need to trap the event
>> >> that
>> >> the user drags&drops a message(or whatever) from one folder to
>> >> another.
>> >> Does
>> >> this have to be done via a TPH dll, or can it be done completely via a
>> >> C3PO?
>> >> (I realize this is a bit of a cross-post, but noone seems to be 'home'
>> >> in
>> >> the c3po forum)
>> >>
>> >> Thanks Muchly..
>> >>
>> >> Andrew
>> >>
>> >>
>> >>
>>
>>
>
> Andrew,
>
> Did you discover a means by which to capture these events at all?
>
> I have a TPH DLL running (for other reasons as well) and I'm also trying
> to
> capture these events. Unfortunately, these events do not appear to
> generate
> tokens at all, so even going the TPH route is not going to work for you
> (unless I'm really missing something).
>
> Chris

Similar Messages

  • How to Access Custom Event using AS3?

    Hi All,
    Maybe it's that its Monday morning and my brain is still foggy, but I can't seem to figure out how to set custom events using AS3.
    I have a custom GridRow itemRenderer, and have declared the event using the appropriate metatags.
    Then I create the GR item dynamically using AS3 instantiation, but the event is not available for selection in the intellisense drop-down.
    Let's take the following as an example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Grid
         xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:renderers="com.brassworks.renderers.*"
         creationComplete="componentInit();"
    >
         <mx:Script>
              <![CDATA[
                   private function componentInit():void
                        newRow     :MyRow     = new MyRow();
                        //newRow.myEvent is not an available option to set
              ]]>
         </mx:Script>
    </mx:Grid>
    Then the itemRenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <GridRow
         xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:classes="com.brassworks.components.classes.*"
         creationComplete="componentInit();"
    >
         <mx:Metadata>
              [Event(name="myEvent", type="flash.events.Event")]
         </mx:Metadata>
         <mx:Script>
              <![CDATA[
                   private function itemChanged(event:Event):void
                   Alert.show("test");
                   this.dispatchEvent(new Event("myEvent"));
              ]]>
         </mx:Script>
         <mx:GridItem>
              <mx:TextInput
                   change="itemChanged"
              />
         </mx:GridItem>
    </GridRow>
    How do I go about setting the handler method for custom events on instantiated items? Do I need to do this via the AddEventListener() method? Does this mean that events aren't exposed in ActionScript like they are in MXML? (In MXML all I have to do is <MyRow myEvent="handler(event)" />.)
    Thanks!
    -Mike

    Yes, I you need to do this via the addEventListener() method.
    myRow.addEventListener( "myEvent", myHandler );
    I hope that helps.
    Ben Edwards

  • 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

  • How to trap WindowClose event?

    I would like to trap the WindowClose event such that when my closing condition is not satisfied, the window would not close.
    Right now everytime i click the X button at the upper right of the window, the window closes automatically. I would like to know how to trap that event so I can control the closing of the window.
    tnx!

    For that you have to implement java.awt.event.WindowListener and override the windowClosing or windowClosed method according to your requirement. Put your code inside that method. But before doing that you have to set the default close operation.
    setDefaultCloseOperation(0);
    Hope this would work.
    Anirban

  • How to trap the event before unlock of locked text frames

    How to trap the event before the message "You must check out the contents of this frame in order to make changes. Check out now?" for locked text frames?
    I have tried installing the service Responder kUserEditTextCmdResponder
    The responder event is fired after the unlock of text frame in this case.
    I was trying the service kEditCmdPreProcessService, but I could not find the companion interface for this service.
    How to find the companion interface?

    calle111 wrote:
    The answer to why i need the event executed if nothing has changed is that in my application the text ring will hold some predefined settings for some other controls. If the user selects one of the predefined settings from the text ring a bunch of other controls will take predefined values. These values in the other controls can now be altered by the user. If the user now wants to re-apply the same set of pre-defined settings as last time it should be as simple as selecting the pre-defined settings from the text ring. If now the same value is selected from the text ring, no event will be executed.
    What you should do instead is change the value of the ring to a "special" value (e.g. using a local variable) whenever one of the other settings change, indicating that the settings have been modified. It seems wrong to show an inconsistent value in the ring, right?
    Now, whenever you change it back to one of the default settings, is IS a value changed event and there is no problem. .
    Here's a quick draft.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    event_testerMOD.vi ‏10 KB

  • 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

  • How to dispatch custom events from an item renderer used for Datagrid Column

    Hi,
    I am using an Item Renderer for a Data Grid Column and in that mxml, I am dispatching a custom event with data.
    But the main mxml which has the DataGrid is not able to resolve the event. How can I solve this?
    Thanks

    Hi,
    This is the constructor for Event.
    public function Event(type:String, bubbles:Boolean  = false, cancelable:Boolean  = false)
    When you created your custom event after extending from Event, for the parent container receives the event, the bubbles property must be set to true.
    Please check if you have done so. That should solve the problem. Let me know if it doesn't.
    Nishad

  • How to create custom events in OIM

    Hi
    We have a requirement to create new notification templates with custom events to send email notifications.
    How should I create a custom event, any pointers are highly appreciated.
    Thanks
    Nagendra

    I am still unclear about the relationship between this report and OIM; as stated OIM allows you to create [url http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/notevents.htm#BEIBDIAA]Custom Notification Events however generally the invocation of them is tied to the [url http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/oper.htm#CCHFBGAA]custom event handler which in turn are tied to OIM operations. In this case AFAIK there is no OIM operation rather the HCM application is querying user data combined with data from HCM. Is the requirement to use the OIM notification feature or can you use other alternatives e.g. [url http://fmwdocs.us.oracle.com/doclibs/fmw/E10285_01/dev.1111/e10224/ns_ws_api.htm#SOASE87208]UMS ?
    I think you could invoke a custom OIM event using the [url http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/apis.htm]OIM APIs specifically using the [url http://docs.oracle.com/cd/E21764_01/apirefs.1111/e17334/oracle/iam/notification/api/NotificationService.html]notification service (for details of related classes refer to the [url http://docs.oracle.com/cd/E21764_01/apirefs.1111/e17334/toc.htm]javadoc).
    However I have not tested this and was unable to find a concrete example from the documentation. Pseudo logic should be something like this:
      Hashtable env = new Hashtable();
      env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, "weblogic.jndi.WLInitialContextFactory");
      env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, http://OIM_HOSTNAME:OIM_PORT);
      OIMClient oimClient = new OIMClient(env);
      oimClient.login(OIM_USERNAME, OIM_PASSWORD);
      NotificationEvent event = new NotificationEvent();
      event.setUserIds(new String[]{"receiverUserId"});
      event.setTemplateName("Template Name");
      event.setSender(null);
      NotificationService notificationService = oimClient.getService(NotificationService.class);
      notificationService.notify(event);Do note that this is provided as illustration and if adopted you will need to implement proper exception handling, store credentials in [url http://docs.oracle.com/cd/E29505_01/core.1111/e10043/devcsf.htm]CSF etc.
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • How to acknowledge custom event?

    Helllo All
    I did a custom event class, imported it in main application,
    added event metatags in it, and dispatched this event along with my
    custom data !
    Works fine till above point
    now my question is
    how can i acknowledge that event in a nested component?
    Main Application - TileList Component - [Item renderer
    Component]
    Thanks in advance

    Hi,
    Try setting the bubbles property of your custom event to true
    and then register a listener for the custom event on the parent of
    the component.
    Hope this helps.

  • How to trap navigation event?

    Anyone can help? I need to trap the navigation events, such as First, Last, Next and Previous? Does SBO have these event?

    Hi,
    In the UI API help file you have the complete list of the menu ID. The topic is "List of Menu Item IDs".
    You can also get the menuUID from SBO. Go to the systray and double click on the SBO icon. This will show a window. Whenever you make a click on SBO, the values on the window will be updated with the information about the clicked item.
    Regards,
    Ibai Peñ

  • Dispatching Custom Events Help

    Hello Everyone,
    I am just learning how to handle custom events, and after spending couple of days tring to understand the process, I am unable to get it going. What I am trying to do is to write a Two Button (component/swf). So when I need to utilize this component in other projects, I can simply load the the swf and be able to fire the buttons.
    I have two button objects on the stage, and I would like these two button object to fire custom events when the parent component is loaded as swf in other projects. Perhaps, I am going all wrong about what I am tring to accomplish here, I would highly appreciate your help.
    After some research, I concluded that I will need to employ Custom Event(s) going for my component. I spent hours on google and have not been able to get it working.
    Here is my code:
    ============================
    CustomEvent Class
    ============================
    package com.custom.apps
        import flash.events.Event;
        public class CustomEvent extends Event
            public static const CUSTOM:String = "custom";
            public var arg:*;
            public function CustomEvent(type:String, customArg:*=null, bubbles:Boolean=false, cancelable:Boolean=false)
                super(type, bubbles, cancelable);
                this.arg = customArg;
            public override function clone():Event
                return new CustomEvent(type, arg, bubbles, cancelable);
            public override function toString():String
                return formatToString("CustomEvent", "type", "arg",    "bubbles", "cancelable", "eventPhase");
    ============================
    DISPATCHING THE EVENTS
    ============================
    import com.custom.apps.*;
    btn.addEventListener(MouseEvent.CLICK, clickHandler);
    function clickHandler(e:MouseEvent):void
        dispatchEvent(new Event(CustomEvent.CUSTOM, customHandler));
        //trace("FIRED");
    function customHandler(e:CustomEvent):void
        trace(e.target);
        trace('hello');

    Kalisto,
    I appreciate your help. Do I have this right? So I can build a navigation component with two links:
    LINK1 | LINK2
    then I load this navigation component/swf into another project and when I click on either of the links, it will dispatch a CUSTOM EVENT and when the event is dispatched, lets say I have a  function (sayHello) listening for that particular event and when the CUSTOM EVENT is dispatched when one of the navigation component's link is clicked the (sayHello()) function would fire itself.
    Can this be done? Am I on the right track?
    I have been at it for couple of days now, I am able to dispatch the event but don't know how to have a function listen for the events. I would highly appreciate it if you can have look at my code.
    Thanks a lot

  • How to create custom infotype for training and event management

    hai freinds can any one tell me how to create custom infotype for training and event managment with following fields
    PS No – PA0000-> PERNR
    Name   - PA0001 -> ENAME
    IS PS.No. – PA0001-> PS no. of Immediate Superior
    IS name PA0001 -> ENAME
    thanx in advance
    afzal

    Hi,
    Your question is not clear for me. Since it is a TEM infotype, it could be a PD infotype.
    If you wish to create a PD infotype, use transaction PPCI to create the infotype.
    But before that you need to create a structure HRInnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
    If you wish to create a PA infotype, use transaction PM01 to create the infotype.
    But before that you may be required to create a strcuture PSnnnn  (where nnnn is the infotype number) with all the fields relevant for the infotype.
    Regards,
    Srini

  • How to enqueue custom AWT event?

    hi,
    in my applet I need to use custom AWT events. I subclass them from java.awt.AWTEvent and set their id to higher as AWTEvent.RESERVED_ID_MAX - as recomended in documentation.
    But how to enqueue such event? A tried to use following approach:
    getToolkit().getSystemEventQueue().postEvent( myEvent );
    and it works fine - but only in browsers usings Sun's VM implementation. In browsers using Microsoft's VM I'm getting following exception:
    com.ms.security.SecurityExceptionEx[matlu/client/ClientConnection.enQueue]: Event queue access denied.
    So the question is: is there any other way to enqueue custom event, which will keep Microsoft's security manager happy?
    thak you very much
    Lubo Matecka

    I know it must be visible... (But it doesnt have to be bigger than 1 pixel...)
    The code I posted is just to illustrate the idea.
    If you need to post multiple events you just replace the AWTEvent member with a LinkedList (or some similar FIFO).
    Then in postEvent you do theLinkedList.addFirst(yourEvent)
    And in paint() you do AWTEvent ev = (AWTEvent)theLinkedList.removeLast();
    process ev.
    if(theLinkedList.size() > 0)
       repaint();Yes. I have run into the same problem, and I did not use the repaint- trick...
    My applet communicates with the server in a separate thread. When a response receives the communication thread should post an event to the AWT- thread to get the response processed.
    My solution here is to process the thread in the communicator- thread. This is a bad solution because it might create multithreading bugs.... but it has proven to work ok in practice.
    Another example is like this. The use presses the mouse at Component B so that:
    1 Component A gets a focusLost event.
    2 Component B gets a mousePressed.
    3 I want to do something in component A that should be done after component B has processed the mousePressed event. This can be solved without using events. You just have to write some more code (You are already in the right thread).

  • How to trap applet window closing event?

    Hi all,
    I would like to know how could one trap the event of the browser window containing an applet being closed by the user?
    Thank you,

    Hi. this would be useful to me too.
    Trouble is, I'm not sure that you can. applet.stop( )
    and applet.destroy( ) might be called, but there is
    no guarentee that you can complete processing before
    you are terminated, especially if you need to do
    something slow, like returning state data to your
    server. And you can't stop the broswer closing.
    I know that in Javascript, you can catch and even
    stop the browser window being closed, which is how
    things like goggledocs can ask for confirmation
    before closing. (window.onbeforeunload( ) ).
    I have toyed with the idea of having a
    javascript/ajax thread in my html, to catch this
    termination, and communicate back to the server from
    java to say a document has changed, but it all seems
    rather heavyweight for such a simple task.Look at Runtime.addShutdownHook()
    You could also try using a WindowListener as well and trap the WindowClose Event.
    stop() should do very little other than invalidate the current thread/run flags
    and then exit. ie: a stop() example
    public void stop()
    task = null;
    or
    public void stop()
    running = false;
    Your run method should look for a stop condition and then exit.
    Otherwise you could be doing stop processing while run is still
    running.
    (T)

  • Could some one explain to me how Custom Events work?

    I tried looking in the live docs and still it confused me, so
    then I went searching on the net and found this very lovely
    tutorial
    http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/
    but still it confused me. The part I am puzzled on the most is that
    when you create like a event that listens for when your mouse
    clicks something is setup like addEventListener(MouseEvent.CLICK,
    eventHandler) etc, etc. And when a mouse is clicked the event is
    triggered! but if the CLICK constant is just a a string value what
    is going on behind the scenes that tells it (lets say Flex is
    talking -->) "okay he/she specified the 'CLICK' constant so I
    guess this means I will make this event happen only when the mouse
    clicks on that particular object" and same with
    MouseEvent.DOUBLE_CLICK how does it know to trigger this event only
    when the mouse double clicks on a item. I want to make my own
    custom events that trigger a particular event based on what a
    object does, but I just don't understand how to set it up and
    implement it.

    HI,
    The hole concept of event dispatcher is that events get fired
    all the time, if there is someone listening to the event or not. In
    your own example, the CLICK event gets fired each time someone
    clicks on the object.
    When you add an event listener basically what you are doing
    is adding a function to a queue of functions that get executed each
    time a specific event is fired. This is very important to keep in
    mind from the object disposal point of view, since for the garbage
    collector to actually kill an object all reference to it must be
    eliminated, and this include the reference in this queue for the
    listening function.
    The reason that an event name is simply a String is so you
    can actually define any event you might like. Still is good
    practice to define constants for your events names since it will
    avoid a lot of errors when writing code.
    Now to fire an event all you need to do is dispatch a
    specific event using the "dispatchEvent" function. This is what
    happens each time you click on an object, the dispatchEvent(new
    Event(Event.CLICK))) function is called.
    If you are using custom events it's a good idea to extend the
    Event class so you can add some extra information to the event, for
    example, in the MouseEvent the x and y coordinates of the mouse are
    added. To dispatch a custom event all you do is call the event
    dispatcher with the custom event:
    dispatchEvent(new CustomEventClass(Some Data));

Maybe you are looking for

  • Unhandled Exception Error - Login Failed for User

    Hello, I am receiving an error when I run my application stating “Unhandled exception has occurred. If you click continue, the application will ignore the error………..Login failed for MyUser. When I click the Continue button the application runs and se

  • Adding text to a photo in iPhoto 08

    New to Mac and iPhoto and while laying out a birth announcmnet I wanted to add text on top f the phots to places the Apple card templates didn't allow. Is there a way to add text to a photo in iPhoto? Thanks. Message was edited by: sdenby

  • Excise duty not capured..?

    Hi gurus Can anybody giv  some inputs.. I hav recd goods, excise duty not capured thru J1IEX, material was consumed, In this case how can i capture the excise duty after MIGO..? Please explain me some inputs..? Thanks sap-mm

  • BigDecimal division

    HI All, I want to use the Bigdecimal logic for dividing the by 100 in message Mapping. How can i achive this..Is there any documentation is available? or anybody can tell me how can i use bigdecimal for  division? REgards Venkatesh

  • Custom Report currency is missing in Total price

    Dear BC Community. When making a Custom Report, the "Total Price" tab doesn't show the currency the order was purchased in. How do I fix this? - Or is it a bug in BC?