You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sv...@apache.org on 2005/08/09 03:06:17 UTC
svn commit: r230942 -
/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/selectOneCountry/SelectOneCountryRenderer.java
Author: svieujot
Date: Mon Aug 8 18:06:05 2005
New Revision: 230942
URL: http://svn.apache.org/viewcvs?rev=230942&view=rev
Log:
SelectOneCountry cosmetics.
Modified:
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/selectOneCountry/SelectOneCountryRenderer.java
Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/selectOneCountry/SelectOneCountryRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/selectOneCountry/SelectOneCountryRenderer.java?rev=230942&r1=230941&r2=230942&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/selectOneCountry/SelectOneCountryRenderer.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/selectOneCountry/SelectOneCountryRenderer.java Mon Aug 8 18:06:05 2005
@@ -80,7 +80,7 @@
map.put(tmp.getDisplayCountry(currentLocale), countryCode);
}
- List countriesSelectItems = new ArrayList( map.size());
+ List countriesSelectItems = new ArrayList( map.size() );
Integer maxLength = component.getMaxLength();
int maxDescriptionLength = maxLength==null ? Integer.MAX_VALUE : maxLength.intValue();
@@ -93,9 +93,8 @@
String label;
if( countryName.length() <= maxDescriptionLength )
label = countryName;
- else{
+ else
label = countryName.substring(0, maxDescriptionLength-3)+"...";
- }
countriesSelectItems.add( new SelectItem(countryCode, label) );
}