Skip to Content
0
Former Member
Nov 29, 2006 at 07:28 AM

JspDynPage with JavaBean

34 Views

Hi All,

I created a JspDynPage Component which will retrieve Vector data through the javaBean and Display it in jsp page as treeView. I poresented my coding below.

public void doProcessAfterInput() throws PageException

{

// Get the request, context and profile from portal platform

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

IPortalComponentContext myContext = request.getComponentContext();

// Get the bean from application context

myBean = (TreeBean) myContext.getValue("myBeanName");

myBean = new TreeBean();

//Set Data To Bean

read myRead =new read();

Vector vec = myRead.getMenu();

myBean.setTreeMenu(vec);

}

I n JSP File

<hbj:tree id="S_Tree" title="Menu" tooltip="Menu in TreeView" rootNodeIsVisible="TRUE" offsetForTreeNode="20" >

<%

vec = myBeanName.getTreeMenu();

len = vec.size();

for(i=0;i<=len;i+2)

{

sId = vec.elementAt(i).toString();

sText = vec.elementAt(i+1).toString();

%>

<hbj:treeNode id="<%=sId %>" text="<%=sText %>" isOpen="FALSE" >

<%

}

%>

</hbj:treeNode>

</hbj:tree>

I could able to creat PAR file ..but when tryng to run the Application, Its giving

Portal Runtime Error

An exception occurred while processing a request for :

iView : TreeMenu.TreeExample

Component Name : TreeMenu.TreeExample

Can anyone help me regardingthis?

Regards,

Eben