You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2010/03/10 19:00:19 UTC

svn commit: r921490 [1/2] - in /myfaces/trinidad/branches/trinidad-2.0.0.3: ./ scripts/ src/site/apt/ trinidad-api/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/ trinidad-api...

Author: matzew
Date: Wed Mar 10 18:00:17 2010
New Revision: 921490

URL: http://svn.apache.org/viewvc?rev=921490&view=rev
Log:
merging trunk into a new Trinidad/JSF2 branch

Added:
    myfaces/trinidad/branches/trinidad-2.0.0.3/scripts/
      - copied from r921461, myfaces/trinidad/trunk/scripts/
    myfaces/trinidad/branches/trinidad-2.0.0.3/scripts/trinidad-build-release.py
      - copied unchanged from r921461, myfaces/trinidad/trunk/scripts/trinidad-build-release.py
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeyChangeEvent.java
      - copied unchanged from r921461, myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeyChangeEvent.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeyChangeListener.java
      - copied unchanged from r921461, myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeyChangeListener.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/
      - copied from r921461, myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/
      - copied from r921461, myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/InputStreamProvider.java
      - copied unchanged from r921461, myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/InputStreamProvider.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/NameResolver.java
      - copied unchanged from r921461, myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/NameResolver.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/util/
      - copied from r921461, myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/util/
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/util/BindingTest.java
      - copied unchanged from r921461, myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/util/BindingTest.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-demo/src/main/webapp/demos/bindingTester.jspx
      - copied unchanged from r921461, myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/demos/bindingTester.jspx
Removed:
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/InputStreamProvider.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/NameResolver.java
Modified:
    myfaces/trinidad/branches/trinidad-2.0.0.3/   (props changed)
    myfaces/trinidad/branches/trinidad-2.0.0.3/src/site/apt/download.apt
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/pom.xml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentReference.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/ComponentReferenceTest.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/pom.xml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/table/TableDemo.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/treeTable/TreeTableDemo.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/input/inputText/inputText.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/table.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableMultipleRowSelection.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableNoGridLines.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tablePaginated.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableSingleRowSelection.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableDetailed.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableMultipleRowSelection.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableNoGridLines.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSimple.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSingleRowSelection.xhtml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/web.xml
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/GlobalConfiguratorImpl.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/NumberConverter.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/ImageConstants.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/CompositeButtonKey.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/FileSystemImageCache.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/SourceCheckingCacheEntry.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/SourceUtils.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MessageRenderer.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyShuttleRenderer.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingInputStreamProvider.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingNameResolver.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/DefaultNameResolver.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/FileInputStreamProvider.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/InputStreamProviderProxy.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/URLInputStreamProvider.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/xml/XMLUtils.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetEntry.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetNameResolver.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/StyleSheetDocumentUtils.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentIconRequest.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/CoreIconRequest.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/FlippedIconRequest.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/IconArrayLafIconProvider.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/IconInputStreamProvider.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SimpleButtonUtils.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/resources/META-INF/adf/styles/casablancaSkin.css
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-partial-lifecycle/src/main/java/org/apache/myfaces/trinidadinternal/lifecycle/PartialLifecycleUtils.java
    myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-partial-lifecycle/src/main/java/org/apache/myfaces/trinidadinternal/lifecycle/UIViewRoot.java

Propchange: myfaces/trinidad/branches/trinidad-2.0.0.3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 10 18:00:17 2010
@@ -6,4 +6,4 @@
 /myfaces/trinidad/branches/ar_clientBehaviors:881469-891464
 /myfaces/trinidad/branches/jwaldman_StyleMap:754977-770778
 /myfaces/trinidad/branches/trinidad-2.0.x:823098-895949
-/myfaces/trinidad/trunk:819601,819622,834147,886881,888973,893043,896231-908455
+/myfaces/trinidad/trunk:819601,819622,834147,886881,888973,893043,896231-908455,908699-921461

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/src/site/apt/download.apt
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/src/site/apt/download.apt?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/src/site/apt/download.apt (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/src/site/apt/download.apt Wed Mar 10 18:00:17 2010
@@ -33,25 +33,25 @@ Download Apache MyFaces Trinidad
   created using GNU tar extensions. Thus they must be untarred with a GNU compatible
   version of tar.
 
-    << Apache MyFaces Trinidad 2.0.0-alpha Distribution for JSF 2.0 >>
+    << Apache MyFaces Trinidad 2.0.0-alpha-2 Distribution for JSF 2.0 >>
 
     Release notes can be found
-  {{{https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310661&styleName=Html&version=12314297}here}}.
+  {{{https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310661&styleName=Html&version=12314513}here}}.
 
 *-------------------------+---------+----------+-----------+
 |                         | Mirrors | Checksum | Signature |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 2.0.0-alpha (tar.gz)     | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-dist.tar.gz} trinidad-2.0.0-alpha-dist.tar.gz}} | {{{http://myfaces.apache.org/dist/myfaces/binaries/trinidad-2.0.0-alpha-dist.tar.gz.md5} trinidad-2.0.0-alpha-dist.tar.gz.md5}} | {{{http://myfaces.apache.org/dist/myfaces/binaries/trinidad-2.0.0-alpha-dist.tar.gz.asc} trinidad-2.0.0-alpha-dist.tar.gz.asc}} |
+| Apache MyFaces Trinidad 2.0.0-alpha-2 (tar.gz)     | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-dist.tar.gz} trinidad-2.0.0-alpha-2-dist.tar.gz}} | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-dist.tar.gz.md5} trinidad-2.0.0-alpha-2-dist.tar.gz.md5}} | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-dist.tar.gz.asc} trinidad-2.0.0-alpha-2-dist.tar.gz.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 2.0.0-alpha (zip)      | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-dist.zip} trinidad-2.0.0-alpha-dist.zip}} | {{{http://myfaces.apache.org/dist/myfaces/binaries/trinidad-2.0.0-alpha-dist.zip.md5} trinidad-2.0.0-alpha-dist.zip.md5}} | {{{http://myfaces.apache.org/dist/myfaces/binaries/trinidad-2.0.0-alpha-dist.zip.asc} trinidad-2.0.0-alpha-dist.zip.asc}} |
+| Apache MyFaces Trinidad 2.0.0-alpha-2 (zip)      | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-dist.zip} trinidad-2.0.0-alpha-2-dist.zip}} | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-dist.zip.md5} trinidad-2.0.0-alpha-2-dist.zip.md5}} | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-dist.zip.asc} trinidad-2.0.0-alpha-2-dist.zip.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 2.0.0-alpha Example (tar.gz)     | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-example.tar.gz} trinidad-2.0.0-alpha-example.tar.gz}} | {{{http://myfaces.apache.org/dist/myfaces/binaries/trinidad-2.0.0-alpha-example.tar.gz.md5} trinidad-2.0.0-alpha-example.tar.gz.md5}} | {{{http://myfaces.apache.org/dist/myfaces/binaries/trinidad-2.0.0-alpha-example.tar.gz.asc} trinidad-2.0.0-alpha-example.tar.gz.asc}} |
+| Apache MyFaces Trinidad 2.0.0-alpha-2 Example (tar.gz)     | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-example.tar.gz} trinidad-2.0.0-alpha-2-example.tar.gz}} | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-example.tar.gz.md5} trinidad-2.0.0-alpha-2-example.tar.gz.md5}} | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-example.tar.gz.asc} trinidad-2.0.0-alpha-2-example.tar.gz.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 2.0.0-alpha  Example (zip)      | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-example.zip} trinidad-2.0.0-alpha-example.zip}} | {{{http://myfaces.apache.org/dist/myfaces/binaries/trinidad-2.0.0-alpha-example.zip.md5} trinidad-2.0.0-alpha-example.zip.md5}} | {{{http://myfaces.apache.org/dist/myfaces/binaries/trinidad-2.0.0-alpha-example.zip.asc} trinidad-2.0.0-alpha-example.zip.asc}} |
+| Apache MyFaces Trinidad 2.0.0-alpha-2  Example (zip)      | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-example.zip} trinidad-2.0.0-alpha-2-example.zip}} | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-example.zip.md5} trinidad-2.0.0-alpha-2-example.zip.md5}} | {{{http://myfaces.apache.org/dist/binaries/trinidad-2.0.0-alpha-2-example.zip.asc} trinidad-2.0.0-alpha-2-example.zip.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 2.0.0-alpha Source (tar.gz)     | {{{http://myfaces.apache.org/dist/source/trinidad-2.0.0-alpha-src-all.tar.gz} trinidad-2.0.0-alpha-src-all.tar.gz}} | {{{http://myfaces.apache.org/dist/myfaces/source/trinidad-2.0.0-alpha-src-all.tar.gz.md5} trinidad-2.0.0-alpha-src-all.tar.gz.md5}} | {{{http://myfaces.apache.org/dist/myfaces/source/trinidad-2.0.0-alpha-src-all.tar.gz.asc} trinidad-2.0.0-alpha-src-all.tar.gz.asc}} |
+| Apache MyFaces Trinidad 2.0.0-alpha-2 Source (tar.gz)     | {{{http://myfaces.apache.org/dist/source/trinidad-2.0.0-alpha-2-src-all.tar.gz} trinidad-2.0.0-alpha-2-src-all.tar.gz}} | {{{http://myfaces.apache.org/dist/source/trinidad-2.0.0-alpha-2-src-all.tar.gz.md5} trinidad-2.0.0-alpha-2-src-all.tar.gz.md5}} | {{{http://myfaces.apache.org/dist/source/trinidad-2.0.0-alpha-2-src-all.tar.gz.asc} trinidad-2.0.0-alpha-2-src-all.tar.gz.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 2.0.0-alpha  Source (zip)      | {{{http://myfaces.apache.org/dist/source/trinidad-2.0.0-alpha-src-all.zip} trinidad-2.0.0-alpha-src-all.zip}} | {{{http://myfaces.apache.org/dist/myfaces/source/trinidad-2.0.0-alpha-src-all.zip.md5} trinidad-2.0.0-alpha-src-all.zip.md5}} | {{{http://myfaces.apache.org/dist/myfaces/source/trinidad-2.0.0-alpha-src-all.zip.asc} trinidad-2.0.0-alpha-src-all.zip.asc}} |
+| Apache MyFaces Trinidad 2.0.0-alpha-2  Source (zip)      | {{{http://myfaces.apache.org/dist/source/trinidad-2.0.0-alpha-2-src-all.zip} trinidad-2.0.0-alpha-2-src-all.zip}} | {{{http://myfaces.apache.org/dist/source/trinidad-2.0.0-alpha-2-src-all.zip.md5} trinidad-2.0.0-alpha-2-src-all.zip.md5}} | {{{http://myfaces.apache.org/dist/source/trinidad-2.0.0-alpha-2-src-all.zip.asc} trinidad-2.0.0-alpha-2-src-all.zip.asc}} |
 *-------------------------+---------+----------+-----------+
 
     << Apache MyFaces Trinidad 1.2.13 Distribution for JSF 1.2 >>
@@ -75,25 +75,25 @@ Download Apache MyFaces Trinidad
 | Apache MyFaces Trinidad 1.2.13  Source (zip)      | {{{http://www.apache.org/dyn/closer.cgi/myfaces/source/trinidad-1.2.13-src-all.zip} trinidad-1.2.13-src-all.zip}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.2.13-src-all.zip.md5} trinidad-1.2.13-src-all.zip.md5}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.2.13-src-all.zip.asc} trinidad-1.2.13-src-all.zip.asc}} |
 *-------------------------+---------+----------+-----------+
 
-    << Apache MyFaces Trinidad 1.0.11 Distribution  for JSF 1.1 >>
+    << Apache MyFaces Trinidad 1.0.12 Distribution  for JSF 1.1 >>
 
     Release notes can be found
-  {{{https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310661&styleName=Html&version=12313509}here}}.
+  {{{https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310661&styleName=Html&version=12314137}here}}.
 
 *-------------------------+---------+----------+-----------+
 |                         | Mirrors | Checksum | Signature |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 1.0.11 (tar.gz)     | {{{http://www.apache.org/dyn/closer.cgi/myfaces/binaries/trinidad-1.0.11-dist.tar.gz} trinidad-1.0.11-dist.tar.gz}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.11-dist.tar.gz.md5} trinidad-1.0.11-dist.tar.gz.md5}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.11-dist.tar.gz.asc} trinidad-1.0.11-dist.tar.gz.asc}} |
+| Apache MyFaces Trinidad 1.0.12 (tar.gz)     | {{{http://www.apache.org/dyn/closer.cgi/myfaces/binaries/trinidad-1.0.12-dist.tar.gz} trinidad-1.0.12-dist.tar.gz}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.12-dist.tar.gz.md5} trinidad-1.0.12-dist.tar.gz.md5}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.12-dist.tar.gz.asc} trinidad-1.0.12-dist.tar.gz.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 1.0.11 (zip)      | {{{http://www.apache.org/dyn/closer.cgi/myfaces/binaries/trinidad-1.0.11-dist.zip} trinidad-1.0.11-dist.zip}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.11-dist.zip.md5} trinidad-1.0.11-dist.zip.md5}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.11-dist.zip.asc} trinidad-1.0.11-dist.zip.asc}} |
+| Apache MyFaces Trinidad 1.0.12 (zip)      | {{{http://www.apache.org/dyn/closer.cgi/myfaces/binaries/trinidad-1.0.12-dist.zip} trinidad-1.0.12-dist.zip}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.12-dist.zip.md5} trinidad-1.0.12-dist.zip.md5}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.12-dist.zip.asc} trinidad-1.0.12-dist.zip.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 1.0.11 Example (tar.gz)     | {{{http://www.apache.org/dyn/closer.cgi/myfaces/binaries/trinidad-1.0.11-example.tar.gz} trinidad-1.0.11-example.tar.gz}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.11-example.tar.gz.md5} trinidad-1.0.11-example.tar.gz.md5}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.11-example.tar.gz.asc} trinidad-1.0.11-example.tar.gz.asc}} |
+| Apache MyFaces Trinidad 1.0.12 Example (tar.gz)     | {{{http://www.apache.org/dyn/closer.cgi/myfaces/binaries/trinidad-1.0.12-example.tar.gz} trinidad-1.0.12-example.tar.gz}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.12-example.tar.gz.md5} trinidad-1.0.12-example.tar.gz.md5}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.12-example.tar.gz.asc} trinidad-1.0.12-example.tar.gz.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 1.0.11  Example (zip)      | {{{http://www.apache.org/dyn/closer.cgi/myfaces/binaries/trinidad-1.0.11-example.zip} trinidad-1.0.11-example.zip}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.11-example.zip.md5} trinidad-1.0.11-example.zip.md5}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.11-example.zip.asc} trinidad-1.0.11-example.zip.asc}} |
+| Apache MyFaces Trinidad 1.0.12  Example (zip)      | {{{http://www.apache.org/dyn/closer.cgi/myfaces/binaries/trinidad-1.0.12-example.zip} trinidad-1.0.12-example.zip}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.12-example.zip.md5} trinidad-1.0.12-example.zip.md5}} | {{{http://www.apache.org/dist/myfaces/binaries/trinidad-1.0.12-example.zip.asc} trinidad-1.0.12-example.zip.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 1.0.11 Source (tar.gz)     | {{{http://www.apache.org/dyn/closer.cgi/myfaces/source/trinidad-1.0.11-src-all.tar.gz} trinidad-1.0.11-src-all.tar.gz}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.0.11-src-all.tar.gz.md5} trinidad-1.0.11-src-all.tar.gz.md5}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.0.11-src-all.tar.gz.asc} trinidad-1.0.11-src-all.tar.gz.asc}} |
+| Apache MyFaces Trinidad 1.0.12 Source (tar.gz)     | {{{http://www.apache.org/dyn/closer.cgi/myfaces/source/trinidad-1.0.12-src-all.tar.gz} trinidad-1.0.12-src-all.tar.gz}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.0.12-src-all.tar.gz.md5} trinidad-1.0.12-src-all.tar.gz.md5}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.0.12-src-all.tar.gz.asc} trinidad-1.0.12-src-all.tar.gz.asc}} |
 *-------------------------+---------+----------+-----------+
-| Apache MyFaces Trinidad 1.0.11  Source (zip)      | {{{http://www.apache.org/dyn/closer.cgi/myfaces/source/trinidad-1.0.11-src-all.zip} trinidad-1.0.11-src-all.zip}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.0.11-src-all.zip.md5} trinidad-1.0.11-src-all.zip.md5}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.0.11-src-all.zip.asc} trinidad-1.0.11-src-all.zip.asc}} |
+| Apache MyFaces Trinidad 1.0.12  Source (zip)      | {{{http://www.apache.org/dyn/closer.cgi/myfaces/source/trinidad-1.0.12-src-all.zip} trinidad-1.0.12-src-all.zip}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.0.12-src-all.zip.md5} trinidad-1.0.12-src-all.zip.md5}} | {{{http://www.apache.org/dist/myfaces/source/trinidad-1.0.12-src-all.zip.asc} trinidad-1.0.12-src-all.zip.asc}} |
 *-------------------------+---------+----------+-----------+
 
 Latest source code from SVN repository
@@ -136,19 +136,19 @@ Verifying signatures
 
 	  <<<
 	  % pgpk -a KEYS
-	  % pgpv trinidad-1.0.11-dist.tar.gz.asc trinidad-1.0.11-dist.tar.gz
+	  % pgpv trinidad-1.0.12-dist.tar.gz.asc trinidad-1.0.12-dist.tar.gz
 	  >>>
 
 	  <or>
 
 	  <<<
 	  % pgp -ka KEYS
-	  % pgp trinidad-1.0.11-dist.tar.gz.asc trinidad-1.0.11-dist.tar.gz
+	  % pgp trinidad-1.0.12-dist.tar.gz.asc trinidad-1.0.12-dist.tar.gz
 	  >>>
 
 	  <or>
 
 	  <<<
   	% gpg --import KEYS
-	  % gpg --verify trinidad-1.0.11-dist.tar.gz.asc trinidad-1.0.11-dist.tar.gz
+	  % gpg --verify trinidad-1.0.12-dist.tar.gz.asc trinidad-1.0.12-dist.tar.gz
 	  >>>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/pom.xml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/pom.xml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/pom.xml Wed Mar 10 18:00:17 2010
@@ -254,4 +254,34 @@
 
     </plugins>
   </reporting>
+
+  <!-- 
+    This profile is for preparing a release....
+  -->
+  <profiles>
+    <profile>
+      <id>prepare-release</id>
+
+      <activation>
+        <property>
+          <name>prepareRelease</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>attach-javadocs</id>
+                <goals>
+                  <goal>jar</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java Wed Mar 10 18:00:17 2010
@@ -20,6 +20,7 @@ package org.apache.myfaces.trinidad.mode
 
 import java.util.Collections;
 import java.util.List;
+import java.util.ArrayList;
 import javax.faces.model.DataModel;
 
 /**
@@ -296,6 +297,68 @@ public abstract class CollectionModel ex
     }
   }
 
+  /**
+   * <p>
+   * Adds the listener to the Set of RowKeyChangeListeners on the Collection.
+   * </p>
+   * <p>
+   * The same listener instance may be added multiple times, but will only be called once per change.
+   * </p>
+   * <p>
+   * Since the Collection may have a lifetime longer than Request, the listener implementation 
+   * should take care not to maintain any references to objects only valid in the current Request.  
+   * For example, if a UIComponent wishes to listen on a Collection, the UIComponent cannot use a 
+   * listener that maintains a Java reference to the UIComponent instance because UIComponent 
+   * instances are only valid for the current request (this also precludes the use of a non-static 
+   * inner class for the listener).  Instead, the UIComponent would need to use an indirect 
+   * reference such as {@link ComponentReference} to dynamically find the correct instance to use.  
+   * In the case where the Collection has a short lifetime, the code that adds the listener needs to 
+   * ensure that it executes every time the Collection instance is reinstantiated.
+   * </p>
+   * @param listener The listener for RowKeyChangeEvents to add to the Collection 
+   * @see #removeRowKeyChangeListener
+   */
+  public void addRowKeyChangeListener(RowKeyChangeListener listener)
+  {
+    if(!_rowKeyChangeListeners.contains(listener))
+      _rowKeyChangeListeners.add(listener);
+  }
+
+  /**
+   * <p>
+   * Remove an existing listener from the Set of RowKeyChangeListeners on the Collection.
+   * </p>
+   * <p>
+   * The same listener instance may be removed multiple times wihtout failure.
+   * </p>
+   * 
+   * @param listener The listener for RowKeyChangeEvents to remove from the Collection
+   */
+  public void removeRowKeyChangeListener(RowKeyChangeListener listener)
+  {
+    _rowKeyChangeListeners.remove(listener);
+  }
+
+  /**
+   * Fire an existing RowKeyChangeEvent to any registered listeners.
+   * No event is fired if the given event's old and new row keys are equal and non-null.
+   * @param event  The RowKeyChangeEvent object.
+   */
+  protected void fireRowKeyChange(RowKeyChangeEvent event) 
+  {
+    Object oldRowKey = event.getOldRowKey();
+    Object newRowKey = event.getNewRowKey();
+    if (oldRowKey != null && newRowKey != null && oldRowKey.equals(newRowKey)) 
+    {
+      return;
+    }
+
+    for (RowKeyChangeListener listener: _rowKeyChangeListeners)
+    {
+      listener.onRowKeyChange(event);
+    }
+  }
+
   //
   // Below is the default implemenation for the LocalRowKeyIndex interface.  
   //
@@ -453,5 +516,6 @@ public abstract class CollectionModel ex
   {
     return LocalRowKeyIndex.LocalCachingStrategy.NONE;
   }
-  
+
+  private List<RowKeyChangeListener> _rowKeyChangeListeners = new ArrayList<RowKeyChangeListener>(3);    
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentReference.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentReference.java?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentReference.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ComponentReference.java Wed Mar 10 18:00:17 2010
@@ -18,8 +18,12 @@
  */
 package org.apache.myfaces.trinidad.util;
 
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
+import java.io.ObjectStreamException;
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -32,132 +36,271 @@ import javax.faces.context.FacesContext;
 /**
  * A utility to store a reference to an <code>UIComponent</code>. Application developers
  * should use this tool if they need to have a reference to an instance of the
- * <code>UIComponent</code> class in <code>managed beans</code> that are <b>session scoped</b>.
+ * <code>UIComponent</code> class in <code>managed beans</code> that are longer than <b>requested scoped</b>
+ * --for example Session and Application Scoped.  The reference will return the UIComponent, if any, with
+ * the same scoped id as the Component used to create the reference, in the current UIViewRoot.
  * 
  * Use <code>newUIComponentReference()</code> to create a <code>ComponentReference</code> and
  * use the <code>getComponent()</code> to look up the referenced <code>UIComponent</code>.
+ *  
+ * For example, a current weather application might have have a session scoped weatehrBean
+ * containing the current list of locations to report the weather on and support using a
+ * selectMany component to remove the locations:
  * 
+ * <pre>
+ * <tr:selectManyCheckbox label="Locations" id="smc1" valuePassThru="true"
+ *                        binding="#{weatherBean.locationsSelectManyComponent}"
+ *                       value="#{weatherBean.locationsToRemove}">
+ *    <f:selectItems value="#{weatherBean.locationSelectItems}" id="si1"/>
+ * </tr:selectManyCheckbox>
+ * <tr:commandButton id="deleteCB" text="Remove Locations"
+ *                  actionListener="#{weatherBean.removeLocationListener}">
+ * </tr:commandButton>
+ * </pre>
+ * The weatherBean might looks like this:
+ * <pre>
+ * public class WeatherBean implements Serializable
+ * {
+ *   public void setLocationsToRemove(UIXSelectMany locationsToRemove)
+ *   {
+ *     _locationsToRemove = locationsToRemove;
+ *   }
+ *   
+ *   public UIXSelectMany getLocationsToRemove()
+ *   {
+ *     return _locationsToRemove;
+ *   }
+ *   
+ *   public void removeLocationListener(ActionEvent actionEvent)
+ *   {
+ *     ... code calling getLocationsToRemove() to get the UIXSelectMany ...
+ *   }
+ *
+ *   private UIXSelectMany _locationsToRemove
+ * }
+ * </pre>
+ * This code has several problems:
+ * <ol>
+ *   <li>Since UIComponents aren't Serializable, the class will fail serialization during fail-over
+ *   when default Serialization attempts to serialize _locationsToRemove.</li>
+ *   <li>If the user opens two windows on this page, only the last window rendered have the
+ *   correct UIXSelectMany instance.  If the remove locations button is pressed on the first
+ *   window after rendering the second window, the wrong UIXSelectMany instance will be used.</li>
+ *   <li>Since UIComponents aren't thread-safe, the above case could also result in bizare
+ *   behavior if requests from both windows were being processed by the application server at the
+ *   same time.</li>
+ *   <li>If the Trinidad view state token cache isn't used, or if the user navigates to this page
+ *   using the backbutton, a new UIXSelectMany instance will be created, which also won't match
+ *   the instance we are holding onto.</li>
+ *   <li>If we don't clear the UIXSelectMany instance when we navigate off of this page, we will
+ *   continue to pin the page's UIComponent tree in memory for the lifetime of the Session.
+ *   </li>
+ * </ol>
+ * Rewritten using ComponentReference, the weatherBean might looks like this:
+ * <pre>
+ * public class WeatherBean implements Serializable
+ * {
+ *   public void setLocationsToRemove(UIXSelectMany locationsToRemove)
+ *   {
+ *     _locationsToRemoveRef = UIComponentReference.newUIComponentReference(locationsToRemove);
+ *   }
+ *   
+ *   public UIXSelectMany getLocationsToRemove()
+ *   {
+ *     return _locationsToRemoveRef.getComponent();
+ *   }
+ *   
+ *   public void removeLocationListener(ActionEvent actionEvent)
+ *   {
+ *     ... code calling getLocationsToRemove() to get the UIXSelectMany ...
+ *   }
+ *
+ *   private UIComponentReference<UIXSelectMany> _locationsToRemoveRef
+ * }
+ * </pre>
+ * The above code saves a reference to the component passed to the managed bean and then
+ * retrieves the correct instance given the current UIViewRoot for this request whenever
+ * <code>getLocationsToRemove()</code> is called.
  * <p><b>Please note:</b>
  * <ul>
- * <li>This class is <b>not</b> thread-safe, since it depends on <code>UIComponent</code> APIs.
- * <li>The passed in <code>UIComponent</code> is <b>required</b> to have an <code>ID</code>
- * <li>The reference will break if the <code>UIComponent</code> is moved between <code>NamingContainer</code>s <b>or</b>
- * if any of the ancestor <code>NamingContainer</code>s have their IDs changed.
- * <li>The refrence is persistable. <b>However</b> <code>UIComponent</code>s are not <code>Serializable</code> and therefore
- * can not be used at any scope longer than request.
- * 
+ * <li>This class is <b>not completely</b> thread-safe, since it depends on <code>UIComponent</code>
+ * APIs, however the class is safe to use as long as either of the following is true
+ * <ol>
+ * <li>The component passed to <code>newUIComponentReference</code> has an id and is in the
+ * component hierarchy when newUIComponentReference is called and all subsequent calls to
+ * <code>getComponent</code> are made from Threads with a valid FacesContext
+ * </li>
+ * <li>The first call to <code>getComponent</code> is on the same Thread that
+ * <code>newUIComponentReference</code> was called on</li>
+ * </ol>
+ * </li>
+ * <li>The passed in <code>UIComponent</code> is <b>required</b> to have an <code>ID</code></li>
+ * <li>The reference will break if the <code>UIComponent</code> is moved between
+ * <code>NamingContainer</code>s <b>or</b>
+ * if any of the ancestor <code>NamingContainer</code>s have their IDs changed.</li>
+ * <li>The reference is persistable. <b>However</b> <code>UIComponent</code>s are not
+ * <code>Serializable</code> and therefore can not be used at any scope longer than request.</li>
  * </ul>
  * 
  * @see ComponentReference#newUIComponentReference(UIComponent)
  * @see ComponentReference#getComponent()
  */
-public final class ComponentReference<T extends UIComponent> implements Serializable
+public abstract class ComponentReference<T extends UIComponent> implements Serializable
 {
-  /**
-   * Private constructor, used by <code>ComponentReference.newUIComponentReference</code> 
-   * @param uicomponent the <code>UIComponent</code> we want to store the path for
-   */
-  private ComponentReference(T uicomponent)
+  // don't allow other subclasses
+  private ComponentReference(List<Object> componentPath)
   {
-    // create the "component path" to remember the position of the uicomponent and begin
-    // the work to figureout the scopedID
-    _scopedId = _createComponentPathAndScopedId(uicomponent, null);
+    _componentPath = componentPath;
   }
 
   /**
-   * Factory method to create an instance of the <code>ComponentReference</code> class, which wraps the given
-   * <code>UIComponent</code>. The component must be in the component tree when this method
-   * is called and that we will throw an <code>IllegalArgumentException</code> if it is not.
+   * Factory method to create an instance of the <code>ComponentReference</code> class, which
+   * returns a Serializable and often thread-safe reference to a 
+   * <code>UIComponent</code>.
    * 
-   * @param uicomponent the <code>UIComponent</code> to wrap.
-   * @throws IllegalArgumentException if component is not in the component tree
-   * @throws IllegalArgumentException if component does <b>not</b> have an <code>Id</code>
-   * @return <code>ComponentReference</code> that wrap the given component
+   * @param component the <code>UIComponent</code> to create a reference to.
+   * @return <code>ComponentReference</code> the reference to the component
+   * @throws NullPointerException if component is <code>null</code>
    */
-  public static <T extends UIComponent> ComponentReference<T> newUIComponentReference(T uicomponent)
+  public static <T extends UIComponent> ComponentReference<T> newUIComponentReference(T component)
   {
-    return new ComponentReference<T>(uicomponent);
-  }
+    // store the id of the component as a transient field since we can grab it from the scoped id
+    // but want it available to validate the component we found from the path
+    String compId = component.getId();
 
+    // if the component is in the hierarchy, the topmost component will be the UIViewRoot
+    if ((compId != null) && (getUIViewRoot(component) != null))
+    {
+      // component has an id and is in the hierarachy, so we can use a stable reference
+      String scopedId = calculateScopedId(component, compId);
+      
+      return new StableComponentReference(scopedId, compId, calculateComponentPath(component));
+    }
+    else
+    {
+      // Oh well, deferred reference it is
+      ComponentReference<T> reference = new DeferredComponentReference<T>(component);
+      
+      // Add to the list of Referernces that may need initialization
+      _addToEnsureInitializationList(reference);
+      
+      return reference;
+    }
+  }
+  
   /**
    * This method will use a calculated "component path" to walk down to the <code>UIComponent</code>
    * that is referenced by this class. If the component can not be found, the <code>getComponent()</code>
    * will return <code>null</code>. 
    * 
    * @return the referenced <code>UIComponent</code> or <code>null</code> if it can not be found.
+   * @throws IllegalStateException if the component used to create the
+   * ComponentReference is not in the component tree or does <b>not</b> have an <code>Id</code>
    * @see ComponentReference#newUIComponentReference(UIComponent)
    */
-  @SuppressWarnings("unchecked")
-  public T getComponent()
+   @SuppressWarnings("unchecked")
+   public final T getComponent()
+   {
+     // get the scopedId, calculating it if necessary
+     String scopedId = getScopedId();
+         
+     UIComponent foundComponent = null;
+
+     // In order to find the component with its
+     // calculated path, we need to start at the ViewRoot;
+     UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
+
+     List<Object> componentPath = _componentPath;
+     
+     if (componentPath != null) 
+     {
+       // Walk down the component tree, to the component we are looking for.
+       // We start at the ViewRoot and use the previous calculated "component path"
+       foundComponent = _walkPathToComponent(root, componentPath);
+     }
+
+     // Check if we really found it with the previously created "component path"
+     if (foundComponent == null || (!getComponentId().equals(foundComponent.getId())))
+     {
+       // OK, we were not luck with the calculated "component path", let's
+       // see if we can find it by using the "scoped ID" and the regular 
+       // findComponent();
+       foundComponent = root.findComponent(scopedId);
+
+       // was the regular findComponent() successful ?
+       if (foundComponent != null)
+       {        
+         // OK, now let's rebuild the path
+         _componentPath = calculateComponentPath(foundComponent);
+       }
+     }
+
+     return (T)foundComponent;
+   }
+
+   /**
+    * Called by the framework to ensure that deferred ComponentReferences are completely
+    * initialized before the UIComponent that the ComponentReference is associated with
+    * is not longer valid.
+    * @throws IllegalStateException if ComponentReference isn't already initialized and 
+    * the component used to create the
+    * ComponentReference is not in the component tree or does <b>not</b> have an <code>Id</code>
+    */
+   public abstract void ensureInitialization();
+    
+  /**
+   * ComponentRefs are required to test for equivalence by the equivalence of their scoped ids
+   * @param o
+   * @return
+   */
+  @Override
+  public final boolean equals(Object o)
   {
-    UIComponent foundComponent = null;
-
-    // In order to find the component with its
-    // calculated path, we need to start at the ViewRoot;
-    UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
-
-
-    if (_componentPath != null) 
+    if (o == this)
     {
-      // Walk down the component tree, to the component we are looking for.
-      // We start at the ViewRoot and use the previous calculated "component path"
-      foundComponent = _walkPathToComponent(root, _componentPath);
+      return true;
     }
-
-    // Check if we really found it with the previously created "component path"
-    if (foundComponent == null || (!_componentId.equals(foundComponent.getId())))
+    else if (o instanceof ComponentReference)
     {
-      // OK, we were not luck with the calculated "component path", let's
-      // see if we can find it by using the "scoped ID" and the regular 
-      // findComponent();
-      foundComponent = root.findComponent(_scopedId);
-
-      // was the regular findComponent() successful ?
-      if (foundComponent != null)
-      {        
-        // OK, now let's rebuild the path
-        _createComponentPathAndScopedId(foundComponent, _scopedId);
-      }
+      return getScopedId().equals(((ComponentReference)o).getScopedId());
+    }
+    else
+    {
+      return false;
     }
-
-    return (T) foundComponent;
   }
-
-  /**
-   * Utility to (re) create the component Id from the <code>_scopedId</code>.
-   * 
-   * @return the extracted <code>UIComponentId</code>
-   */
-  private String _calculateComponentIdFromScopedId(String scopedId)
+ 
+   /**
+    * ComponentRefs must use the hash code of their scoped id as their hash code
+    * @return
+    */
+  @Override
+  public final int hashCode()
   {
-    // String.substring() is optimized to return this if the entire string
-    // is the substring so that no one tries to optimize it later
-    return scopedId.substring(scopedId.lastIndexOf(NamingContainer.SEPARATOR_CHAR)+1);
+    return getScopedId().hashCode();
   }
-
+  
+  @Override
+  public final String toString()
+  {
+    return super.toString() + ":" + getScopedId();
+  }
+  
   /**
-   * Transform the <code>scopedIdList</code> of "important" component IDs to 
-   * generate the <code>scopedID</code> for the referenced <code>UIComponent</code>.
-   * 
-   * Uses the <code>scopedIdLength</code>
+   * Returns the scoped id for this ComponentReference
+   * @return
    */
-  private String _createScopedId(int scopedIdLength, List<String> scopedIdList)
-  {
-    StringBuilder builder = new StringBuilder(scopedIdLength);
-
-    for (int i = scopedIdList.size()-1; i >= 0 ; i--)
-    {
-      builder.append(scopedIdList.get(i));
+  protected abstract String getScopedId();
 
-      // if there are more IDs in the list, we need to append a colon
-      if (i > 0)
-      {
-        builder.append(NamingContainer.SEPARATOR_CHAR);
-      }
-    }
+  /**
+   * Returns the id of the Component that this ComponentReference points to
+   * @return
+   */
+  protected abstract String getComponentId();
 
-    // store the (final) scopedId
-    return builder.toString();
+  protected final void setComponentPath(List<Object> componentPath)
+  {
+    _componentPath = componentPath;
   }
 
   /**
@@ -171,53 +314,15 @@ public final class ComponentReference<T 
    * To calculate the <code>scopedID</code> we add the ID of every <code>NamingContainer</code> that we hit,
    * while walking up the component tree, to the <code>scopedIdList</code>. 
    * 
-   * @param uicomponent The <code>UIComponent</code> for this current iteration
-   * @param scopedId , or null if neeed to build it
+   * @param component The <code>UIComponent</code> for this current iteration
    * 
-   * @see ComponentReference#newUIComponentReference()
+   * @see #newUIComponentReference
    */
-  private String _createComponentPathAndScopedId(UIComponent component, String scopedId)
+  protected static List<Object> calculateComponentPath(UIComponent component)
   {
     // setUp of list that stores information about the FACET name or the COMPONENT index
     List<Object> componentHierarchyList = new ArrayList<Object>();
 
-    // setUp of list that contains the IDs for all NamingContainers
-    // on the way up to the <code>UIViewRoot</code>
-    List<String> scopedIdList = null;
-
-    // extract the component Id and
-    // start to calculate its length... IF needed...
-    boolean needToCalculateScopedId = (scopedId == null);
-
-    int scopedIdLength = 0;
-    if (scopedId == null)
-    {
-      // store the id of the component as a transient field since we can grab it from the scoped id
-      // but want it available to validate the component we found from the path
-      String currCompId = component.getId();
-
-      if (currCompId == null)
-      {
-        //TODO i18n
-        throw new IllegalArgumentException("The UIComponent needs to have an ID");
-      }
-      else
-      {
-        _componentId = currCompId;
-      }
-
-      scopedIdList = new ArrayList<String>();
-      scopedIdLength += _componentId.length();
-      // add the ID of the given UIComponent to (the beginning of) the list
-      scopedIdList.add(_componentId);
-    }
-    else
-    {
-      // extract componentId from scopedId
-      _componentId = _calculateComponentIdFromScopedId(scopedId);
-    }
-
-
     // stash the component and parent , for the loop
     UIComponent currComponent = component;
     UIComponent currParent = currComponent.getParent();
@@ -225,28 +330,13 @@ public final class ComponentReference<T 
     // enter the loop, if there is a parent for the current component
     while(currParent != null)
     {
-
-      // When current parent is a NamingContainer we want to scope the ID
-      // but ONLY if that has not been done (needToCalculateScopedId:true)
-      if (needToCalculateScopedId && (currParent instanceof NamingContainer))
-      {
-        // extract the parent-component Id and
-        // continue to calculate the final length of the scopedId
-        // the "+1" takes the SEPARATOR_CHAR into account
-        String namingContainerId = currParent.getId();
-        scopedIdLength += namingContainerId.length() + 1;  
-        // as we hit a NamingContainer we add its ID to
-        // the beginning of the "scopedId" list
-        scopedIdList.add(namingContainerId);
-      }
-      // end of scopedID business, for this call;
-
-
+      int childIndex = currParent.getChildren().indexOf(currComponent);
+      
       // is the given component a child of the parent?
-      if (currParent.getChildren().contains(currComponent))
+      if (childIndex != -1)
       {          
         // if so, add the INDEX (type: int) at the beginning of the list
-        componentHierarchyList.add(currParent.getChildren().indexOf(currComponent));
+        componentHierarchyList.add(childIndex);
       }
       else
       {
@@ -274,26 +364,118 @@ public final class ComponentReference<T 
 
     // done with the loop as >currComponent< has no own parent. Which
     // means we must talk to <code>UIViewRoot</code> here.
-    // Otherwise the component is not connected to the tree,
-    // so we thrown an IllegalArgumentException
+    // Otherwise the component is not connected to the tree, but we should have already checked this
+    // before calling this function
     if (!(currComponent instanceof UIViewRoot))
+      throw new IllegalStateException(
+                   "The component " + component + " is NOT connected to the component tree");
+  
+    return componentHierarchyList;
+  }
+  
+  protected static String calculateScopedId(
+    UIComponent component,
+    String      componentId)
+  {
+    if (componentId == null)
+      throw new IllegalStateException("Can't create a ComponentReference for component " +
+                                      component +
+                                      " no id");    
+    int scopedIdLength = componentId.length();
+  
+    List<String> scopedIdList = new ArrayList<String>();
+   
+    // determine how many characters we need to store the scopedId.  We skip the component itself,
+    // because we have already accounted for its id
+    UIComponent currAncestor = component.getParent();
+    
+    while (currAncestor != null)
     {
-      //TODO i18n
-      throw new IllegalArgumentException("The component " + component + " is NOT connected to the component tree");
+      // add the sizes of all of the NamingContainer ancestors, plus 1 for each NamingContainer separator
+      if (currAncestor instanceof NamingContainer)
+      {
+        String currId = currAncestor.getId();
+        scopedIdLength += currId.length() + 1;
+      
+        // add the NamingContainer to the list of NamingContainers
+        scopedIdList.add(currId);
+      }
+      
+      currAncestor = currAncestor.getParent();
     }
+    
+    // now append all of the NamingContaintes
+    return _createScopedId(scopedIdLength, scopedIdList, componentId);
+  }
+
+  protected Object writeReplace() throws ObjectStreamException
+  {
+    // Only use the proxy when Serializing
+    return new SerializationProxy(getScopedId());
+  }
+  
+  private void readObject(@SuppressWarnings("unused") ObjectInputStream stream) throws InvalidObjectException
+  {
+    // We can't be deserialized directly
+    throw new InvalidObjectException("Proxy required");
+  } 
 
-    // once we are done with loop to the UIViewRoot, the "componentHierarchyList" as our "component path"
-    _componentPath = componentHierarchyList;
+  /**
+   * Add a reference to the list of References that may need initialization later
+   * @param reference
+   */
+  private static void _addToEnsureInitializationList(ComponentReference<?> reference)
+  {
+    Map<String, Object> requestMap = 
+                            FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
+    
+    Collection<ComponentReference<?>> initializeList = (Collection<ComponentReference<?>>)
+                                             requestMap.get(_FINISH_INITIALIZATION_LIST_KEY);
     
-    // trigger the generation of the final scopedID
-    // OR return NULL (as we already have the scopedId
-    // when "needToCalculateScopedId" is false...
-    if (needToCalculateScopedId)
+    if (initializeList == null)
     {
-      scopedId = _createScopedId(scopedIdLength, scopedIdList);
+      initializeList = new ArrayList<ComponentReference<?>>();
+      requestMap.put(_FINISH_INITIALIZATION_LIST_KEY, initializeList);
     }
+    
+    initializeList.add(reference);
+  }
 
-    return scopedId;
+  /**
+   * Transform the <code>scopedIdList</code> of "important" component IDs to 
+   * generate the <code>scopedID</code> for the referenced <code>UIComponent</code>.
+   * 
+   * Uses the <code>scopedIdLength</code>
+   */
+  private static String _createScopedId(int scopedIdLength, List<String> scopedIdList, String componentId)
+  {
+    StringBuilder builder = new StringBuilder(scopedIdLength);
+
+    for (int i = scopedIdList.size() - 1; i >= 0 ; i--)
+    {
+      builder.append(scopedIdList.get(i));
+      builder.append(NamingContainer.SEPARATOR_CHAR);
+    }
+
+    builder.append(componentId);
+    
+    // store the (final) scopedId
+    return builder.toString();
+  }
+  
+  protected static UIViewRoot getUIViewRoot(UIComponent component)
+  {
+    // stash the component and parent , for the loop
+    UIComponent currComponent = component;
+    UIComponent currParent = currComponent.getParent();
+
+    while(currParent != null)
+    {
+      currComponent = currParent;
+      currParent = currParent.getParent();
+    }
+    
+    return (currComponent instanceof UIViewRoot) ? (UIViewRoot)currComponent : null;
   }
 
   /**
@@ -301,16 +483,16 @@ public final class ComponentReference<T 
    * uses the <code>hierarchyInformationList</code> to check if the it needs to
    * walk into a FACET or an INDEX of the component.
    * 
-   * @see ComponentReference#_createComponentPathAndScopedId(UIComponent)
+   * @see ComponentReference#calculateComponentPath(UIComponent)
    */
-  private UIComponent _walkPathToComponent(UIViewRoot root, List<Object> hierarchyInformationList)
+  private UIComponent _walkPathToComponent(UIViewRoot root, List<Object> componentPath)
   {
     UIComponent currFound = root;
 
     // iterate backwards since we appending the items starting from the component
-    for (int i = hierarchyInformationList.size() - 1; i >= 0 ; i--)
+    for (int i = componentPath.size() - 1; i >= 0 ; i--)
     {
-      Object location = hierarchyInformationList.get(i);
+      Object location = componentPath.get(i);
 
       // integer means we need to get the kid at INDEX obj
       // but let's not try to lookup from a component with
@@ -347,9 +529,152 @@ public final class ComponentReference<T 
     }
     return currFound;
   }
+  
+  /**
+   * ComponentReference where the scopedId is calculatable at creation time
+   */
+  private static final class StableComponentReference extends ComponentReference
+  {
+    private StableComponentReference(String scopedId)
+    {      
+      this(scopedId,
+           // String.substring() is optimized to return this if the entire string
+           // is the substring, so no further optimization is necessary
+           scopedId.substring(scopedId.lastIndexOf(NamingContainer.SEPARATOR_CHAR)+1),
+           null);
+    }
+ 
+    private StableComponentReference(
+      String scopedId,
+      String componentId,
+      List<Object> componentPath)
+    {
+      super(componentPath);
+
+      if (scopedId == null)
+        throw new NullPointerException();
+      
+      _scopedId = scopedId;
+      _componentId = componentId;
+    }
+    
+    public void ensureInitialization()
+    {
+      // do nothing--stable references are always fully initialized
+    }
+
+    protected String getScopedId()
+    {
+      return _scopedId;
+    }
+
+    protected String getComponentId()
+    {
+      return _componentId;
+    }
+ 
+    private final String _componentId;
+    private final String _scopedId;
+
+    private static final long serialVersionUID = 1L;
+  }
+  
+  /**
+   * ComponentReference where the component isn't ready to have its ComponentReference calculated at
+   * creation time.  Instead we wait until getComponent() is called, or the ComponentReference is
+   * Serialized.
+   */
+  private static final class DeferredComponentReference<T extends UIComponent> extends ComponentReference
+  {
+    /**
+     * Private constructor, used by <code>ComponentReference.newUIComponentReference</code> 
+     * @param component the <code>UIComponent</code> we want to store the path for
+     */
+    private DeferredComponentReference(T component)
+    {
+      super(null);
+      
+      // temporarily store away the component
+      _component = component;
+    }
+
+    public void ensureInitialization()
+    {
+      // getScopedId() ensures we are initialized
+      getScopedId();
+    }
+
+    protected String getScopedId()
+    {
+      String scopedId = _scopedId;
+      
+      // we have no scopedId, so calculate the scopedId and finish initializing
+      // the DeferredComponentReference
+      if (scopedId == null)
+      {
+        UIComponent component = _component;
+        
+        // need to check that component isn't null because of possible race condition if this
+        // method is called from different threads.  In that case, scopedId will have been filled
+        // in, so we can return it
+        if (component != null)
+        {
+          String componentId = component.getId();
+                    
+          scopedId = calculateScopedId(component, componentId);
+          _scopedId = scopedId;
+          _componentId = componentId;
+          
+          // store away our component path while we can efficiently calculate it
+          setComponentPath(calculateComponentPath(component));
+          
+          _component = null;
+        }
+        else
+        {
+          scopedId = _scopedId;
+        }
+      }
+      
+      return scopedId;
+    }
+
+    protected String getComponentId()
+    {
+      return _componentId;
+    }
+    
+    private transient T _component;
+    private transient volatile String _componentId;
+    private volatile String _scopedId;
+
+    private static final long serialVersionUID = 1L;
+  }
+
+  /**
+   * Proxy class for serializing ComponentReferences.  The Serialized for is simply the scopedId
+   */
+  private static final class SerializationProxy implements Serializable
+  {
+    SerializationProxy(String scopedId)
+    {
+      _scopedId = scopedId;
+    }
+
+    private Object readResolve()
+    {
+      return new StableComponentReference(_scopedId);
+    }
+      
+    private final String _scopedId;
+
+    private static final long serialVersionUID = 1L;
+  }
+
+  private transient volatile List<Object> _componentPath;
 
-  private transient List<Object> _componentPath;
-  private transient String _componentId;
-  private final String _scopedId;
-  private static final long serialVersionUID = -6803949269368863899L;
+  private static final String _FINISH_INITIALIZATION_LIST_KEY = ComponentReference.class.getName() +
+                                                                "#FINISH_INITIALIZATION";
+  
+  private static final long serialVersionUID = -6803949693688638969L;
 }
\ No newline at end of file

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/ComponentReferenceTest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/ComponentReferenceTest.java?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/ComponentReferenceTest.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-api/src/test/java/org/apache/myfaces/trinidad/util/ComponentReferenceTest.java Wed Mar 10 18:00:17 2010
@@ -18,8 +18,9 @@
  */
 package org.apache.myfaces.trinidad.util;
 
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 
@@ -73,7 +74,7 @@ public class ComponentReferenceTest exte
   }
 
   @SuppressWarnings("unchecked")
-  public void testFailoverOnCustomFacet()
+  public void testFailoverOnCustomFacet() throws IOException, ClassNotFoundException
   {
     UIViewRoot root = facesContext.getViewRoot();
     root.setId("root");
@@ -107,32 +108,26 @@ public class ComponentReferenceTest exte
     
     // find it again!
     assertEquals(input, uiRef.getComponent());
+
     // fake the failover
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    ObjectOutputStream oos = new ObjectOutputStream(baos);
 
-    try 
-    {
-      FileOutputStream fos = new FileOutputStream("t.tmp");
-      ObjectOutputStream oos = new ObjectOutputStream(fos);
+    oos.writeObject(uiRef);
 
-      oos.writeObject(uiRef);
+    ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+    ObjectInputStream ois = new ObjectInputStream(bais);
 
-      FileInputStream fis = new FileInputStream("t.tmp");
-      ObjectInputStream ois = new ObjectInputStream(fis);
+    uiRef = (ComponentReference<UIInput>) ois.readObject();
 
-      uiRef = (ComponentReference<UIInput>) ois.readObject();
+    referencedComp = uiRef.getComponent();
+    assertEquals(input, referencedComp);
 
-      referencedComp = uiRef.getComponent();
-      assertEquals(input, referencedComp);
-    }
-    catch (Exception e)
-    {
-      e.printStackTrace();
-    }
   }
 
   
   @SuppressWarnings("unchecked")
-  public void testFailover()
+  public void testFailover() throws IOException, ClassNotFoundException
   {
     UIViewRoot root = facesContext.getViewRoot();
     root.setId("root");
@@ -149,26 +144,19 @@ public class ComponentReferenceTest exte
     assertEquals(input1, referencedComp);
     
     // fake the failover
-    try 
-    {
-      FileOutputStream fos = new FileOutputStream("t.tmp");
-      ObjectOutputStream oos = new ObjectOutputStream(fos);
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    ObjectOutputStream oos = new ObjectOutputStream(baos);
 
-      oos.writeObject(uiRef);
+    oos.writeObject(uiRef);
+    oos.flush();
 
-      FileInputStream fis = new FileInputStream("t.tmp");
-      ObjectInputStream ois = new ObjectInputStream(fis);
+    ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+    ObjectInputStream ois = new ObjectInputStream(bais);
 
-      uiRef = (ComponentReference<UIInput>) ois.readObject();
+    uiRef = (ComponentReference<UIInput>) ois.readObject();
 
-      referencedComp = uiRef.getComponent();
-      assertEquals(input1, referencedComp);
-    }
-    catch (Exception e)
-    {
-      e.printStackTrace();
-    }
-    
+    referencedComp = uiRef.getComponent();
+    assertEquals(input1, referencedComp);
   }
 
   public void testEmptyViewRootOnGetComponent()
@@ -208,14 +196,17 @@ public class ComponentReferenceTest exte
     // build the Tree...
     root.getChildren().add(input1);
 
+    ComponentReference ref = ComponentReference.newUIComponentReference(input1);
+
     // Get the ComponentReference util
     try
     {
-      ComponentReference.newUIComponentReference(input1);
+      ref.getComponent();
+      
       // find the component...
-      fail("IllegalArgumentException expected");
+      fail("IllegalStateException expected");
     }
-    catch (Exception e)
+    catch (IllegalStateException e)
     {
       // suppress it - this is as expected
     }
@@ -285,6 +276,38 @@ public class ComponentReferenceTest exte
     assertNull(referencedComp);
   }
 
+  public void testDeferredMovingInsideNamingContainer()
+  {
+    UIViewRoot root = facesContext.getViewRoot();
+    root.setId("root");
+    UINamingContainer nc1 = new UINamingContainer(); nc1.setId("nc1");
+    UINamingContainer nc2 = new UINamingContainer(); nc2.setId("nc2");
+    UINamingContainer nc3 = new UINamingContainer(); nc3.setId("nc3");
+
+    // almost build the tree
+    nc1.getChildren().add(nc2);
+    nc2.getChildren().add(nc3);
+
+    // Get the ComponentReference util, this will be a deferred component reference since the
+    // component wasn't attached
+    ComponentReference<UINamingContainer> uiRef = ComponentReference.newUIComponentReference(nc3);
+
+    // now finish building the component tree
+    root.getChildren().add(nc1);
+
+    // find the component...
+    UINamingContainer referencedComp = uiRef.getComponent();
+    assertEquals(nc3, referencedComp);
+
+    // let's move the NC3 component one level up;
+    nc2.getChildren().remove(nc3);
+    nc1.getChildren().add(nc3);
+
+    // and we can not find the component...
+    referencedComp = uiRef.getComponent();
+    assertNull(referencedComp);
+  }
+
   public void testComponentNotInTree()
   {
     UINamingContainer nc1 = new UINamingContainer(); nc1.setId("nc1");
@@ -296,13 +319,16 @@ public class ComponentReferenceTest exte
     nc2.getChildren().add(nc3);
 
     // Get the ComponentReference util
+    ComponentReference ref = ComponentReference.newUIComponentReference(nc3);
+
     try
     {
-      ComponentReference.newUIComponentReference(nc3);
       // find the component...
-      fail("IllegalArgumentException expected");
+      ref.getComponent();
+      
+      fail("IllegalStateException expected");
     }
-    catch (Exception e)
+    catch (IllegalStateException e)
     {
       // suppress it - this is as expected
     }

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/pom.xml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/pom.xml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/pom.xml Wed Mar 10 18:00:17 2010
@@ -201,5 +201,58 @@
         </dependency>
       </dependencies>      
     </profile>
+
+    <!-- JSF2 (SUN RI)
+      
+      mvn -PjettyConfig -Djsf=ri2 jetty:run
+    -->    
+    <profile>
+      <id>jsfri2</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>ri2</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>com.sun.faces</groupId>
+          <artifactId>jsf-api</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>com.sun.faces</groupId>
+          <artifactId>jsf-impl</artifactId>
+        </dependency>
+      </dependencies>      
+    </profile>
+    <!-- JSF2 (Apache MyFaces)
+      
+      mvn -PjettyConfig -Djsf=myfaces2 jetty:run
+    -->    
+    <profile>
+      <id>myfaces2</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>myfaces2</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-api</artifactId>
+          <version>${myfaces2.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-impl</artifactId>
+          <version>${myfaces2.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>com.sun.facelets</groupId>
+          <artifactId>jsf-facelets</artifactId>
+        </dependency>
+      </dependencies>      
+    </profile>
   </profiles>
 </project>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/table/TableDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/table/TableDemo.java?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/table/TableDemo.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/table/TableDemo.java Wed Mar 10 18:00:17 2010
@@ -46,6 +46,11 @@ public class TableDemo extends AbstractC
                 "/components/table/table/table.xhtml"
             });
 
+        addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.NoGridLines, "No grid lines", this,
+                new String[]{
+                        "/components/table/table/tableNoGridLines.xhtml"
+                }, getSummaryResourcePath()));
+
         addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.SingleRowSelection, "Single Row Selection", this,
                 new String[]{
                         "/components/table/table/tableSingleRowSelection.xhtml"
@@ -56,11 +61,6 @@ public class TableDemo extends AbstractC
                         "/components/table/table/tableMultipleRowSelection.xhtml"
                 }, getSummaryResourcePath()));
 
-        addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.NoGridLines, "No grid lines", this,
-                new String[]{
-                        "/components/table/table/tableNoGridLines.xhtml"
-                }, getSummaryResourcePath()));
-
         addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.Pagination, this,
                 new String[]{
                         "/components/table/table/tablePaginated.xhtml"

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/treeTable/TreeTableDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/treeTable/TreeTableDemo.java?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/treeTable/TreeTableDemo.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/table/treeTable/TreeTableDemo.java Wed Mar 10 18:00:17 2010
@@ -47,6 +47,11 @@ public class TreeTableDemo extends Abstr
                 "/components/table/treeTable/treeTable.xhtml"
             });
 
+        addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.NoGridLines, "No grid lines", this,
+                new String[]{
+                        "/components/table/treeTable/treeTableNoGridLines.xhtml"
+                }, getSummaryResourcePath()));        
+
         addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.SingleRowSelection, "Single selection", this,
                 new String[]{
                         "/components/table/treeTable/treeTableSingleRowSelection.xhtml"
@@ -57,11 +62,6 @@ public class TreeTableDemo extends Abstr
                         "/components/table/treeTable/treeTableMultipleRowSelection.xhtml"
                 }, getSummaryResourcePath()));
 
-        addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.NoGridLines, "No grid lines", this,
-                new String[]{
-                        "/components/table/treeTable/treeTableNoGridLines.xhtml"
-                }, getSummaryResourcePath()));
-
         addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.Simple, this,
                 new String[]{
                         "/components/table/treeTable/treeTableSimple.xhtml"

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/input/inputText/inputText.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/input/inputText/inputText.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/input/inputText/inputText.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/input/inputText/inputText.xhtml Wed Mar 10 18:00:17 2010
@@ -6,7 +6,7 @@
     <ui:define name="demoContent">
 
         <tr:panelFormLayout rows="4" labelAlignment="start">
-            <tr:inputText label="Useranme:"/>
+            <tr:inputText label="Username:"/>
             <tr:inputText label="Password:" required="no" secret="true"/>
         </tr:panelFormLayout>
 

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/table.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/table.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/table.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/table.xhtml Wed Mar 10 18:00:17 2010
@@ -8,9 +8,11 @@
 
         <tr:outputText value="The monarchs of England, from House of Stuart(restored) are:"/>
         <tr:spacer height="15px"/>
-        <tr:table width="100%" emptyText="No data available." value="#{tableColumn}" var="row"
-                verticalGridVisible="false" horizontalGridVisible="false">
+        <tr:table width="100%" emptyText="No data available." value="#{tableColumn}" var="row">
             <tr:column >
+                <f:facet name="header">
+                    <tr:outputText value="Id"/>
+                </f:facet>
                 <tr:outputText value="#{row.rowNo}"/>
             </tr:column>
             <tr:column>
@@ -34,4 +36,4 @@
         </tr:table>
 
     </ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableMultipleRowSelection.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableMultipleRowSelection.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableMultipleRowSelection.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableMultipleRowSelection.xhtml Wed Mar 10 18:00:17 2010
@@ -11,6 +11,9 @@
         <tr:table width="100%" rowSelection="multiple" emptyText="No data available."
                   value="#{tableColumn}" var="row">
             <tr:column >
+                <f:facet name="header">
+                    <tr:outputText value="Id"/>
+                </f:facet>
                 <tr:outputText value="#{row.rowNo}"/>
             </tr:column>
             <tr:column>
@@ -34,4 +37,4 @@
         </tr:table>
 
     </ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableNoGridLines.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableNoGridLines.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableNoGridLines.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableNoGridLines.xhtml Wed Mar 10 18:00:17 2010
@@ -11,6 +11,9 @@
         <tr:table width="100%" emptyText="No data available." value="#{tableColumn}" var="row"
                 horizontalGridVisible="false" verticalGridVisible="false">
             <tr:column >
+                <f:facet name="header">
+                    <tr:outputText value="Id"/>
+                </f:facet>                
                 <tr:outputText value="#{row.rowNo}"/>
             </tr:column>
             <tr:column>
@@ -34,4 +37,4 @@
         </tr:table>
 
     </ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tablePaginated.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tablePaginated.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tablePaginated.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tablePaginated.xhtml Wed Mar 10 18:00:17 2010
@@ -12,6 +12,9 @@
                 verticalGridVisible="false" horizontalGridVisible="false"
                 rows="2">
             <tr:column >
+                <f:facet name="header">
+                    <tr:outputText value="Id"/>
+                </f:facet>                
                 <tr:outputText value="#{row.rowNo}"/>
             </tr:column>
             <tr:column>
@@ -35,4 +38,4 @@
         </tr:table>
 
     </ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableSingleRowSelection.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableSingleRowSelection.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableSingleRowSelection.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/table/tableSingleRowSelection.xhtml Wed Mar 10 18:00:17 2010
@@ -10,6 +10,9 @@
         <tr:spacer height="15px"/>
         <tr:table width="100%" rowSelection="single" emptyText="No data available." value="#{tableColumn}" var="row">
             <tr:column >
+                <f:facet name="header">
+                    <tr:outputText value="Id"/>
+                </f:facet>
                 <tr:outputText value="#{row.rowNo}"/>
             </tr:column>
             <tr:column>
@@ -33,4 +36,4 @@
         </tr:table>
 
     </ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableDetailed.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableDetailed.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableDetailed.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableDetailed.xhtml Wed Mar 10 18:00:17 2010
@@ -8,7 +8,7 @@
     <ui:define name="demoContent">
 
         <tr:treeTable var="foo" value="#{treeTableBean.model}"
-                      rendered="true"
+                      rendered="true" width="100%"
                       expandAllEnabled="true"
                       rootNodeRendered="true">
             <f:facet name="nodeStamp">

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableMultipleRowSelection.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableMultipleRowSelection.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableMultipleRowSelection.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableMultipleRowSelection.xhtml Wed Mar 10 18:00:17 2010
@@ -8,7 +8,7 @@
     <ui:define name="demoContent">
 
         <tr:treeTable var="foo" value="#{treeTableBean.model}"
-                      rendered="true"
+                      rendered="true" width="100%"
                       rowSelection="multiple">
             <f:facet name="nodeStamp">
                 <tr:column>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableNoGridLines.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableNoGridLines.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableNoGridLines.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableNoGridLines.xhtml Wed Mar 10 18:00:17 2010
@@ -7,7 +7,7 @@
 
     <ui:define name="demoContent">
 
-        <tr:treeTable var="foo" value="#{treeTableBean.model}"
+        <tr:treeTable var="foo" value="#{treeTableBean.model}" inlineStyle="width: 100%;" width="100%"
                       rendered="true"
                       verticalGridVisible="false"
                       horizontalGridVisible="false">
@@ -28,4 +28,4 @@
         </tr:treeTable>
 
     </ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSimple.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSimple.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSimple.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSimple.xhtml Wed Mar 10 18:00:17 2010
@@ -8,7 +8,7 @@
     <ui:define name="demoContent">
 
         <tr:treeTable var="foo" value="#{treeTableBean.model}"
-                      rendered="true"
+                      rendered="true" width="100%"
                       expandAllEnabled="false"
                       rootNodeRendered="false">
             <f:facet name="nodeStamp">

Modified: myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSingleRowSelection.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSingleRowSelection.xhtml?rev=921490&r1=921489&r2=921490&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSingleRowSelection.xhtml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.0.3/trinidad-examples/trinidad-components-showcase/src/main/webapp/components/table/treeTable/treeTableSingleRowSelection.xhtml Wed Mar 10 18:00:17 2010
@@ -8,7 +8,7 @@
     <ui:define name="demoContent">
 
         <tr:treeTable var="foo" value="#{treeTableBean.model}"
-                      rendered="true"
+                      rendered="true" width="100%"
                       rowSelection="single">
             <f:facet name="nodeStamp">
                 <tr:column>