Skip to Content
author's profile photo Former Member
Former Member

Client Side Eventing

Hi Friends,

I am developing portal components using Eclipse 2.0, Tomcat-PDK 5.0.6 and jdk1.3.1.

I created 2 iviews using DynPage. Both the class files are kept in the same package(event.sample).Iview no 1 the sender generates an event and the iview no.2 the receiver captures the value from the data bag and updates the content. The problem is that the method receiver.isReceived() returns false even if an event is generated by the sender.

Can anybody help me out in rectifying this problem?. Whats the use of adding and getting Wrapped Script ?.

Receiver (Code Snippet)

-


IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();

IEpcfToolbox myserv = (IEpcfToolbox)request.getService(IEpcfToolbox.KEY);

IClientEventReceiver receiver = myserv.getClientEventReceiver(request,"event.sample","clicked") ;

receiver.setEventFilter(IClientEventReceiver.EVENT_FILTER_ALL);

response.write(receiver.getWrappedScript());

Sender(code snippet)

-


IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();

IEpcfToolbox myserv = (IEpcfToolbox) request.getService(IEpcfToolbox.KEY);

IClientEventSender sender = myserv.getClientEventSender(request,XURN,XEVENT) ;

Form myForm = this.getForm();

myForm.addRawText(sender.getWrappedScript());

How to go about with this eventing if iam using JSPDynPage?.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 06, 2004 at 11:19 AM

    Hi,

    1. are these two the same:

    ,"event.sample","clicked")

    ,XURN,XEVENT)

    Possibly not - check it out. They must be the same. The Event Filter All only effects that a server request is issued, but if the event URN and name are not equal, isREceived will return false.

    2. EPCF basically is a JavaScript API in the portal. The toolbox classes serve only in generating the necessary JavaScript for standard tasks. getWrappedScript() is equal to the Java expression "<script>"getScript()"</script>"

    Writing the generated script to the response will enable that the receival of a EPCF event at the client side will effect a request to the server (for the receiver part). At the sender iView, the generated script will issue a EPCF event at the client side.

    3. Either check out the PDK WRT EPCF, or have a look on what's generated by the EPCFToolbox in the Internet Explorer 'view source' view of your iView.

    Regards,

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I have the same problem (using EP 60 SP2 though), that the event never arrives in the receiver iview.

      The getWrappedScript() returns Javascript that is commented out. Example:

      " <!-- EPCM.storeClientData('RIGCALLOrgParProject','AllKeys','');EPCM.raiseEvent('RIGCALLOrgParProject','buttonpressed','','/irj/servlet/prt/portal/prtpos/pcd!253aportal!255fcontent!252fcom!252......."

      This I can also see this via "View Source" in internet explorer.

      Do you know why this is commented out? I thínk that might be the problem.

      Thanks in advance and Best regards,

      David

  • author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2005 at 07:37 AM

    Hi Saravanan,

    Go with what Armin has said, his point 1 is very important.

    Also make sure that the iViews have their "Isolation Method" property set to "URL".

    Patrick.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.