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

epcftoolbox hangs

I'm trying to get the IEpcfToolbox working but when I open my iview, it keeps loading and loading but nothing is shown. I'm using the following piece of code:

public class ContactDisplayBisDynPage extends JSPDynPage {

...

public void doProcessBeforeOutput() throws PageException {

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

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

IEpcfToolbox myServ = (IEpcfToolbox) PortalRuntime.getRuntimeResources().getService(IEpcfToolbox.KEY);

IClientEventReceiver myReceiver = myServ.getClientEventReceiver(request, "contactForm", "okClicked");

myReceiver.setEventFilter(IClientEventReceiver.EVENT_FILTER_ALL);

response.write(myReceiver.getWrappedScript());

if (myReceiver.isReceived()) {

response.write("yoehoe");

}

this.setJspName("contactform/displaybis.jsp");

}

}

I did add a SharingReference=epcftoolbox in portalapp.xml. Any hints are welcome, thanks in advance!

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2004 at 11:07 AM

    Your code seems strange as you are writing to the response object from within a JSPDynPage. Maybe this is the problem?

    Or maybe your page is not really loading any more, IE just thinks the page is not finished. (Because of that response.write() thing you do).

    Maybe just try to view the source code of the loading page with a right click in IE.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2004 at 06:34 AM

    You might be right, that's why I changed my code but I stell get the same effect... Any hints are very much appreciated!

    public class ContactDisplayBis extends AbstractPortalComponent

    {

    protected void doContent(IPortalComponentRequest request, IPortalComponentResponse response) {

    IEpcfToolbox myServ = (IEpcfToolbox) PortalRuntime.getRuntimeResources().getService(IEpcfToolbox.KEY);

    IClientEventReceiver myReceiver = myServ.getClientEventReceiver(request, "contactForm", "okClicked");

    myReceiver.setEventFilter(IClientEventReceiver.EVENT_FILTER_ALL);

    response.write(myReceiver.getWrappedScript());

    myReceiver.setWaitingMessage("Waiting for events ...");

    while (!myReceiver.isReceived()) {

    response.write("yoehoe");

    }

    }

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2004 at 06:43 AM

    I made a mistake in my previous posting, the while-loop should obviously be 'if (myReceiver.isReceived())' which fixes the hanging. But it doesn't work yet, upon raising the okClicked event, nothing is shown...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Still, two things to concern:

      1. your iview will show something only when it has received and event. otherwise nothing is displayed. Just for the test, put a response.write("Here I am"); statement at the beginning of your doContent(..) method.

      2. The waiting message will appear when the iView is reloading because of an event. Do you have another iView on the same page that sends an event with urn 'contactForm' and eventName 'okClicked'? If not, no event is raised, and nothing will happen 😊

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2004 at 06:42 AM

    1) Here i am is displayed as it should

    2) Yes I do raise an event from within another iview in the same page. Little JSP extract:

    <hbj:form id="contactForm" method="post">

    <hbj:button id="okButton" text="OK" onClick="onOkClicked" onClientClick="clientOkClicked()" design="EMPHASIZED">

    <% contactForm.setDefaultButton(okButton); %>

    </hbj:button>

    </hbj:form>

    <script language="JavaScript">

    function clientOkClicked() {

    EPCM.raiseEvent("contactForm", "okClicked", "ok");

    }

    </script>

    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.