KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlets > exomvc > jsp > ListUserPage


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.portlets.exomvc.jsp;
6
7 import java.util.List JavaDoc;
8 import javax.portlet.ActionRequest;
9 import javax.portlet.ActionResponse;
10 import javax.portlet.RenderRequest;
11 import javax.portlet.RenderResponse;
12 import org.exoplatform.commons.utils.PageList;
13 import org.exoplatform.container.PortalContainer;
14 import org.exoplatform.portlet.exomvc.JSPPage;
15 import org.exoplatform.services.organization.OrganizationService;
16
17 public class ListUserPage extends JSPPage {
18   
19   public void processAction(ActionRequest req, ActionResponse res) {
20  
21   }
22   
23   public void render(RenderRequest req, RenderResponse res) throws Exception JavaDoc {
24     PortalContainer container = PortalContainer.getInstance() ;
25     OrganizationService orgService =
26       (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class) ;
27     PageList pageList = orgService.getUserPageList(15) ; // 15 users per page
28
//List page = pageList.currentPage() ; //get current use in page 1
29
List JavaDoc all = pageList.getAll() ; // get all users in db
30
req.setAttribute("jsp.list.user.page.users" , all) ;
31     super.render(req, res) ;
32   }
33 }
Popular Tags