You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gc...@apache.org on 2011/09/08 22:35:29 UTC
svn commit: r1166892 -
/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
Author: gcrawford
Date: Thu Sep 8 20:35:28 2011
New Revision: 1166892
URL: http://svn.apache.org/viewvc?rev=1166892&view=rev
Log:
TRINIDAD-2138 partial state saving and client id caching not wroking together
Modified:
myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java?rev=1166892&r1=1166891&r2=1166892&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java Thu Sep 8 20:35:28 2011
@@ -532,6 +532,7 @@ abstract public class UIXComponentBase e
{
// set the reference
_parent = parent;
+ _resetClientId();
if (parent.isInView())
{
@@ -555,21 +556,25 @@ abstract public class UIXComponentBase e
// (un)set the reference
_parent = parent;
+ _resetClientId();
}
+ }
+ }
- // clear cached client ids if necessary
- if (_clientId != null)
- {
- String newClientId = _calculateClientId(FacesContext.getCurrentInstance());
+ private void _resetClientId()
+ {
+ // clear cached client ids if necessary
+ if (_clientId != null)
+ {
+ String newClientId = _calculateClientId(FacesContext.getCurrentInstance());
- // if our clientId changed as a result of being reparented (because we moved
- // between NamingContainers for instance) then we need to clear out
- // all of the cached client ids for our subtree
- if (!_clientId.equals(newClientId))
- {
- clearCachedClientIds();
- _clientId = newClientId;
- }
+ // if our clientId changed as a result of being reparented (because we moved
+ // between NamingContainers for instance) then we need to clear out
+ // all of the cached client ids for our subtree
+ if (!_clientId.equals(newClientId))
+ {
+ clearCachedClientIds();
+ _clientId = newClientId;
}
}
}