Portal Custom Event

Hi,
I wrote a Custome Event class and a Listner to support my Event. They
compile fine as I extended com.bea.p13n.events.Event and implemented
EventListener. However, from the docs
(http://edocs.bea.com/wlp/docs40/events/custmevt.htm), I am not sure
where to drop my custom Event and Listner class so that they can be
used from my portal within a portlet.
Should I place the classes inside a particular directory of the Portal
product? Should I add them to the Event and Listener JARs? Any help is
appreciated.
Thanks in advance.
-n

Hello,
The problem appears to be that you are trying to determine if the portlet was targeted and to send events in preRender()-- this should be done in your backing file's handlePostbackData() method. Some of the earlier links and examples on this discussion thread mixed up "campaign events" with "interportlet events"-- they are two different things. The information about inter-portlet events is located at http://edocs.bea.com/wlp/docs81/ipcguide/overview.html .
Interportlet events can only be sent during the handlePostbackData() backing file lifecycle phase, or when handling another incoming event. If an event is sent during preRender() it may not be delivered to any other portlets, and in later versions of WLP it will actually result in an error being logged.
So your backing file should probably look something like this:
import com.bea.netuix.servlets.controls.content.backing.AbstractJspBacking;
import com.bea.netuix.servlets.controls.portlet.backing.PortletBackingContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
* Sample backing file for sending an event when the portlet
* is clicked.
public class SampleBacking extends AbstractJspBacking
public boolean handlePostbackData(HttpServletRequest request,
HttpServletResponse response)
// Determine if this request originated due to an action
// on our portlet
if(isRequestTargeted(request))
PortletBackingContext context = PortletBackingContext.getPortletBackingContext(request);
context.fireCustomEvent("portletClicked", "my portlet was clicked");
return false;
}

Similar Messages

  • Hiding a custom event in portal eventing

    Hi,
    Can anyone tell me how to hide the custom event in portal eventing?
    Regards
    MQ

    I too use the PopUpManager, but to load Modules and had
    similar event/data and data binding issues. I ran across this post
    and have been integrating it's methods into my original code.
    Perhaps a read might help you as well.
    http://clockobj.co.uk/2007/10/17/simplified-cairngorm-easy-mvc-for-adobe-flex/

  • Documentation for custom event listeners

    Hi,
    I am searching in portal 8.1 documents for using custom events, coding and registering event listeners, and using them in jsp pages. So far my search has been unsuccessful.
    Can some one let me know where i find this info?
    -thanks

    Hi J, 
    Thanks for your reply.
    I didn’t find the custom work item Web Access control Official documents, but you can refer to the information in these articles(it’s same in TFS 2013):
    http://blogs.msdn.com/b/serkani/archive/2012/06/22/work-item-custom-control-development-in-tf-web-access-2012-development.aspx
    http://blogs.msdn.com/b/serkani/archive/2012/06/22/work-item-custom-control-development-in-tf-web-access-2012-deployment.aspx
    For how to debug TFS Web Access Extensions, please refer to:
    http://www.alexandervanwynsberghe.be/debugging-tfs-web-access-customizations/.
    For the custom work item Web Access control Official documents, you can
    submit it to User Voice site at: http://visualstudio.uservoice.com/forums/121579-visual-studio. Microsoft engineers will evaluate them seriously.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 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

  • Post a custom event with jsp portlet

    I have a portal page which contains a jsp portlet and a couple of other portlets.
    The jsp has several links and when the links are clicked and the page is redrawn on the portal, I want the jsp portlet to fire events to which the other portlets in the page can react to.
    To achieve this, I have attached a backing file to a jsp portlet and have a custom event being fired (from the handlePostBack method) when certain conditions are met. The problem is that the handlePostBack method is not called in the jsp portlet lifecycle (only init(), preRender() and destroy() are called). I realize it may be because the urls dont have the _nfpb parameter set. I did try adding that to the link url - but no luck.
    Will someone point me as to what is wrong with the setup described above.
    ram.

    Kevin,
    How would I use postbackURL tag on a url which already has the "?" appended - for example if my url is "/somedomain/something.portal?cmd=4", the postbackUrl tag converts it as "/somedomain/something.portal?cmd=4?_nfpb=true&_page_Label=..."
    Shouldnt it have the intelligence to sense that the url already contains "?" and hence it should use '&' to append further parameters.
    Also if I strip out my "?cmd=4" from the url and just provide the bare url so that it is now free to add the "?_nfpb=true" to the url, how do I instruct the tag to later append my cmd=4 parameter to the query string? I see an attribute called "parameters" but how do I provide a name value pair? Or should I simply provide the string "cmd=4" as attribute value?
    As of now I am contructing the url object and the jsp looks a bit unwieldy though it works :)
    Thanks,
    Ram.

  • Custom Eventing

    I have created a custom event on the result set iview, which is just a url that will open a new browser window.  It works fine except for when the very last column in the result set iview is a link to a pdf document.  If that is the case I get an error and the rest of the table will not show.  Does anyone know what causes this?
    Unfortunately the error is not very specific and the log doesn't offer any help.  It shows only in the last row and column:
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : pcd:<iview location>
    Component Name : com.sap.pct.mdm.appl.masteriviews.ResultSet
    6.
    Exception id: 11:06_02/01/08_0305_15350950
    See the details for the exception ID in the log file

    Hi Sarah,
    Pls refer to the help pointg URLs
    [http://help.sap.com/saphelp_mdm550/helpdata/en/45/c89e544c52570be10000000a114a6b/content.htm]
    [http://help.sap.com/saphelp_mdm550/helpdata/en/46/07984d92ef5a70e10000000a1553f7/content.htm]
    Hope it will help you,
    Best Rgds,
    Krutarth

  • Custom Events and Scheduling more than once

    Hi,
    in BO 4.1, I successfully triggered WebI Report instance generation by a "Custom Event" through scheduling.
    Now, we have the requirement that the report should not be triggered only once but always when the event is triggered.
    At first glance, this looks tricky bc. in order that the report "reacts" to the event, the report itself must be scheduled with the event (it gets an instance "pending" that "wait + reacts" to the event). So it looks like we need schedule the report always manually with "event" before it is ready to react to the event specified in the scheduling.
    Is there any user-friendly trick to make the report react upon every fired event without having to "schedule" the report manually with the event?
    (Similar to schedule daily, just that the event is the trigger, note a daytime...)
    Best Regards

    Hi Florian,
    What is the frequency set under Recurrence option for the report instance?
    Can you give an idea like after how much time the event can be triggered?
    For example, if you are expecting the event to change in an hour, you can schedule the recurrence as hourly or you can specify something like 0 hours and 15 minutes or something like that.
    In that case, once the event is fired, your report instance will be ready to trigger after 15 minutes for the next run.
    Would suggest you to sync with the BO administrator as concurrent triggering of large number of instances can give load on Job Servers.
    Hope it will help in some way.
    Regards,
    Yuvraj

  • Can you send custom events from one form to another?

    I have a compli
    cated application, where I about hundred inp
    uts organized in several input forms. Some of the forms
    require data which has been input in other forms. I have tried to
    dispatch custom events from one form to another, but it dispatches the
    whole form and I only need one or two items.
    Ha anybody else come across such a problem?
    Svend

    One way is to share data in a static singleton

  • Custom Events and Listeners between classes

    I've got a project I've been working on for weeks that I'm
    having yet another problem with. I'm trying to learn AS3 which is
    why it's taking so long but that's not important for this post.
    I wanted to create a custom event class so that I could make
    sure the event does not interfere with other "COMPLETE" events that
    are being passed between classes. In other words, I have a few
    things that need to complete prior to a function being called...
    one is some XML being loaded and another is a font loaded. So, I
    thought I would create a custom FontLoaded class that extends Event
    and make the type something like "FontLoadedEvent.LOADED". That way
    I could listen for the XML "Event.COMPLETE" and this font event
    also.
    Please tell me if I'm going down the wrong path here but I
    don't seem to be getting the dispatched event for my new custom
    event. Also, how does one detect if it's being dispatched other
    than if the eventListener is fired? Any other ways to test
    this?

    You can trace the event to see if it dispatched.
    Also, this is not a good case to create a new event. Custom
    events are used to store additional information. MouseEvent exists
    because Event doesn't have localX, localY, etc. properties. Since
    you don't seem to be throwing additional properties, you can use a
    regular event.
    trace(dispatchEvent(new Event("panelFontsLoaded"));
    addEventListener("panelFontsLoaded", onFontsLoaded);
    Static consts are used to help debug typos. The event type is
    just a string, often stored in a const.

  • Issue in using custom event from outreach

    Hi
    I have created a custom event and executed a scenario successfully for this custom event from ACC. But when I try to configure the same event from Outreach(BCC), I am able to see this custom event in the list of available events, but after selecting this event there is no option to configure attributes for this event, but I can configure attributes in ACC. My BCC version is 10.1.1
    Edited by: 1002715 on Apr 26, 2013 3:06 AM

    Dear Ankit,
    Once the pricing procedure is downloaded, please maintain the document pricing procedure at service contract header level, and maintain the customer pricing procedure at business partner sales area billing data.
    In spro, maintain the pricing procedure for the combination of sales area, document pricing procedure, customer pricing procedure.
    Please crosscheck whether the condition table is active or not.
    Regards,
    Maddy

  • Mac OS / classpath / custom event problem

    I'm having a bit of trouble with a particular classpath
    anomaly, and I have a feeling that it might be a Mac thing.
    Not sure if anyone else can reproduce this, but I managed to
    make a custom event and a class that extends the EventDispatcher
    once. Since then, Flash has refused to admit that any class
    associated with a custom event exists - mostly producing the error
    1046. Even after you take out any references to the event
    dispatcher or a custom event, the class is ignored.
    All my classes are kept in a single 'Packages' folder with
    sub folders that I include in the import statement (I've
    triple-checked the classpath settings, the import statements, and
    the classes themselves - I have probably a hundred or so other
    classes that are fine, and all referenced in the same way, some
    that extend EventDispatcher, some that don't.
    I come across this a few times now - once I was able to fix
    it by putting the .as file in the same folder as my first custom
    event, but this no longer works.
    I'm running Mac OS X 4.11 on two computers - both have the
    same trouble.
    I've tried copying the classes to other folders and changing
    the package/import path accordingly - no go.
    Even stranger, if you copy and paste to a new .as file, and a
    different package folder, the problem persists in that Flash claims
    the revised Package statement (to reflect the new location) does
    not reflect the position of the file - when it clearly does.
    I haven't had this problem with any other home-grown class -
    only those that reference a custom event.
    It sounds like it should be pilot error, and I've spent a
    long time trying to spot a silly mistake. But as this problem has
    recurred a few times now, I'm beginning to think it isn't me.
    Anybody else experience similar classpath problems with AS3
    on a Mac? Anybody have any suggestions?

    I am also a newbie and my answer could be wrong.
    But from the looks of it, You are Unable to load performance pack.
    The solution is "Please ensure that libmuxer library is in :'.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    I hope BEA or someone can tell you the file name of libmuxer. And make sure it is in the Folder where the script is searching/looking.
    Good luck.
    fred

  • Can you edit or add a custom event to contacts to show in Birthday Subscription calendar

    I want to modfy Birthday subscription calendar to include custom events that appear in my Contacts. Is there a way to do this?
    Or how can I create a new subscription calendar to be published in my iCloud acct pulling the custom events from Contacts?

    You have some contacts with more than one birthday?
    To add a custom label for a date, select Edit for an existing contact. Select Add Field. Select Date. Scroll up with the Info window above the date selection and select Other for the new date selection. Select Add Custom Label and then select this label for the new date field for the contact.
    As far as linking dates with multiple contacts, the answer is no to that.

  • I am trying to trigger a custom event using a program but does not work ..

    HI ....i am trying to trigger a custom event of a custom object type using a program but does not work. If trigger the same event using SWUE it works.
    below is the code...
    {Key = '0010001115'. "Sales Order Number (hard-coded)
    CALL FUNCTION 'SWE_EVENT_CREATE'
      EXPORTING
        objtype                       = 'ZXXXXXXXF'
        objkey                        = KEY
        event                         = 'ZEVENT'
      CREATOR                       = ' '
      TAKE_WORKITEM_REQUESTER       = ' '
      START_WITH_DELAY              = ' '
      START_RECFB_SYNCHRON          = ' '
      NO_COMMIT_FOR_QUEUE           = ' '
      DEBUG_FLAG                    = ' '
      NO_LOGGING                    = ' '
      IDENT                         =
    IMPORTING
      EVENT_ID                      =
      RECEIVER_COUNT                =
    TABLES
      EVENT_CONTAINER               =
    EXCEPTIONS
      OBJTYPE_NOT_FOUND             = 1
      OTHERS                        = 2}
    Please guide me if i am missing something.

    Hi Sunny,
    I think you should try creating the event using FM SAP_WAPI_CREATE_EVENT.
    CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
      EXPORTING
        OBJECT_TYPE             =  'ZXXXXXXXF'
        OBJECT_KEY              = key
        EVENT                   = 'ZEVENT'
    *   COMMIT_WORK             = 'X'
    *   EVENT_LANGUAGE          = SY-LANGU
    *   LANGUAGE                = SY-LANGU
    *   USER                    = SY-UNAME
    *   IFS_XML_CONTAINER       =
    IMPORTING
       RETURN_CODE             = rcode
       EVENT_ID                = event_id
    * TABLES
    *   INPUT_CONTAINER         =
    *   MESSAGE_LINES           =
    *   MESSAGE_STRUCT          =
    Regards,
    Saumya

  • 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

  • Custom event in popup w/ dynamic region does not reach its server listener

    Here's the situation:
    I have a fragment taskflow. Inside this taskflow's fragment, I am firing 2 custom client event that is being listened to by 2 server listeners. All of these are working fine when I use the taskflow as a region on a page. But when I use it as a dynamic region inside a popup, only the first event gets processed, the second one(and all subsequent ones) don't reach their respective server listeners.
    Additional detail, all 2 custom events are on the same component(an inputText).
    Is this an ADF bug or am I doing something wrong?
    Edited by: Hyangelo on Aug 3, 2011 5:12 AM

    bump

Maybe you are looking for