on 11-23-2004 1:52 PM
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
Hi Altafin,
"The PageStructureFactory's jar was imported, and it exist in the properly jar" ?!?!?!
If this means what I read, then --> You should <i>not</i> copy the portals JARs into your own component,
but reference them within your portalapp.xml.
Here you will need to reference within (Private)SharinfReference: com.sap.portal.pagebuilder
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Detlev:
I also had the same problem. And I put the com.sap.portal.pagebuilder into portalapp.xml. Here is my xml file:
<application>
<!THIS FILE IS A COPY OF THE ORIGINAL VERSION STORED IN THE PCD. PLEASE DO NOT CHANGE IT!>
<application-config>
<property name="SharingReference" value="com.sap.portal.pagebuilder, com.sap.portal.pagebuilder.utils"/>
<property name="Vendor" value="sap.com"/>
<property name="Domain" value="portal"/>
<property name="startup" value="true"/>
</application-config>
<components>
<component name="DynamicPageSample">
<component-config>
<property name="ClassName" value="DynamicPageSample"/>
<property name="SafetyLevel" value="no_safety"/>
</component-config>
<component-profile/>
</component>
<component name="PageBuilderClientAPI">
<component-config>
<property name="ClassName" value="PageBuilderClientAPI"/>
<property name="SafetyLevel" value="no_safety"/>
</component-config>
<component-profile/>
</component>
</components>
<services/>
</application>
Is there anything I missed out ?
Fen
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.