Skip to Content
Former Member
Sep 29, 2005 at 09:19 AM

dynamically creating a submenu reading km repository for menu items


hi all

i need to create a submenu (HoverMenu) dynamically displaying folders in KM Repository.

The KM repository structure is as follows:


Under quicklnks there are further folders -> folder1, folder2, folder3

so my menu should look likke this:

<i>(Main Menu)--></i> QuickLinks

<i>(sub menu) --></i> Add to quick links >

<i>(displaying folders from km)--></i> folder1

<i>(displaying folders from km)--></i> folder2

I am new to KM API's - how do I get this in place.

I have looked through the "Java Development with KMC platform" but my code does not seem right. Please help!!

//add sub menu

HoverMenu itemSubDept = itemAdd.addSubHoverMenu("Departments");

IUser user = (IUser) request.getUser();

IResourceFactory factory = ResourceFactory.getInstance();

RID rid = RID.getRID("/company/webcontent/quickinks");

IResourceContext context = new ResourceContext(user);

<b>int numFoldersInQuicklinks = ??</b>

Vector values = new Vector();

for(int i=0; i<<b>numFoldersInQuicklinks</b>; i++){

IResource resource = factory.getReource(rid,context);


HoverMenuItem itemDept = itemSubDept.addMenuItem("dept", values<i>);


Message was edited by: RD