Author: awiner
Date: Sat Apr 14 12:51:19 2007
New Revision: 528864
URL: http://svn.apache.org/viewvc?view=rev&rev=528864
Log:
ADFFACES-424: UIData preceded by transient component in tr:table's detailStamp
facet causes index out of bounds exception
ADFFACES-425: tr:table detailStamp containing tr:table - ClassCastException
when showing details
- UIXCollection and StampState were trying to restore the state of
non-transient components
onto transient components that had been inserted into the collection
component; it needs
to skip over the transient components
Modified:
incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java
incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
Modified:
incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java
URL:
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java?view=diff&rev=528864&r1=528863&r2=528864
==============================================================================
---
incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java
(original)
+++
incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java
Sat Apr 14 12:51:19 2007
@@ -168,8 +168,17 @@
// components
if (childState != UIXCollection.Transient.TRUE)
{
- table.restoreStampState(context, kids.get(childIndex), childState);
- childIndex++;
+ while (childIndex < kids.size())
+ {
+ UIComponent kid = kids.get(childIndex);
+ childIndex++;
+ // Skip over any transient components before restoring state
+ if (!kid.isTransient())
+ {
+ table.restoreStampState(context, kid, childState);
+ break;
+ }
+ }
}
// The component may or may not still be there; if it
// is, then we'd better skip over it
Modified:
incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
URL:
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java?view=diff&rev=528864&r1=528863&r2=528864
==============================================================================
---
incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
(original)
+++
incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
Sat Apr 14 12:51:19 2007
@@ -869,8 +869,17 @@
// components
if (childState != Transient.TRUE)
{
- restoreStampState(context, children.get(childIndex), childState);
- childIndex++;
+ while (childIndex < children.size())
+ {
+ UIComponent child = children.get(childIndex);
+ childIndex++;
+ // Skip over any transient components before restoring state
+ if (!child.isTransient())
+ {
+ restoreStampState(context, child, childState);
+ break;
+ }
+ }
}
// The component may or may not still be there; if it
// is, then we'd better skip over it
@@ -1150,6 +1159,7 @@
" and stampId:"+stampId);
}
}
+
/**
* Restores the state of all the stamps of this component.