KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portlet > faces > component > UIPortletPreferences


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.portlet.faces.component;
6
7 import java.util.HashMap JavaDoc;
8 import java.util.List JavaDoc;
9 import javax.faces.context.FacesContext;
10 import org.apache.commons.logging.Log;
11 import org.exoplatform.faces.core.component.Node;
12 import org.exoplatform.faces.core.component.UIExoCommand;
13 /**
14  * Wed, Dec 22, 2003 @ 23:14
15  *
16  * @author: Tuan Nguyen
17  * @email: tuan08@users.sourceforge.net
18  * @version: $Id: UIPortletPreferences.java,v 1.8 2004/09/22 01:22:50 tuan08 Exp $
19  */

20 public class UIPortletPreferences extends UIExoCommand implements Node {
21   protected static Log log_ = getLog("org.exoplatform.portal.faces.portlet");
22   final static public String JavaDoc EXECUTE_ACTION = "execute";
23   public static final String JavaDoc INPUT = "input";
24   public static final String JavaDoc TEXT_AREA = "textarea";
25   public static final String JavaDoc SAVE_PREFERENCES = "textarea";
26
27   protected HashMap JavaDoc prefsMap_;
28   protected String JavaDoc actionURL_;
29   private String JavaDoc tabTitle_;
30
31   public UIPortletPreferences(UIPreferencesForm uiPreferencesForm) {
32     setId("UIPortletPreferences");
33     setRendererType("PortletPreferencesRenderer");
34     FacesContext context = FacesContext.getCurrentInstance();
35     actionURL_ = context.getExternalContext().encodeActionURL(null);
36     tabTitle_ = "Preferences";
37
38     List JavaDoc children = getChildren();
39     uiPreferencesForm.setRendered(true);
40     children.add(uiPreferencesForm);
41   }
42
43
44   public String JavaDoc getName() {
45     return tabTitle_;
46   }
47
48   public String JavaDoc getIcon() {
49     return "no-icon";
50   }
51
52   public String JavaDoc getDescription() {
53     return "no desc";
54   }
55
56   public HashMap JavaDoc getPreferencesMap() {
57     return prefsMap_;
58   }
59
60
61 }
Popular Tags