KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlets > portletregistery > renderer > html > PortletInfoRenderer


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.portletregistery.renderer.html;
6
7 import java.io.IOException JavaDoc;
8 import java.util.ResourceBundle JavaDoc;
9 import javax.faces.context.ResponseWriter;
10 import org.exoplatform.faces.core.component.model.Parameter;
11 import org.exoplatform.portlets.portletregistery.component.UIPortletInfo;
12 /**
13  * Created y the eXo platform team
14  * User: Benjamin Mestrallet
15  * Date: 19 juin 2004
16  */

17 public class PortletInfoRenderer
18     extends org.exoplatform.portal.faces.renderer.html.portlet.PortletInfoRenderer {
19   
20   private static Parameter[] editPortletParams =
21     { new Parameter(ACTION , UIPortletInfo.EDIT_PORTLET) };
22   private static Parameter[] addRoleParams =
23     { new Parameter(ACTION , UIPortletInfo.ADD_ROLE) } ;
24   private static Parameter[] deletePortletParams =
25     { new Parameter(ACTION , UIPortletInfo.DELETE_PORTLET) } ;
26   
27   protected void renderFooter(org.exoplatform.portal.faces.component.UIPortletInfo uiPortletInfo,
28     ResponseWriter w, ResourceBundle JavaDoc res) throws IOException JavaDoc {
29     w.write("<div align='center'>") ;
30     linkRenderer_.render(w, uiPortletInfo, res.getString("UIPortletInfo.button.edit-portlet"), editPortletParams) ;
31     linkRenderer_.render(w, uiPortletInfo,res.getString("UIPortletInfo.button.add-role"), addRoleParams) ;
32     linkRenderer_.render(w,uiPortletInfo,res.getString("UIPortletInfo.button.delete-portlet"), deletePortletParams) ;
33     w.write("</div>") ;
34   }
35 }
Popular Tags