Skip to Content
0
Former Member
Dec 09, 2003 at 03:13 PM

epcftoolbox in PDK problem: myReceiver.isReceived() returns false

29 Views

Hallo all,

I am trying to implement eventing between multiple iviews useing epcftoolbox. I followed the pdk example and the implementation seemed to work the first time I ran it. But then the behaviour of the eventing implementation became unpredictable: e.g. it worked 3 times and quit working afterwards, finally it quit working completely without me having made changes to the code.

Right now I try to figure out why myReceiver.isReceived() returns false although both methods getContext()/getWrappedContext() in the sender and the receiver class are packed with the paramters sent. Below I inserted the code.

In addition tomcat throws some error messages I do not understand:

- Warning: Double flush detected

- Http10: Parse error, empty line

Did anyone make the same experiences? If yes, I would appreciate it greatly if you could share how you dealt with them. Thanks a lot in advance!

Regards,

Helga

P.S.: Before I invest to much time in this - is it right that epcftoolbox is not supported in EP 5? Should I better use the EPCM methodes in the jsps?

-

-


sender class -

-


/**

  • Create output. Called once per request.

*/

public void doProcessBeforeOutput() throws PageException {

... IEpcfToolbox myServ =

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

IClientEventSender mySender =

myServ.getClientEventSender(request, XURN, XEVENT);

Form myForm = this.getForm(); // get the form from DynPage

GridLayout grid = new GridLayout(1, 1);

grid.setCellPadding(2);

grid.addComponent(1, 1, setUpTabStrip());

myForm.addComponent(grid);

if (text != null) {

mySender.setParameter("PARTNER", text);

myForm.addRawText(mySender.getWrappedScript());

text = null;

}

}

-

-


receiver class -

-


public void doProcessBeforeOutput() throws PageException {

... Form myForm = this.getForm(); // get the form from DynPage

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

IClientEventReceiver myReceiver =

myServ.getClientEventReceiver(request, XURN, XEVENT);

myReceiver.setEventFilter(IClientEventReceiver.EVENT_FILTER_ALL);

response.write(myReceiver.getWrappedScript());

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

if (myReceiver.isReceived()) {

myForm.addComponent(

setUpObjektDaten(

myReceiver.getParameter("PARTNER")));

} else {

myForm.addComponent(setUpObjektDaten(""));

}

}