Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 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 😊

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded