Skip to Content
0
Former Member
Nov 23, 2004 at 01:52 PM

PageStructureFactory class

15 Views

Hello,

I have the code:

...

...

...

import com.sapportals.portal.pb.dynamic.IPageStructure;

import com.sapportals.portal.pb.dynamic.PageStructureFactory;

import com.sapportals.portal.prt.component.AbstractPortalComponent;

import com.sapportals.portal.prt.component.IPortalComponentContext;

import com.sapportals.portal.prt.component.IPortalComponentRequest;

import com.sapportals.portal.prt.component.IPortalComponentResponse;

import com.sapportals.portal.prt.pom.IEvent;

import com.sapportals.portal.prt.pom.INode;

public class MySearch extends AbstractPortalComponent

{

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

INode dynamicPageNode = request.getNode().getChildNodesByName("DynamicPage").item(0);

response.include(request,dynamicPageNode);

}

public void doOnNodeReady(IPortalComponentRequest request, IEvent event)

{

IPortalComponentContext DynamicPageContext = request.getComponentContext("com.sap.portal.pagebuilder.pageBuilder");

INode DynamicPageNode = request.getNode().getPortalNode().createComponentNode("DynamicPage",DynamicPageContext);

<b>IPageStructure pageStructure = PageStructureFactory.createPageStructure(IPageStructure.EQUAL_WIDTH_LAYOUT_COMPONENT_NAME );</b> List cont1IViews = new LinkedList();

cont1IViews.add("pcd:portal_content/com.sap.pct/admin.templates/iviews/com.sap.portal.welcome_iView");

pageStructure.setContainerIViews("column1",cont1IViews);

List cont2IViews = new LinkedList();

cont2IViews.add("com.sap.portal.pagebuilder.default");

pageStructure.setContainerIViews("column2",cont2IViews);

DynamicPageNode.putValue(IPageStructure.PAGE_STRUCTURE_VALUE_NAME ,pageStructure);

request.getNode().addChildNode(DynamicPageNode);

}

}

At the bolded line, I get the error:

Caused by: java.lang.NoClassDefFoundError: com/sapportals/portal/pb/dynamic/PageStructureFactory.

The PageStructureFactory's jar was imported, and it exist in the properly jar. Where is the problem ?

Thanks for any help and feedback

Best Regards.

Altafin