Changeset 28569
- Timestamp:
- 01/08/08 12:39:17 (1 year ago)
- Files:
-
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/component/UISelectItem.java (copied) (copied from org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/component/UISelectItem.java)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/component/UISelectItems.java (modified) (5 diffs)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/directory/UIDirectorySelectItem.java (copied) (copied from org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/directory/UIDirectorySelectItem.java)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/directory/UIDirectorySelectItems.java (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/OSGI-INF/deployment-fragment.xml (modified) (2 diffs)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/WEB/nxdirectory.taglib.xml (modified) (1 diff)
- org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/WEB/nxweb-util.taglib.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/component/UISelectItems.java
r27112 r28569 22 22 import java.util.Map.Entry; 23 23 24 import javax.el.ELException; 25 import javax.el.ValueExpression; 26 import javax.faces.FacesException; 24 27 import javax.faces.context.FacesContext; 25 import javax.faces.el.ValueBinding;26 28 import javax.faces.model.ListDataModel; 27 29 import javax.faces.model.SelectItem; … … 38 40 public class UISelectItems extends javax.faces.component.UISelectItems { 39 41 40 public static final String COMPONENT_TYPE_EX = "net.sf.jsfcomp.easysi.UISelectItems"; 41 42 public static final String COMPONENT_FAMILY_EX = "net.sf.jsfcomp.easysi.UISelectItems"; 42 public static final String COMPONENT_TYPE = UISelectItems.class.getName(); 43 43 44 44 protected String var; … … 48 48 protected Object itemValue; 49 49 50 @Override51 public String getFamily() {52 return COMPONENT_FAMILY_EX;53 }54 55 50 public String getVar() { 56 51 if (var != null) { 57 52 return var; 58 53 } 59 60 ValueBinding vb = getValueBinding("var"); 61 return vb != null ? (String) vb.getValue(getFacesContext()) : null; 54 ValueExpression ve = getValueExpression("var"); 55 if (ve != null) { 56 try { 57 return (String) ve.getValue(getFacesContext().getELContext()); 58 } catch (ELException e) { 59 throw new FacesException(e); 60 } 61 } else { 62 return null; 63 } 62 64 } 63 65 … … 70 72 return itemLabel; 71 73 } 72 73 ValueBinding vb = getValueBinding("itemLabel"); 74 return vb != null ? vb.getValue(getFacesContext()) : null; 74 ValueExpression ve = getValueExpression("itemLabel"); 75 if (ve != null) { 76 try { 77 return ve.getValue(getFacesContext().getELContext()); 78 } catch (ELException e) { 79 throw new FacesException(e); 80 } 81 } else { 82 return null; 83 } 75 84 } 76 85 … … 83 92 return itemValue; 84 93 } 85 86 ValueBinding vb = getValueBinding("itemValue"); 87 return vb != null ? vb.getValue(getFacesContext()) : null; 94 ValueExpression ve = getValueExpression("itemValue"); 95 if (ve != null) { 96 try { 97 return ve.getValue(getFacesContext().getELContext()); 98 } catch (ELException e) { 99 throw new FacesException(e); 100 } 101 } else { 102 return null; 103 } 88 104 } 89 105 org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/directory/UIDirectorySelectItems.java
r28492 r28569 42 42 43 43 /** 44 * Component that deals with a list of select items 44 * Component that deals with a list of select items from a directory. 45 45 * 46 46 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/OSGI-INF/deployment-fragment.xml
r27112 r28569 621 621 <component> 622 622 <component-type> 623 org.nuxeo.ecm.platform.ui.web.component.UISelectItem 624 </component-type> 625 <component-class> 626 org.nuxeo.ecm.platform.ui.web.component.UISelectItem 627 </component-class> 628 </component> 629 630 <component> 631 <component-type> 623 632 org.nuxeo.ecm.platform.ui.web.component.editor.UIHtmlEditor 624 633 </component-type> … … 663 672 <component-class> 664 673 org.nuxeo.ecm.platform.ui.web.directory.UIDirectorySelectItems 674 </component-class> 675 </component> 676 677 <component> 678 <component-type> 679 org.nuxeo.ecm.platform.ui.web.directory.UIDirectorySelectItem 680 </component-type> 681 <component-class> 682 org.nuxeo.ecm.platform.ui.web.directory.UIDirectorySelectItem 665 683 </component-class> 666 684 </component> org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/WEB/nxdirectory.taglib.xml
r27726 r28569 8 8 <component-type> 9 9 org.nuxeo.ecm.platform.ui.web.directory.UIDirectorySelectItems 10 </component-type> 11 </component> 12 </tag> 13 <tag> 14 <tag-name>selectItem</tag-name> 15 <component> 16 <component-type> 17 org.nuxeo.ecm.platform.ui.web.directory.UIDirectorySelectItem 10 18 </component-type> 11 19 </component> org.nuxeo.ecm.platform/trunk/nuxeo-platform-ui-web/src/main/resources/WEB/nxweb-util.taglib.xml
r28558 r28569 145 145 </tag> 146 146 <tag> 147 <tag-name>selectItem</tag-name> 148 <component> 149 <!-- see http://jsf-comp.sourceforge.net/components/easysi/index.html, need to include license --> 150 <component-type> 151 org.nuxeo.ecm.platform.ui.web.component.UISelectItem 152 </component-type> 153 </component> 154 </tag> 155 <tag> 147 156 <tag-name>inputFile</tag-name> 148 157 <component>
