Skip to Content
0
Former Member
Sep 07, 2007 at 07:29 AM

Lost Bean when processing my portal component !!!

24 Views

Hi Friends,

I've created a portal component by using JSPDynPage. I defined an object "KanbanScreen", but when I process this object (input data and callback to server) then an error "NullPointerException" appears at some time.

.....
public void doProcessAfterInput() throws PageException {
    	
		IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();
		IPortalComponentContext myContext = request.getComponentContext();
		IPortalComponentProfile myProfile = myContext.getProfile();
		myBean =(KanbanScreen) myContext.getValue("myBeanName");

		myBean.setVendorIdAvailable(false);  //error at this line code

		this.vendorIdAvailable = true;
		

	}

public void doProcessBeforeOutput() throws PageException {

	IPortalComponentRequest request =
		(IPortalComponentRequest) this.getRequest();
	IPortalComponentContext myContext = request.getComponentContext();
	IPortalComponentProfile myProfile = myContext.getProfile();
	IPortalComponentURI componentURI = (IPortalComponentURI) request.createPortalComponentURI();
	componentURI.setContextName(myContext.getContextName());
	myBean.setUrl(componentURI.toString());
	boolean found = false;
.....

I doubt the cause of this problem at line code :

<b>componentURI.setContextName(myContext.getContextName());</b>

Anyone can tell me exactly the cause of this problem?

Thanks,

Gy