Epcf example

hi ,
i am trying to implement a simple example using epcm
... two iviews
sender
<%@ taglib uri= "tagLib" prefix="hbj" %>
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<SCRIPT language ="JavaScript">
function Showdata(){
EPCM.raiseEvent( "urn:com.sap:alarmClock", "morningCall", "Good morning ladies and gentlemen");
</SCRIPT>
   <hbj:form id="myFormId" >
    <hbj:button
        id="test"
        text="click"
        onClick="Showdata()"
        />
   </hbj:form>
  </hbj:page>
</hbj:content>
reciever
<%@ taglib uri= "tagLib" prefix="hbj" %>
<hbj:content id="myContext" >
  <hbj:page title="PageTitle">
<script src= "epcfproxy.js" language="javascript">
function onWakeup(eventObj){
     alert("this is epcf");
     EPCM.subscribeEvent("urn:com.sap:alarmClock","morningCall", onWakeup);
     </script>
   <hbj:form id="myFormId" >
   </hbj:form>
  </hbj:page>
</hbj:content>
but when i click on the button, nothing happens..
both of them are of type url isolated and i placed them on a page..
why is it not working? could some one please help me.
regards

Hi,
Try this example
Producer
=========
<%@ taglib uri="tagLib" prefix="hbj" %>
<hbj:content id="myContext" >
  <hbj:page title="EpcfProducer iView" >
    <script language="JavaScript">
      function buttonClick() {
         // Raise click event
         var aTime = new Date();
         EPCM.raiseEvent ("urn:com.sapportals.training.portal.EpcfProducer", "ClickEvent", aTime);
    </script>
    <hbj:form>
      <hbj:gridLayout
        id="myGrid"
        debugMode="False"
        width="100%"
        cellSpacing="10" >
        <hbj:gridLayoutCell
           rowIndex="1"
           columnIndex="1"
           width="100%" >
        <hbj:button
          id="sendEvent"
          text="Send time"
          width="125px"
          tooltip="This button raises an time event ..."
          onClientClick="JavaScript:buttonClick();"
          disabled="false"
          design="STANDARD"
        />
        </hbj:gridLayoutCell>
      </hbj:gridLayout>
    </hbj:form>
  </hbj:page>
</hbj:content>
Consumer
<%@ taglib uri="tagLib" prefix="hbj" %>
<hbj:content id="myContext" >
  <hbj:page title="EpcfConsumer iView" >
    <script language="JavaScript">
       // Define Handler for Eventing
       function consumerHandler(event){
          resultform.result.value = event.dataObject;
       // Subscribe for company selection event and set the load function as event handler
       EPCM.subscribeEvent("urn:com.sapportals.training.portal.EpcfProducer","ClickEvent", consumerHandler);
    </script>
    <form name="resultform">
      <H3>The current time is :</H3>
      <input type="text" name="result" size=50 disabled>
    </form>
  </hbj:page>
</hbj:content>

Similar Messages

  • Fire EPCF event with WD ABAP in EP

    In EP 7 I want to fire an EPCF event. I use the code below. A similar example from WD java works, but here I never receive the event. The Javascript part is right since it works together with an HTML and WD Java iView. Only the WD example is not working. Any hints?
    ABAP ("triggered by a button")
    DATA:
      L_API_COMPONENT TYPE REF TO IF_WD_COMPONENT,
      L_PORTAL_MANAGER TYPE REF TO IF_WD_PORTAL_INTEGRATION.
    L_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
    L_PORTAL_MANAGER = L_API_COMPONENT->GET_PORTAL_MANAGER( ).
    L_PORTAL_MANAGER->FIRE( PORTAL_EVENT_NAMESPACE = 'urn:xxDemo' PORTAL_EVENT_NAME = 'simpleevent' PORTAL_EVENT_PARAMETER = 'HelloFromABAP' ).
    JavaScript:
    EPCM.relaxDocumentDomain();
    EPCM.subscribeEvent('urn:xxDemo', 'simpleevent', handle_simpleevent_Event);

    Good hint, it was not the domain, but the protocol (http/https).
    One iView was on https while the other one was setup for http.
    However, now the question is: Can I setup EPCF somehow to work with mixed http/https IViews. In my HTML page I can use EPCMProxy, but I have no idea how to change this on a WD ABAP.
    Regards

  • EPCF between BW Report and Par IView

    Hi,
    Can anyone please let me know how can I pass some value from a BW reoprt to another iView which has been developed using JSPDynpage.
    Thanks,
    Vivek

    Hi Sharma -
    You are correct in guessing that you need to modify
    the BW Query template code. You need to incorporate
    Java Script in it. I am providing a sample code from the
    how-to document here.
    3.1 Example Code of the Sender iView <!-- BW data source object tags -->
    <object>
    <param name="OWNER" value="SAP_BW">
    <param name="CMD" value="SET_PROPERTIES">
    <param name="TEMPLATE_ID" value="IDES_BW_ABC_SELECTION"> TEMPLATE PROPERTIES
    </object>
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
    <TITLE>BW Web Application</TITLE>
    <link href= "MIME/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet">
    <script language=javascript>
    <!-- function raiseEvent(value) {
    EPCMPROXY.raiseEvent( "urn:com.sap:BWEvents","BWSetABCClassification", value, null );
    --> </script>
    </HEAD>
    <BODY class="SAPBEXFlexBoxFormBg">
    <form name="myform">
    <select class="SAPBexDdl" name="myselect" size="1" onchange="raiseEvent(document.myform.myselect.options[document.myform.myselect.selectedIndex].value);">
    <option value="PMC_ABC_L" > ABC Classification Vendors </option>
    <option value="PMC_ABC_M" > ABC Classification Material </option>
    </select>
    </form>
    </BODY>
    </HTML>
    There is a how-to document for integrating portal iviews
    and BW iviews using EPCF. Search in SDN with "BW", "Eventing"
    and "Portal" as search strings.
    If you need, I can send you some of the work I have done
    on the similar lines, if I can know your email address.
    Hope this helps,
    Prasad Nutalapati
    SAP America

  • Web Dynpro & EPCF

    Hi All,
    I am kind of confused with EPCF.
    Is EPCF eventing only for JSP Dynpage & HTMLB or is it used in Web Dynro ?
    Does Web Dynpro has feature to replace or supplement the EPCF method of client side event handling ?
    Thanks,
    Kumar

    hi reddy,
    <u><b>Client-side Eventing...</b></u>
    Purpose
    The Enterprise Portal Client Framework (EPCF) provides an infrastructure for scripting used in iViews and by the portal.
    To keep the application design simple and maintain compatibility to different browsers, Web applications usually avoid scripting. However, there are tasks that make it necessary to use scripting, such as:
    ·        Increasing user acceptance for example with context sensitive entry helpers
    ·        Enhancing response time of the application for example through validation of input values
    When a business application uses more than one iView, you need the EPCF service to transfer data between the iViews. The EPCF service provides:
    ·        Mechanisms for eventing between iViews.
    ·        A Java object, called a client data bag, that serves as transient data buffer on the browser.
    The EPCF implementation itself is based on JavaScript and Java applets.
    see the following link also
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/3e98408d953154e10000000a1550b0/frameset.htm
    regards
    sunil

  • EPCF-DSM

    Hi all,
    Does anyone have good documentation for this topic?
    And some practical examples in real time where you use this concept.
    Or if you have any sample code,
    or PDF or any sort of material.
    some sample code snipplets on this topic
    Please help me.
    Thanks & Regards,
    Lokesh

    Hi,
    if you type in EPCF or DSM in the top right box and then click on search you will get several hits with links to documents, forum threads, articles, code snippets etc etc.
    Dion

  • EPCF Client Side Eventing

    Hello,
    I have been working on some EPCF client side eventing examples. I found the example by Dr. Ron Hendrickx at the following URL.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/iview client side eventing with the epcf toolbox service
    So, I imported the .par to Eclipse, I then changed the code so that the sender is a tree holding URL's and the receiver displays them in an IsolatedHtmlContainer and got it working fine.
    My problem is this, when I start a new project in Eclipse and copy/paste the code, properties files, the .classpath and .project files (everything) the IClientEventReceiver isReceived() event is never triggered. The doProcessBeforeOutput() method in the receiver is called but the event is not triggered. Seriously, we have copy/pasted everything exactly, the .par file created is identical in structure to Dr. Hendrick's and yet if I create a new project and make all the files it doesn't work. Only when I work with the .par imported from Dr. Hendrickx's work will the example work. We're thinking maybe some environment variable somewhere is causing this but we've copied the .classpath file, everything is exactly the same but the event will not be received in a project we create ourselves.
    Really, any help with this will be well appreciated.
    David.

    Pumped isolation method is sort of a combination of embedded and URL isolated.  The portal server is used to fetch the content from the website/application.  When the data is ready, it is "pumped" into the browser using an IFRAME tag and an XML based data stream.  This give you the ability to cache the data on the portal server, but get the flexibility of isolated iViews.
    However, we will plan to drop this functionality in the future and "pumped" iviews will automatically be treated as "URL isolated" iviews.

  • Conditions for EPCF level 2 in EP 6

    Hi,
       What exactly are the conditions for EPCF level 2 to be used?  We have the epcfLoader service property "framework.level" set to 2, but when I display the client framework environment test (under Sys Admin - support), EPCM.getLevel() is showing as 1 [JavaScript]!
    I ran that on a browser with java installed, and I have successfully tested an example applet on a different website.
    The other environment entries, in case it helps, are:
    Object: navigator Value
    navigator.platform Win32
    navigator.appName Microsoft Internet Explorer
    navigator.appVersion 4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
    navigator.appCodeName Mozilla
    navigator.userAgent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
    navigator.language undefined
    navigator.browserLanguage en-us
    navigator.cookieEnabled true
    navigator.javaEnabled() true
    Object : EPCM Value
    EPCM.getVersion() 6.0723
    EPCM.getLevel() 1 [JavaScript]
    EPCM.getPortalVersion() 6.4.200509210346
    EPCM.getUAPlatform() 1 [EPCM.NT_PLATFORM (NT 4.0 or NT 5.0)]
    EPCM.getUAType() 1 [EPCM.MSIE]
    EPCM.getUAVersion() 6
    EPCM.getInstanceId() 4df39bb81c7908f48e905509d57ca5ee
    EPCM.getUniqueWindowId() WID1141723870531
    We think the fact that the DSM terminator applet is not being used is causing some other system connections not to be terminated, so any help you can give would be very much appreciated!
    Many thanks,
    Steve

    Thanks Eric,
       I've just had a conversation with SAP about this (due to a different OSS note).  The developer I talked to said that the portal will determine the MINIMUM EPCF level required to run each page and use that.  This is based on the levels set in each portal component on the page (EPCF.Level can be defined in each par file's portalapp.xml), and the MAXIMUM level defined with the framework.level property on the epcfLoader service.
    In this case, the irj only needs level 1 and that's what it uses to run the portal.  Apparently EBP is an example of an app that requires level 2 and so the iviews for that are run in level 2.
    Thanks for all your help and prompt responses!
    Steve

  • Just installed Firefox 4. It hangs when I open any website and type in, for example, an ID, or even just click on something, for example, "Compose", in my webmail site.

    Here's the detail of what happens.
    1. Turn on computer and then click on Firefox icon on desktop.
    2. Firefox opens. Everything looks OK. Mr Bunsen's graphic is working fine.
    3. Click on any webpage link. For example, a newspaper or an online webmail page. All looks OK until
    4. Click on anything or type anything, such as in ID in a box, and bingo, the top line of Firefox goes from dark blue to very pale blue and the computer is hung. You cannot get out of Firefox or get Firefox to work.
    5. Switch off computer.
    Is this perhaps due to a clash of Add-ons. I run Avast anti-virus. McAfee came with Firefox 4 and I did not reject it. Is it conflicting wth something in my system and causing it to hang?

    You can modify the pref <b>keyword.URL</b> on the <b>about:config</b> page to use Google's "I'm Feeling Lucky" or Google's "Browse By Name".
    * Google "I'm Feeling Lucky": http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=
    * Google "Browse by Name": http://www.google.com/search?ie=UTF-8&sourceid=navclient&gfns=1&q=
    * http://kb.mozillazine.org/keyword.URL
    * http://kb.mozillazine.org/Location_Bar_search

  • Some of my apps refuse to open. For example, google crome gives me the message that it quit unexpectedly and gives me the option to submit a report to no resolve. Does anyone have suggestions?

    Some of my apps refuse to open. For example, google crome gives me the message that it quit unexpectedly and gives me the option to submit a report to no resolve. Does anyone have suggestions?

    Welcome to the Apple community.
    Does anyone have suggestions?
    Trash the spyware (Chrome) and use Safari.

  • How can I change the background of a running webpage on my own. Example Facebook I want to change its backround color from white to black just in my view not for all

    How can I change the background of a running webpage on my own. Example Facebook I want to change its background color from white to black just in my view, not for all. Cause I really hate some site with white background because as I read for an hour it aches my eyes but not on those with darker background color.

    You can use the NoSquint extension to set font sizes (text/page zoom) and text colors on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • TS1814 Most of the songs on my iPod Classic no longer dshow up on iTunes on my laptop.  I deleted iTunes & installed the latest version but this did not change anything.  For example on 1 playlist I have 66 songs but only 1 shows on the iTunes screen.  Th

    Most of the songs on my iPod Classic no longer show up on iTunes on my laptop.  I deleted iTunes & installed the latest version but this did not change anything.  For example on 1 playlist I have 66 songs but only 1 shows on the iTunes screen.  Thanks you for any help.

    See Empty/corrupt iTunes library after upgrade/crash or
    Recover your iTunes library from your iPod or iOS device.
    tt2

  • When previewing images by clicking on the thumbnail in an Event for example, I've been finding that many images preview in a 'zoomed in' way so only a small part of the photos is previewed in a highly magnified view.

    When previewing images by clicking on the thumbnail in an Event for example, I've been finding that many images preview in a 'zoomed in' way so only a small part of the photos is previewed in a highly magnified view.
    Initially I could find no cause. Then I tried right click - Edit and on the affected images, always get this warning:
    "Image Cannot Be Edited - This photo was previously edited with another application or with an early version of Iphoto. Duplicate this photo to edit it." and a "Duplicate To Edit" Button is displayed. 
    The external Editor defined for iPhoto is Adobe Photoshop Elements.
    Now, I reckon the MUST be others out there affected by this same apparent Preview bug, yet my searches have not revealed any answers.  Also seems impossible to find a contact number for adobe???
    Thanks

    Start '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Firefox in Safe Mode]''' {web Link} by holding down the '''<Shift ''(Mac Options)'' >''' key, and then starting Firefox. Is the problem still there?

  • Trying to create a simple example. Need Help!

    I'm trying to create a very simlpe examlpe using Swing components to illustrate a MVC architecture.
    I have a JFrame containing a JTree and a JButton.
    What I'd like to happen is when I click the JButton the JTree model is changed in some fashion and the the view is refreshed due to the models change.
    If anyone out there has a simple example of any MVC architecture involving Swing components I'd love to see it.
    Thx

    Sure, look at any of the Sun tutorials. For example, look in your API documentation for JTree; it has a link to a tutorial about how to use JTree.

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • Can not find location of method in Flash example

    The issue that I am having is that I have search high and low to find where the method "flashmo_graphic()" is defined in the example that can be found here:
    http://www.flashmo.com/preview/flashmo_158_heart_effect
    I also attached folder.  There is a "caurina.transitions.*;"  folder being imported, it is attached.  Anyways, you will notice that there is only 1  action script frame and in it around midway there is the code:
    function flashmo_create(e:Event):void
        var mc:MovieClip = new flashmo_graphic();
        mc.gotoAndStop( Math.floor( flashmo_group.numChildren % mc.totalFrames ) + 1 );
    The issue that I am having is finding out what flashmo_graphic() is.  Can anyone tell me what this method is and better yet how I would find out for myself?
    Thanks,
    Brian

    var mc:MovieClip = new flashmo_graphic();
    This is the script to add a movieclip to the stage.
    Go to library.Right click on the first symbol(flashmo graphic) and select linkage you see a pop up with some properties of the symbol.
    In the class you can see  flashmo_graphic  which is the linkage name of the symbol.

Maybe you are looking for