Skip to Content
0
Former Member
Mar 19, 2004 at 08:05 PM

Client Side Eventing using epcftoolbox between two JSPDynPage !!

25 Views

I have created two iviews using JSPDynPage and using epcftoolbox to do client eventing.

I have used the example provided by in the zip file

"iView Client Side Eventing with the EPCF Toolbox service"

by Dr. Ron Hendrickx at the following url ..

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/iview client side eventing with the epcf toolbox service

[ You can find the document by typing "EPCF Toolbox" on the search function under SDN content ]

I wrote the following iView class ...

import com.sapportals.portal.prt.service.epcftoolbox.IEpcfToolbox;

import com.sapportals.portal.prt.service.epcftoolbox.IClientEventSender;

public class testIView1 extends PageProcessorComponent

{

public DynPage getPage()

{

return new iViewDynPage();

}

public static class iViewDynPage extends JSPDynPage

{

private final static String XURN = "testIView";

private final static String XEVENT = "PARAMETER";

iViewDynPage()

{

this.setTitle( "Test iView");

}

public void doInitialization()

{

}

public void doProcessAfterInput() throws PageException

}

public void doProcessBeforeOutput() throws PageException

{

Form myForm = this.getForm();

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

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

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

IClientEventSender mySender = myServ.getClientEventSender(request, XURN, XEVENT);

mySender.setParameter("PARAM1", "Test" );

myForm.addRawText(mySender.getWrappedScript());

this.setJspName("testPage.jsp");

}

}

}

The following line in doProcessBeforeOutput() method raises null pointer exception when I open the iView.

Form myForm = this.getForm();

I need to get the form so that I can write the javascipt to the page as explained in the example.

Any help will be appreciated !!