Custom event handling

Hi,
Please could someone help? I've been working my way through
the examples in the book 'essential guide to flex 2 and
actionscript 3.0'. When working through the example in chapter 10
I've been unable to get the custom CartEvent event of type
bookSelected to run.
I've stored the
small set of files in a
zip... please could someone tell me where I'm going wrong?
Thanks.
Craig

The most common definition for fireXXXEvent...public void fireXXXEvent(XXXEvent event) {
    synchronized (xxxListenerList) {
        Iterator i = xxxListenerList.iterator();
        while (i.hasNext()) {
            ((XXXListener) i.next()).xxx(event);
}Firing the event is simple. Firing the event in a dedicated event-handling thread (a-la AWT) is less simple - set up an event queue (a-la java.awt.EventQueue) to oversee the event handling thread.
Depending on your circumstances, chances are you won't need a separate thread. In fact, unless you specifically require multi-threading, things will be much simpler if you stick to a single thread.
There's nothing magical about events - it is simply a useful logical representation of a physical model.

Similar Messages

  • Custom event handler

    Just curious. I made a custom event handler that is
    dispatched from within a class when an XML document is loaded. The
    listener is attached to the instance of that class in the FLA. The
    attached code to this thread is what is for the class instance.
    Does that have to be out there? Is there a cleaner way to do it so
    that the code would be away in a class? Just wondering....
    Thanks!

    Well I need my instance to know when the data is loaded into
    the object, but I wish there was a more transparent way to do it. I
    guess I could somehow put that stuff into the initiation of the
    class....

  • Problem reading custom property file from custom event handler.

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

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

  • How to set up a label control from custom event handler?

    Hi,
    Below I try to describe my problem:
    I have a single instance of MyClass (I use Cairngorm framework), with ArrayCollection as a variable, in which I would like to keep a couple addresses from database.
    Additionaly  I created a custom components with a list of people retrieved from database, with eventhandler  for a doubleclick event. After I doubleclick on some person, I create a custom event and dispatch it. In command class connected with this event I connect to the database and get full data about this person and a set of her addresses. This set of addresses I placed into ArrayCollection in my model variable. And now I have a problem, because one of this address (the birth place) I would like to display below the list with persons, in a Panel with a couple of label control, but .... I can't to bind label control to my model.addresses[???] because I don't know if this doubleclicked person has this birth address at all?
    I wonder if it is possible to set up label control in my custom components in time when I'm receiving the data from database in my custom event handler???
    One of the way to achieve this is to define a string var in my model and placed this special address in it, and then the label control to this variable, for instance {model.birthplace}, but this is only needed for a moment, I don't want to keep this address in extra variable in model, because I have already it in my ArrayCollection in model, so it would be a duplicate.
    I hope that you could understand me and my english :-)
    Best regards

    Looks like I migh not be a novice swing programmer for long then.

  • Custom event handler not executing

    Hello.
    I'm to set an event handler to execute after a user gets added a role. I have my plugin.zip file like this:
    -lib/(myjar).jar
    -plugin.xml
    Plugin.xml looks like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    <oimplugins>
         <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
              <plugin pluginclass="com.uti.oim.events.SqlRoleHandler" version="1.0" name="SqlRoleHandler" />
         </plugins>
    </oimplugins>
    Placed it in the plugins directory in my dev environment.
    customhandler.xml looks like this:
    <?xml version='1.0' encoding='UTF-8'?>
    <eventhandlers>
         <action-handler class="com.uti.oim.events.SqlRoleHandler" stage="postprocess" sync="TRUE" entity-type="RoleUser" operation="CREATE" name="SqlRoleHandler" order="1000"/>
    </eventhandlers>
    What am I doing wrong? Thanks.

    I ran into an issue with event hanlders in 11g. This might apply to yours. I was unable to create both a preprocess and postprocess task on the same object. It always threw an error on the postprocess class that it can't be case as a pre process event handler. So the solution was removal of all preprocess and just go with postprocess and use the EntityManager class to make the updates to not trigger another update. We had to process post-create user tasks for bulk recon, and could not process it in pre, so our only option was to move it all to post.
    -Kevin

  • Enhance standard class with event handler method

    In trying to enhance a standard class with a new event handler class, I find that the ECC 6.0 EHP4 system does not appear to recognise the fact the method is an event handler method.  The specific example is a new method to handle the event CL_GUI_ALV_GRID->USER_COMMAND. 
    I notice that the flag called Active has not been ticked - see image below.  Perhaps this is the reason why the event handler is not being triggered.
    Note that there is an event handler for the same event in the standard class which obviously is executed as expected.  Any ideas on limitations in the system or I am missing a step?
    Thanks
    John

    Thank you for your replies.
    There is a bug in the ALV handler of a standard SAP class (when executed in ITS WebGUI) and I was hoping to create a custom event handler as an Enhancement to execute some custom code to sort of "handle the bug". 
    I agree - ideally it should be done in a Z class but that will not give me access to the object methods and attributes of the enhanced class.
    Cheers,
    John

  • Javascript embedded in button pl/sql event handler not being executed

    Javascript calls not working from pl/sql button event handler. What am I missing? Are specific settings needed to execute javascript from pl/sql proceedures?
    Example: Want to toggle target='_blank' off and on in a button pl/sql event handler to open url call in new window & then reset when processing submit is done & the app returns to the form.
    portal form button's pl/sql submit handler:
    begin
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    end ;
    Putting the following in the button's javascript on_click event handler works great:
    this.form.target='_blank'
    to force opening new window with a call in the button's submit pl/sql code via:
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    but then the target='_blank' is left on when the submit is done & we return to the form.
    putting the above javascript as a function (called fcn_newpage) elsewhere (e.g., after form opens) & calling in the submit pl/sql with
    htp.p('fcn_newpage') ;
    also doesn't work.
    Metalink thought this was an application issue instead of a bug, so thought I'd see if anyone knows what's going wrong here. (Portal 9.0.4.1)

    thanks for your discussion of my post.
    Please clarify:
    "htp.p('fcn_newwindow') sends a string":
    What would you suggest the proper syntax for a function fcn_newwindow() call from a pl/sql javascript block that differs from
    htp.p('<script language="Javascript">') ;
    htp.p('fcn_newwindow');
    htp.p('</script>');
    or more simply
    htp.p('fcn_newwindow') ;
    More generally, what I'm trying to figure out is under what conditions javascript is executed, if ever, in the pl/sql of a button (either the submit or custom event handler, depending on the button).
    I've seen lots of posts asking how to do a simple htp.p('alert("THIS IS TROUBLE")') ; in a pl/sql event handler for a button on a form, but no description of how this can be done successfully.
    In addition to alerts, in my case, I'd like to call a javascript fcn from a pl/sql event handle that would pass a URL (e.g., http://www.oracle.com) where the javascript fcn executed
    window.open(URL). The API call to set_target(URL) in pl/sql has no ability to open in a new window, so calling that is inadequate to my needs and I must resort to javascript.
    Its clear in the PL/SQL of a button, you can effect form components since p_session..set_target & p_session.get_target set or get the contents of form components.
    So to see if javascript ever works, I tried to focus on something simple that only had to set what amounts to an enviromental variable when we returned to the form after a post. I chose to try to change the html value of TARGET from javascript in the PL/SQL button because it doesn't need to be implemented until we finish the post and return to the form.
    So I focused on a hack, setting this.form.TARGET='_blank' in the on_click event handler that forced every subsequent URL call or refresh of the form to be a new window. I then wanted to turn off opening new windows once I'd opened the URL call in a new window by setting TARGET='' in the portal form. I can achieve what I want by coding this.form.TARGET='' in the javascript (on_focus, on_change, or on_mousedown, ...) of every form component that might refresh the form. However, that is a ridiculous hack when a simple htp.p('<script>') ; htp.p('this.form.target=""') ; htp.p('</script>') ; at the end of the button's pl/sql event handle should do the same thing reliably if javascript ever works in the pl/sql event handler.
    If we didn't have access to form components through p_session calls, I'd assume it was a scope issue (what is available from the pl/sql event handler). But unless my syntax is just off, when, if ever, can javascript be used in a portal form's pl/sql event handler for a button?
    if I code a javascript funtion in the forms' pl/sql before displaying form:
    htp.p('<script language="JavaScript">') ;
    htp.p('function fcn_new_window(URL)') ;
    htp.p('window.open(URL)' ) ;
    htp.p('</script>') ;
    the function can be called from a button's on_click javascript event handler:
    fcn_new_window('http://www.oracle.com')
    but from the same button's pl/sql submit event handler this call doesn't work: htp.p('fcn_new_window("http://www.oracle.com")')
    So my questions remain: Is there other syntax I need, or does javascript ever work properly from the pl/sql of a form button's event handler? If it doesn't work, isn't this a bug that should be fixed by Oracle?
    I can probably figure out hacks to make things work the way I need, but executing javascript from pl/sql event handlers seems to be the expected way to affect portal html pages (forms, reports, ...) and it seems not to work as expected. I don't feel I should have to implement hacks for something as simple as calling a javascript function from pl/sql when almost every example I've found in metalink or the forums or Oracle Press's "portal bible" suggests using javascript from pl/sql via the utility htp.p() to effect web page components in portal.
    My TAR on the subject, while still open, returned the result basically: "We can reproduce your situation. Everything looks okay to us, but we can't explain how to use javascript where you want or point you to any documentation that would solve your problem or expain why it should not work the way you want it to. We don't feel its a technical issue. Why don't you post the problem on the portal applications forum."
    I'm hoping I'm just missing something fundamental and everything will work if I implement it a little differently. So if anyone sees my error, please let me know.
    by the way, not sure this is germain, but in reference to your comment:
    "redirections in pl/sql procedures give a peculiar result. in a pl/sql procedure, usually, portals give the last redirection statement and ignore anything else coming after it."
    if I try to raise an alert:
    htp.p('alert("you screwed up")');
    return;
    in a pl/sql event handler, it still doesn't raise the alert, even though its the last thing implemented in the event handler. But if I set the value of a text box using p_session..set_value_as_string() at the same spot, it correctly sets the text box value when I return to the form.

  • EmailRecieved Event handler for incoming email in Sharepoint 2013

    Hi,
    I am developing custom event handler to enable incoming email for custom document library.  i have couple of questions.
    1. Once i attached the event handler, i could see incoming email settings for the custom document library, but it displays only 2 options as below :
                  1.   Allow this document library to recieve email
                                 Yes       No
                    2. E-mail address
    All other properties are not displaying. Is this normal behaviour on custom event handler for custom document library or any issue anywhere?
    2. So i have given other properties using powershell as below:
    $list = $web.lists["invoice Documents"]
    $list.EmailAlias ="TestDocument"
    $list.EnableAssignToEmail = $true
    $list.rootFolder.Properties["vti_emailusesecurity"] = 1
    $list.rootFolder.Properties["vti_emailsaveattachments"] = 1
    $list.rootFolder.Properties["vti_emailattachmentfolders"] = "root"
    $list.rootFolder.Properties["vti_emailoverwrite"] = 0
    $list.rootFolder.Properties["vti_emailsavemeetings"] = 0
    $list.rootFolder.Properties["vti_emailsaveoriginal"] = 0
    $List.RootFolder.Update();
    $list.Update();
    here i have given vti_emailusesecurity as 1, so it should allow incoming email for the user who has permission for the list.
    But any user from the domain is sending mail to this list, the Emailrecieved event handler is triggered. I am expecting that this event handler should not be triggered and expecting access denied error in the ULS Log. But that is not happening, and emailrecived
    is triggered and email is delivering to this address successfully.
    Can you please anyone help if experience on this?
    Thanks
    Sathya

    http://www.coretekservices.com/2012/01/26/sharepoint-content-organizer-%25e2%2580%2593-emailing-your-drop-off-library-and-getting-it-to-work
    Central Administration > Monitoring > Review Job Definitions (under Timer Jobs) > Content Organizer Processing
    Also check below:
    http://tutorial.programming4.us/windows_server/SharePoint-2010---Content-Organizer-as-a-Document-Routing-Tool.aspx
    If this helped you resolve your issue, please mark it Answered

  • Unregister Event Handler OIM 11g

    Hi
    I have created a event handler and registered the same within OIM 11g. it gets executed as expected after create user (post process). next i changed some of the code within my custom event handler. and registered the plugin after i unregistered the old one. unfortunately i still see the old output in my logs
    i have purged the metadata chache, i have bounced the OIM but no luck..
    Are there any steps / checks i need to follow after i unregister the event handler.. and also plz confirm whether we need to follow all the steps of registration of event handler every time we make changes to the event handler class. uhhh.. its really time consuming when
    thanks
    shiv

    Hi,
    Please make sure you are shipping updated JAR files in plugin.zip and re-register.
    Follow below steps to re-register plugin,
    1.     Unregister plugin using below command
    ant -f pluginregistration.xml unregister
    2.     Prepare plugin.zip with updated JAR file.
    3.     register plugin using below command
    ant -f pluginregistration.xml register
    You do not need to restart OIM server after re-register and need not to import eventhandler.xml unless you change version of plugin.
    Also you can verify registered plugin details in plugin table with following query (Run on OIM DB),
    select * from plugins;
    Thanks,
    Pradeep.

  • Event Handler not Triggered when user is assigned by Membership Rule

    I have defined a post-processed event handler for RoleUser Entity.
    The handler is triggered normally when a user is manually assigned a role.
    However, it is not trigger, if users are assigned through membership rule.
    I have tried both the single execute method and the bulk execute method.
    OIM version: 11gR2

    Hi,
    Check the list of orchestration handlers triggered for this operation in the Diagnostic Dashboard. Check whether, if your custom event handler is present in the list. If its isn't, then there must be something wrong with your Plugin.
    Thanks,
    RK.

  • OIM 10g Event Handler : Integrated with User Groups.User Members

    I have created custom event handler and integrated it with User Groups.User Members data object.
    here is my code od event handler class:
    public class GroupEventHandler extends tcBaseEvent {
         public GroupEventHandler() {
              this.setEventName("Event Handler Sample");
         protected void implementation() throws Exception {
              System.out.println("============@@@@@@@@ IN EVENT HANDLER ");
              try
              String groupKey = this.getDataObject().getString("Groups.Key");
              writeToFile(groupKey);
              catch (Exception e)
                   e.printStackTrace();
    But I am getting this exception :
    ERROR [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.SERVER - Class/Method: tcTableDataObj/getString encounter some problems: Column 'GROUPS.KEY' not found
    com.thortech.xl.dataaccess.tcDataSetException: Column 'GROUPS.KEY' not found
         at com.thortech.xl.dataaccess.tcDataSet.getColumnIndex(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.getString(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.getString(Unknown Source)
         at oim.GroupEventHandler.implementation(GroupEventHandler.java:19)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcUSG.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcGroupOperationsBean.addMemberUsers(Unknown Source)
         at com.thortech.xl.ejb.beans.tcGroupOperationsSession.addMemberUsers(Unknown Source)
         at com.thortech.xl.ejb.beans.tcGroupOperations_ejm77u_EOImpl.addMemberUsers(tcGroupOperations_ejm77u_EOImpl.java:1671)
         at Thor.API.Operations.tcGroupOperationsClient.addMemberUsers(Unknown Source)
         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 Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy66.addMemberUsers(Unknown Source)
         at com.thortech.xl.webclient.actions.UserGroupMembersAction.assignMemberUsers(Unknown Source)
         at com.thortech.xl.webclient.actions.UserGroupMembersAction.assignGroupMembers(Unknown Source)
         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.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

    Anyone have idea about why "Groups.Key" not found exception thrown here..
    I have assigned this event handler at postinsert event of User Groups.User Members Data Object.

  • How to trigger navigation to a portal iView from server side event handler

    Hi,
    I am modifying the workset map application. I have created custom URL links under each iView which should navigate to different iViews depending on some business logic. So I had to provide a custom event handler for these iVIew links and the path to the next iview is dynamically created by the code in the event handler. Once the new PCD path is generated, the event handler should trigger a navigation to that PCD object. Which APIs can I use to trigger this navigation from the server side event handler? I have done this before in webdynpro where we used WDPortalNavigation (.absoluteNavigation or .relativeNavigation). Is there something similar that i can use in this case (i.e. when developing a simple Portal Application from an AbstractPortalComponent)?

    Hi,
    On my understanding of your requirement.
    the best solution what i think is use Object Based Navigation(OBN).
    Is much suitable to your requirement.
    Moreover you can use
    1.Relative navigation
    2.Absolute navigation.
    In the same way how you used in web dynpro.
    Same thing can be done in abstract portal component also.
    Try using that.
    Thanks & Regards,
    Lokesh
    Edited by: lokesh kamana on Aug 11, 2008 7:23 AM

  • 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 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/

  • Can we apply an event handler only for a custom request in oim 11G?

    Hi,
    We would like to create a custom request for user creation, modification etc.
    I saw that event handlers allow to add business rules by running java code during differents steps of processes.
    I would like to know if we can trigger an event handler on a specific request and not on all user CREATION, UPDATE etc.
    For example, we would like to have differents creation requests and a differents event handler on each request.
    And can we add "logical" input on request form and read them in event handler?
    For example, 3 inputs: day, month and year on the form which fill one user attribute "end contract date".
    Regards,
    Pierre

    thank you Akshat,
    I saw part 19 in the developper's guide. If I understand, I can change the default CreateUserRequestData to define ALL form components that will be used in my differents user creation request templates.
    I can use prepopulation adapter to pre populate field with java code.
    I can use the plug-in point oracle.iam.request.plugins.StatusChangeEvent to run custom java code.
    But they don't mention where you can run java code for a specific creation template named "MyUserCreationTemplate1" and other java code for an other specific creation tempalate" MyUserCreationTemplate2".
    That makes me think we must retrieve the template name in java code and execute the appropriate business logic.
    if request name==MyUserCreationTemplate1
    Edited by: user1214565 on 31 mai 2011 07:42

Maybe you are looking for

  • How to best deal with a 330GB psd?

    I used PTGui to create a gigapixel panorama from 570 16 bit TIFF images. PTGui has the ability to output a layed psb file... 1 layer for each photo in the picture, along with the full photo and an alpha mask to facilitate touch up work. But the size

  • Skinning the "browseForOpen" dialog

    Skinning is really simple and straight forward in Flex. However, is it possible to skin the browseForOpen dialog? If so, please provide a simple example. Best regards, Stefan

  • I have adobe export on my desk top at office but can't find on my laptop at home - can I use both places or do I need another subscription?

    I have adobe export on my desk top at office but can't get it to work on my laptop at home - can I use both places or do I need another subscription?

  • Divide measure by dimension attribute?

    Hi, I have a cube containing a count of emergency accident attendances (measures.count) which links to a location dimension (dim_Location) via Loc_ID. The dim_Location dimension contains an attribute which is the number of people living at that locat

  • Online album on centro

    1. when i upload my pics from my phone album will they show up in my online album in the order they were uploaded? 2. do i have to physically select for my photos to be sent to my online album or is there a way to do it automatically? 3. is there a w