cancel
Showing results for 
Search instead for 
Did you mean: 

epcftoolbox hangs

Former Member
0 Kudos

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!

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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>

Former Member
0 Kudos

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...

Former Member
0 Kudos

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

Former Member
0 Kudos

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");

}

}

Former Member
0 Kudos

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.