1 5 package org.exoplatform.portlet.faces.component; 6 7 import java.util.HashMap ; 8 import java.util.List ; 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 20 public class UIPortletPreferences extends UIExoCommand implements Node { 21 protected static Log log_ = getLog("org.exoplatform.portal.faces.portlet"); 22 final static public String EXECUTE_ACTION = "execute"; 23 public static final String INPUT = "input"; 24 public static final String TEXT_AREA = "textarea"; 25 public static final String SAVE_PREFERENCES = "textarea"; 26 27 protected HashMap prefsMap_; 28 protected String actionURL_; 29 private String 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 children = getChildren(); 39 uiPreferencesForm.setRendered(true); 40 children.add(uiPreferencesForm); 41 } 42 43 44 public String getName() { 45 return tabTitle_; 46 } 47 48 public String getIcon() { 49 return "no-icon"; 50 } 51 52 public String getDescription() { 53 return "no desc"; 54 } 55 56 public HashMap getPreferencesMap() { 57 return prefsMap_; 58 } 59 60 61 } | Popular Tags |