myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From caga...@apache.org
Subject svn commit: r499558 - in /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage: SelectOneLanguage.java SelectOneLanguageRenderer.java
Date Wed, 24 Jan 2007 20:26:12 GMT
Author: cagatay
Date: Wed Jan 24 12:26:11 2007
New Revision: 499558

URL: http://svn.apache.org/viewvc?view=rev&rev=499558
Log:
Fixed TOMAHAWK-869. EmptySelection's value is interpreted as empty string instead of null.

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguage.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguageRenderer.java

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguage.java?view=diff&rev=499558&r1=499557&r2=499558
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguage.java
(original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguage.java
Wed Jan 24 12:26:11 2007
@@ -124,7 +124,7 @@
 
         List languagesSelectItems = new ArrayList( map.size() );
         if(getEmptySelection() != null)
-        	languagesSelectItems.add(new SelectItem(getEmptySelection(), getEmptySelection()));
+        	languagesSelectItems.add(new SelectItem("", getEmptySelection()));
 
         Integer maxLength = getMaxLength();
         int maxDescriptionLength = maxLength==null ? Integer.MAX_VALUE : maxLength.intValue();

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguageRenderer.java?view=diff&rev=499558&r1=499557&r2=499558
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguageRenderer.java
(original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneLanguage/SelectOneLanguageRenderer.java
Wed Jan 24 12:26:11 2007
@@ -38,15 +38,6 @@
  * @version $Revision$ $Date: 2005-05-11 12:14:23 -0400 (Wed, 11 May 2005) $
  */
 public class SelectOneLanguageRenderer extends HtmlMenuRenderer {
-
-	public void decode(FacesContext facesContext, UIComponent component) {
-		super.decode(facesContext, component);
-		SelectOneLanguage selectOneLanguage = (SelectOneLanguage) component;
-		//if the empty selection is submitted, reset the submitted value
-		Object submittedValue = selectOneLanguage.getSubmittedValue(); 
-		if(submittedValue != null && submittedValue.equals(selectOneLanguage.getEmptySelection()))
-			selectOneLanguage.setSubmittedValue(null);
-	}
 	
 	public void encodeEnd(FacesContext facesContext, UIComponent component)
     throws IOException



Mime
View raw message