1 5 package org.exoplatform.portlets.weather.component; 6 7 import java.util.List ; 8 import org.exoplatform.container.SessionContainer; 9 import org.exoplatform.container.client.http.HttpClientInfo; 10 import org.exoplatform.faces.core.component.UIInput; 11 12 public class UISelectList extends UIInput { 13 14 protected String value_ ; 15 private List options_ ; 16 17 public UISelectList(String name, String value, List options) { 18 super(); 19 name_ = name ; 20 value_ = value; 21 options_ = options ; 22 setId(name) ; 23 24 HttpClientInfo client = 25 (HttpClientInfo)SessionContainer.getInstance().getMonitor().getClientInfo(); 26 String type = client.getClientType() ; 27 if (type.equals(HttpClientInfo.MOBILE_BROWSER_TYPE)) { 28 setRendererType("XHTMLMPSelectListRenderer"); 29 } else { 30 setRendererType("SelectListRenderer"); 31 } 32 } 33 34 final public String getValue() { return value_ ; } 35 36 final public UISelectList setValue(String s) { 37 value_ = s ; 38 return this ; 39 } 40 41 final public List getOptions() { return options_ ; } 42 43 final public UISelectList setOptions(List options) { 44 options_ = options ; 45 return this ; 46 } 47 } 48 49 | Popular Tags |