You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2010/06/24 18:35:42 UTC
svn commit: r957612 -
/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
Author: arobinson74
Date: Thu Jun 24 16:35:42 2010
New Revision: 957612
URL: http://svn.apache.org/viewvc?rev=957612&view=rev
Log:
TRINIDAD-1771 -- add to the 1.2.12.3 branch
Modified:
myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java?rev=957612&r1=957611&r2=957612&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java Thu Jun 24 16:35:42 2010
@@ -1556,9 +1556,6 @@ public abstract class UIXCollection exte
@Override
public Object getRowKey(FacesContext context, UIComponent component, String clientRowKey)
{
- if (_isOptimizedKey(clientRowKey))
- return clientRowKey;
-
ValueMap<Object,String> currencyCache = _currencyCache;
Object rowkey = currencyCache.getKey(clientRowKey);
return rowkey;
@@ -1578,20 +1575,6 @@ public abstract class UIXCollection exte
if (key == null)
{
// we don't have a string-key, so create a new one.
-
- // first check to see if the rowkey itself can be used as the string-key:
- if (rowKey instanceof String)
- {
- // TODO: make sure that this string is suitable for use as
- // NamingContainer ids:
- key = rowKey.toString();
- if (_isOptimizedKey(key))
- {
- // no need to add to the token map:
- return key;
- }
- }
-
key = _createToken(currencyCache);
if (_LOG.isFiner())
@@ -1603,17 +1586,6 @@ public abstract class UIXCollection exte
return key;
}
- private static boolean _isOptimizedKey(String key)
- {
- // if a key could be a number, then it might conflict with our
- // internal representation of tokens. Therefore, if a key could be
- // a number, then use the token cache.
- // if there is no way this key can be a number, then it can
- // be treated as an optimized key and can bypass the token cache
- // system:
- return ((key.length() > 0) && (!Character.isDigit(key.charAt(0))));
- }
-
private static String _createToken(ValueMap<Object,String> currencyCache)
{
String key = String.valueOf(currencyCache.size());