You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2009/12/10 18:46:47 UTC

svn commit: r889345 [1/17] - in /myfaces/trinidad/branches/ar_clientBehaviors: ./ trinidad-api/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ trinidad-api/src/main/java/or...

Author: arobinson74
Date: Thu Dec 10 17:46:13 2009
New Revision: 889345

URL: http://svn.apache.org/viewvc?rev=889345&view=rev
Log:
Checkpoint

Added:
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/context/MVisitContextFactory.java
      - copied unchanged from r888973, myfaces/trinidad/trunk/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/context/MVisitContextFactory.java
Modified:
    myfaces/trinidad/branches/ar_clientBehaviors/   (props changed)
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/pom.xml
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesBeanWrapper.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/pom.xml
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/ChartRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/DesktopTableRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TrainRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/FrameRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PanelButtonBarRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaCommandLinkRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaFrameBorderLayoutRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaMessageBoxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaNavigationPaneRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/TrainRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/BodyRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/BreadCrumbsRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ChooseDateRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ColumnGroupRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ColumnRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CommandButtonRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CommandLinkRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/DesktopPanelPageHeaderRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/DocumentRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/EditableValueRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormElementRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormInputRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FrameBorderLayoutRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FrameRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/GoButtonRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/GoLinkRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/HeadRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/HtmlRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/IconRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ImageRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ImportScriptRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/InputColorRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/InputDateRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/InputFileRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/InputHiddenRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/InputLabelAndMessageRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/InputListOfValuesRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/InputNumberSpinboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/InputTextRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/LabelAndMessageRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MediaRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MessageBoxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MessageRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputDocumentRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputFormattedRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputLabelRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputTextRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelAccordionRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBorderLayoutRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelBoxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelButtonBarRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelCaptionGroupRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelFormLayoutRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelGroupLayoutRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHeaderRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHorizontalLayoutRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelLabelAndMessageRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelListRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelPartialRootRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelPopupRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelTipRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PdaPanelPageHeaderRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PollRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ResetButtonRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanCheckboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanRadioRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyCheckboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyListboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyShuttleRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneChoiceRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneListboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneRadioRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOrderShuttleRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SeparatorRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailHeaderRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailItemRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputColorRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputFileRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputListOfValuesRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputNumberSpinboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputTextRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectBooleanCheckboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectBooleanRadioRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectBooleanRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyCheckboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyListboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneChoiceRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneListboxRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRadioRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SingleStepButtonBarRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SpacerRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/StatusIndicatorRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/StyleSheetRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TableRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlUtils.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/DetailColumnRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/FocusColumnRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SpecialColumnRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectManyRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeNodeColumnRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeTableNavRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/CellFormatRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/RowLayoutRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/ScriptRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/TableLayoutRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/ComponentFacesBean.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/HtmlCommandLinkRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/htmlBasic/HtmlFormRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/FastRenderer2.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MRequestContext.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/   (props changed)
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/   (props changed)

Propchange: myfaces/trinidad/branches/ar_clientBehaviors/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 10 17:46:13 2009
@@ -1,5 +1,7 @@
 /myfaces/trinidad/branches/1.2.11.3-branch:770843-770856,771372,785365
 /myfaces/trinidad/branches/1.2.11.4-branch:794062,794792,798299
+/myfaces/trinidad/branches/1.2.12.2-branch:888969
 /myfaces/trinidad/branches/1.2.9.1-branch:697924,699406,699496
 /myfaces/trinidad/branches/TRINIDAD-1402:745675
 /myfaces/trinidad/branches/jwaldman_StyleMap:754977-770778
+/myfaces/trinidad/trunk:888973

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/pom.xml?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/pom.xml (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/pom.xml Thu Dec 10 17:46:13 2009
@@ -106,6 +106,12 @@
       <plugin>
         <groupId>org.apache.myfaces.trinidadbuild</groupId>
         <artifactId>maven-jdev-plugin</artifactId>
+        <configuration>
+          <projectHasTests>true</projectHasTests>
+          <testSourceRoots>
+            <file>${project.basedir}/src/test</file>
+          </testSourceRoots>
+        </configuration>
       </plugin>
 
       <plugin>

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java Thu Dec 10 17:46:13 2009
@@ -6,9 +6,9 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- * 
+ *
  *  http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -29,13 +29,16 @@
 
 import javax.el.ValueExpression;
 
+import javax.faces.component.behavior.ClientBehavior;
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
+
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
+
 /**
  * Base interface for FacesBean storage objects.
- * 
+ *
  */
 public interface FacesBean
 {
@@ -48,7 +51,7 @@
    * Returns a property.  If the property has not been explicitly
    * set, and the key supports bindings, and a ValueBinding has
    * been set for this key, that ValueBinding will be evaluated.
-   * 
+   *
    * @param key the property key
    * @exception IllegalArgumentException if key is a list key
    */
@@ -63,7 +66,7 @@
 
   /**
    * Return a property, ignoring any value bindings.
-   * 
+   *
    * @exception IllegalArgumentException if key is a list key
    */
   public Object getLocalProperty(PropertyKey key);
@@ -84,38 +87,38 @@
   public ValueBinding getValueBinding(PropertyKey key);
 
   /**
-   * Gets the current unevaluated value for the specified property key. 
-   * <p>The method will first look for a local value. If it exists, it will 
-   * be returned. If it does not and the bean supports value expressions, the 
-   * method will look for an expression with the specified key and return it 
+   * Gets the current unevaluated value for the specified property key.
+   * <p>The method will first look for a local value. If it exists, it will
+   * be returned. If it does not and the bean supports value expressions, the
+   * method will look for an expression with the specified key and return it
    * directly if it exists without evaluatig its value.</p>
    * <p>This method is mainly used when:</p>
    * <ul>
-   *   <li>The caller cannot ensure that FacesContext exists at the time 
+   *   <li>The caller cannot ensure that FacesContext exists at the time
    *   of the call</li>
    *   <li>The FacesContext does not yet contains the managed bean
    *   referenced by the value binding</li>
-   *   <li>The managed bean referenced by the value binding is not yet 
+   *   <li>The managed bean referenced by the value binding is not yet
    *   in a coherent state to evaluate the expression</li>
    * </ul>
-   * <p>The most common use case of this method is for message attributes 
-   * set on converters and validators using a value binding referencing 
-   * a managed bean created by <code>&lt;f:loadBundle/&gt;<code>. Since 
-   * loadBundle only creates its bean during the render response phase 
-   * while converter and validators take action during process validation 
-   * phase, the message property's value binding must be stored in a 
-   * special <code>FacesMessage</code> implementation that will evaluate 
+   * <p>The most common use case of this method is for message attributes
+   * set on converters and validators using a value binding referencing
+   * a managed bean created by <code>&lt;f:loadBundle/&gt;<code>. Since
+   * loadBundle only creates its bean during the render response phase
+   * while converter and validators take action during process validation
+   * phase, the message property's value binding must be stored in a
+   * special <code>FacesMessage</code> implementation that will evaluate
    * the binding only during render response.</p>
-   * 
+   *
    * @param key the parameter key of the raw property value to get.
-   * 
-   * @return the local value of the specified key if it exists, a 
-   *         <code>ValueExpression</code> object if the specified key 
-   *         supports expressions and an expression was specified for that 
+   *
+   * @return the local value of the specified key if it exists, a
+   *         <code>ValueExpression</code> object if the specified key
+   *         supports expressions and an expression was specified for that
    *         property, <code>null</code> otherwise.
-   * 
+   *
    * @throws IllegalArgumentException if the specified key is a list key.
-   * 
+   *
    * @see #getLocalProperty(PropertyKey)
    * @see #getValueBinding(PropertyKey)
    * @see #getValueExpression(PropertyKey)
@@ -138,6 +141,21 @@
   public void setValueBinding(PropertyKey key, ValueBinding binding);
 
   /**
+   * Add a client behavior for a bean of a component that is a
+   * {@link javax.faces.component.behavior.ClientBehaviorHolder}
+   * @param eventName the event name
+   * @param behavior the behavior
+   */
+  public void addClientBehavior(String eventName, ClientBehavior behavior);
+
+  /**
+   * Get a map of event name to list of client behaviors for a bean of a component that is a
+   * {@link javax.faces.component.behavior.ClientBehaviorHolder}
+   * @return Non-null map of client behaviors (will return an empty map if none are present)
+   */
+  public Map<String, List<ClientBehavior>> getClientBehaviors();
+
+  /**
    * Add an entry to a list.  The same value may be added
    * repeatedly;  null is also a legal value.  (Consumers of
    * this API can apply more stringent rules to specific keys
@@ -153,7 +171,7 @@
   public void removeEntry(PropertyKey listKey, Object value);
 
   /**
-   * Return as an array all elements of this key that 
+   * Return as an array all elements of this key that
    * are instances of the specified class.
    * @return an array whose instance type is the class
    * @exception IllegalArgumentException if the key is not a list key.
@@ -203,15 +221,15 @@
    */
   public void markInitialState();
 
-  /** 
+  /**
    * @return true if delta state changes are being tracked, otherwise false
    */
   public boolean initialStateMarked();
 
-  /** 
+  /**
    * Reset to a non-delta tracking state.
    */
-  public void clearInitialState();     
+  public void clearInitialState();
 
   /**
    * Saves the state of a FacesBean.
@@ -270,7 +288,7 @@
     {
       if ((index < 0) || (index >= _keyList.size()))
         return null;
-      
+
       return _keyList.get(index);
     }
 
@@ -343,14 +361,14 @@
     public PropertyKey registerAlias(PropertyKey key, String alias)
     {
       _checkLocked();
-      
+
       if (findKey(alias) != null)
         throw new IllegalStateException();
 
       _keyMap.put(alias, key);
       return key;
     }
-    
+
 
     /**
      * Register a new key with a set of capabilities.
@@ -358,7 +376,7 @@
      *    or the key already exists.
      */
     public PropertyKey registerKey(
-      String   name, 
+      String   name,
       Class<?> type,
       Object   defaultValue,
       int      capabilities)
@@ -374,8 +392,8 @@
       addKey(key);
       return key;
     }
-    
-    
+
+
     /**
      * Locks the type object, preventing further changes.
      */
@@ -407,12 +425,12 @@
     {
       return propertyKeys().iterator();
     }
-    
+
     /**
      * Returns an unmodifiable <code>Collection</code> of registered property keys,
      * excluding aliases.
-     * 
-     * @return unmodifiable <code>Collection</code> with registered 
+     *
+     * @return unmodifiable <code>Collection</code> with registered
      */
     public Collection<PropertyKey> propertyKeys()
     {
@@ -454,7 +472,7 @@
     protected void addKey(PropertyKey key)
     {
       _checkLocked();
-      
+
       // Restore the old key
       PropertyKey oldValue = _keyMap.put(key.getName(), key);
       if (oldValue != null)
@@ -463,7 +481,7 @@
         throw new IllegalStateException(_LOG.getMessage(
           "NAME_ALREADY_REGISTERED", key.getName()));
       }
-      
+
       int index = key.getIndex();
       if (index >= 0)
       {
@@ -476,12 +494,12 @@
               "INDEX_ALREADY_REGISTERED", index));
           }
       }
-      
+
       // Set the backpointer
       key.__setOwner(this);
     }
-     
-    
+
+
     static private void _expandListToIndex(ArrayList<PropertyKey> list, int count)
     {
       list.ensureCapacity(count + 1);
@@ -514,6 +532,6 @@
     private boolean   _isLocked;
     private int       _index;
     private final Type _superType;
-    static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(Type.class); 
+    static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(Type.class);
   }
 }

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java Thu Dec 10 17:46:13 2009
@@ -22,16 +22,22 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import javax.el.ValueExpression;
 
+import javax.faces.component.PartialStateHolder;
+import javax.faces.component.StateHolder;
+import javax.faces.component.behavior.ClientBehavior;
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
 
 import org.apache.myfaces.trinidad.bean.util.FlaggedPropertyMap;
+import org.apache.myfaces.trinidad.bean.util.StateUtils;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 
@@ -169,6 +175,51 @@
     setValueExpression(key, ve);
   }
 
+  final public void addClientBehavior(
+    String         eventName,
+    ClientBehavior behavior)
+  {
+    if (_behaviors != null)
+    {
+      if (_behaviors.initialStateMarked())
+      {
+        // Resest the state of the behaviors so that their full state is saved when the
+        // behaviors of this component have been changed
+        _behaviors.clearInitialState();
+      }
+    }
+    else
+    {
+      _behaviors = new BehaviorMap();
+      _behaviorsReadOnly = null;
+    }
+
+    List<ClientBehavior> list = _behaviors.get(eventName);
+    if (list == null)
+    {
+      // Use a small number here as it will not be likely to have many behaviors for a component
+      // per event (probably 1)
+      list = new ArrayList<ClientBehavior>(5);
+      _behaviors.put(eventName, list);
+    }
+    list.add(behavior);
+  }
+
+  public Map<String, List<ClientBehavior>> getClientBehaviors()
+  {
+    if (_behaviors == null)
+    {
+      // never return null, per the spec.
+      return Collections.emptyMap();
+    }
+
+    if (_behaviorsReadOnly == null)
+    {
+      _behaviorsReadOnly = Collections.unmodifiableMap(_behaviors);
+    }
+    return _behaviorsReadOnly;
+  }
+
   @SuppressWarnings("unchecked")
   final public void addEntry(PropertyKey listKey, Object value)
   {
@@ -322,6 +373,9 @@
 
     if (_expressions != null)
       _expressions.markInitialState();
+
+    if (_behaviors != null)
+      _behaviors.markInitialState();
   }
 
   public void clearInitialState()
@@ -333,6 +387,9 @@
 
     if (_expressions != null)
       _expressions.clearInitialState();
+
+    if (_behaviors != null)
+      _behaviors.clearInitialState();
   }
 
   public boolean initialStateMarked()
@@ -350,7 +407,20 @@
     if (state instanceof Object[])
     {
       Object[] asArray = (Object[]) state;
-      if (asArray.length == 2)
+      if (asArray.length == 3)
+      {
+        Object propertyState = asArray[0];
+        Object bindingsState = asArray[1];
+        Object behaviorState = asArray[2];
+        _getPropertyMap().restoreState(context, getType(), propertyState);
+        if (bindingsState != null)
+        {
+          _getExpressionsMap(true).restoreState(context, getType(), bindingsState);
+        }
+        _getBehaviors(true).restoreState(context, behaviorState);
+        return;
+      }
+      else if (asArray.length == 2)
       {
         Object propertyState = asArray[0];
         Object bindingsState = asArray[1];
@@ -376,7 +446,6 @@
       _LOG.finer("Saving state of " + this);
     }
 
-
     Object propertyState = (_properties == null)
                             ? null
                             : _properties.saveState(context);
@@ -384,9 +453,15 @@
                             ? null
                             : _expressions.saveState(context);
 
+    Object behaviorState = _behaviors == null ? null : _behaviors.saveState(context);
+
+    if (behaviorState != null)
+    {
+      return new Object[] { propertyState, bindingsState, behaviorState };
+    }
     if (bindingsState != null)
     {
-      return new Object[]{propertyState, bindingsState};
+      return new Object[] { propertyState, bindingsState };
     }
 
     if (propertyState == null)
@@ -483,6 +558,17 @@
     return _properties;
   }
 
+  private BehaviorMap _getBehaviors(
+    boolean create)
+  {
+    if (_behaviors == null && create)
+    {
+      _behaviors = new BehaviorMap();
+    }
+
+    return _behaviors;
+  }
+
   private PropertyMap _getExpressionsMap(boolean createIfNew)
   {
     if (_expressions == null)
@@ -512,9 +598,171 @@
         "KEY_IS_LIST_KEY", key));
   }
 
-  private PropertyMap  _properties;
-  private PropertyMap  _expressions;
-  private transient boolean  _initialStateMarked;
+  private static class BehaviorMap
+    extends HashMap<String, List<ClientBehavior>>
+    implements PartialStateHolder
+  {
+    BehaviorMap()
+    {
+      // We do not expect many event types to be present on the component and we will assume 5
+      // to avoid the overhead of actually checking the number by calling the component method
+      this(5);
+    }
+
+    BehaviorMap(int initialCapacity)
+    {
+      super(initialCapacity, 1.0f);
+    }
+
+    public void markInitialState()
+    {
+      for (Map.Entry<String, List<ClientBehavior>> e : this.entrySet())
+      {
+        for (ClientBehavior behavior : e.getValue())
+        {
+          if (behavior instanceof PartialStateHolder)
+          {
+            ((PartialStateHolder)behavior).markInitialState();
+          }
+        }
+      }
+      _initialStateMarked = true;
+    }
+
+    public void clearInitialState()
+    {
+      _initialStateMarked = false;
+      for (Map.Entry<String, List<ClientBehavior>> e : this.entrySet())
+      {
+        for (ClientBehavior behavior : e.getValue())
+        {
+          if (behavior instanceof PartialStateHolder)
+          {
+            ((PartialStateHolder)behavior).clearInitialState();
+          }
+        }
+      }
+    }
+
+    public boolean initialStateMarked()
+    {
+      return _initialStateMarked;
+    }
+
+    public Object saveState(
+      FacesContext facesContext)
+    {
+      Map<String, Object[]> state = new HashMap<String, Object[]>(this.size());
+      for (Map.Entry<String, List<ClientBehavior>> e : this.entrySet())
+      {
+        List<ClientBehavior> l = e.getValue();
+        Object[] entryState = new Object[l.size()];
+        boolean stateWasSaved = false;
+        for (int i = 0, size = entryState.length; i < size; ++i)
+        {
+          ClientBehavior behavior = l.get(i);
+          if (_initialStateMarked)
+          {
+            // JSF 2 state saving, only save the behavior's state if it is a state holder,
+            // otherwise the re-application of the template will handle the re-creation of the
+            // client behavior in the correct state
+            if (behavior instanceof StateHolder)
+            {
+              entryState[i] = ((StateHolder)behavior).saveState(facesContext);
+            }
+          }
+          else
+          {
+            // Use JSF <= 1.2 state saving method as the initial state was not marked
+            entryState[i] = StateUtils.saveStateHolder(facesContext, behavior);
+          }
+
+          stateWasSaved &= (entryState[i] != null);
+        }
+
+        if (stateWasSaved)
+        {
+          state.put(e.getKey(), entryState);
+        }
+      }
+      return state.isEmpty() ? null : state;
+    }
+
+    public void restoreState(
+      FacesContext facesContext,
+      Object       state)
+    {
+      @SuppressWarnings("unchecked")
+      Map<String, Object[]> savedState = (Map<String, Object[]>) state;
+
+      if (_initialStateMarked)
+      {
+        // In JSF 2 state saving, we only need to super impose the state onto the existing
+        // client behavior list of the current map as the behaviors will already be restored in
+        // the same order that they were in the previous request (if not there is an application
+        // bug).
+        for (Map.Entry<String, Object[]> e : savedState.entrySet())
+        {
+          // Assume that the behaviors were correctly re-attached to the component and we only
+          // need to restore the state onto the objects. The order must be maintained.
+          List<ClientBehavior> behaviors = get(e.getKey());
+          Object[] entryState = e.getValue();
+          for (int i = 0, size = entryState.length; i < size; ++i)
+          {
+            if (entryState[i] != null)
+            {
+              ClientBehavior behavior = behaviors.get(i);
+              if (behavior instanceof StateHolder)
+              {
+                ((StateHolder)behavior).restoreState(facesContext, entryState[i]);
+              }
+            }
+          }
+        }
+      }
+      else
+      {
+        // For JSF <= 1.2 style state saving, we should ensure that we are empty and then
+        // re-hydrate the behaviors directly from the state
+        this.clear();
+
+        for (Map.Entry<String, Object[]> e : savedState.entrySet())
+        {
+          Object[] entryState = e.getValue();
+          // Assume the list is not going to grow in this request, so only allocate the size
+          // of the list from the previous request
+          List<ClientBehavior> list = new ArrayList<ClientBehavior>(entryState.length);
+          for (int i = 0, size = entryState.length; i < size; ++i)
+          {
+            list.add((ClientBehavior)StateUtils.restoreStateHolder(facesContext, entryState[i]));
+          }
+
+          this.put(e.getKey(), list);
+        }
+      }
+    }
+
+    public boolean isTransient()
+    {
+      return _transient;
+    }
+
+    public void setTransient(
+      boolean newTransientValue)
+    {
+      _transient = newTransientValue;
+    }
+
+    private boolean _transient;
+    private boolean _initialStateMarked;
+  }
+
+  private PropertyMap _properties;
+  private PropertyMap _expressions;
+  private BehaviorMap _behaviors;
+
+  private transient boolean                           _initialStateMarked;
+  private transient Map<String, List<ClientBehavior>> _behaviorsReadOnly;
 
   static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
                                                FacesBeanImpl.class);

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesBeanWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesBeanWrapper.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesBeanWrapper.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesBeanWrapper.java Thu Dec 10 17:46:13 2009
@@ -19,10 +19,13 @@
 package org.apache.myfaces.trinidad.component;
 
 import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import javax.el.ValueExpression;
 
+import javax.faces.component.behavior.ClientBehavior;
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
 
@@ -96,6 +99,16 @@
     _wrapped.setValueBinding(key, binding);
   }
 
+  public void addClientBehavior(String eventName, ClientBehavior behavior)
+  {
+    _wrapped.addClientBehavior(eventName, behavior);
+  }
+
+  public Map<String, List<ClientBehavior>> getClientBehaviors()
+  {
+    return _wrapped.getClientBehaviors();
+  }
+
   public void addEntry(PropertyKey listKey, Object value)
   {
     _wrapped.addEntry(listKey, value);
@@ -136,7 +149,6 @@
     return _wrapped.bindingKeySet();
   }
 
-
   public Object saveState(FacesContext context)
   {
     return _wrapped.saveState(context);
@@ -156,7 +168,7 @@
   {
     _wrapped.markInitialState();
   }
-  
+
   public boolean initialStateMarked()
   {
     return _wrapped.initialStateMarked();

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java Thu Dec 10 17:46:13 2009
@@ -25,10 +25,7 @@
 
 import java.net.URL;
 
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -43,8 +40,6 @@
 import javax.faces.FacesException;
 import javax.faces.component.ContextCallback;
 import javax.faces.component.NamingContainer;
-import javax.faces.component.PartialStateHolder;
-import javax.faces.component.StateHolder;
 import javax.faces.component.UIComponent;
 import javax.faces.component.behavior.ClientBehavior;
 import javax.faces.component.behavior.ClientBehaviorHolder;
@@ -269,8 +264,6 @@
     }
   }
 
-
-
   /**
    */
   @Override
@@ -290,7 +283,6 @@
     return getFacesBean().getValueBinding(key);
   }
 
-
   @Override
   public void setValueBinding(String name, ValueBinding binding)
   {
@@ -301,7 +293,6 @@
     getFacesBean().setValueBinding(key, binding);
   }
 
-
   @Override
   public Map<String, Object> getAttributes()
   {
@@ -313,8 +304,6 @@
 
   // ------------------------------------------------------------- Properties
 
-
-
   @Override
   public String getClientId(FacesContext context)
   {
@@ -362,7 +351,6 @@
     return clientId;
   }
 
-
   /**
    * Gets the identifier for the component.
    */
@@ -372,7 +360,6 @@
     return (String) getProperty(ID_KEY);
   }
 
-
   /**
    * Sets the identifier for the component.  The identifier
    * must follow a subset of the syntax allowed in HTML:
@@ -396,12 +383,9 @@
     setProperty(ID_KEY, id);
   }
 
-
-
   @Override
   abstract public String getFamily();
 
-
   @Override
   public UIComponent getParent()
   {
@@ -912,20 +896,12 @@
     // FIXME: Set to true, but never read
     //_initialStateMarked = true;
     getFacesBean().markInitialState();
-    if (_behaviors != null)
-    {
-      _behaviors.markInitialState();
-    }
   }
 
   @Override
   public void clearInitialState()
   {
     getFacesBean().clearInitialState();
-    if (_behaviors != null)
-    {
-      _behaviors.clearInitialState();
-    }
   }
 
   @Override
@@ -936,27 +912,14 @@
 
   public Object saveState(FacesContext facesContext)
   {
-    return new Object[]
-      {
-        getFacesBean().saveState(facesContext),
-        _behaviors == null ? null : _behaviors.saveState(facesContext)
-      };
+    return getFacesBean().saveState(facesContext);
   }
 
   public void restoreState(
     FacesContext facesContext,
     Object       stateObj)
   {
-    Object[] state = (Object[])stateObj;
-    getFacesBean().restoreState(facesContext, state[0]);
-    if (state[1] != null)
-    {
-      if (_behaviors == null)
-      {
-        _behaviors = new BehaviorMap();
-      }
-      _behaviors.restoreState(facesContext, state[1]);
-    }
+    getFacesBean().restoreState(facesContext, stateObj);
   }
 
   @Override
@@ -1472,30 +1435,7 @@
       return;
     }
 
-    if (_behaviors != null)
-    {
-      if (_behaviors.initialStateMarked())
-      {
-        // Resest the state of the behaviors so that their full state is saved when the
-        // behaviors of this component have been changed
-        _behaviors.clearInitialState();
-      }
-    }
-    else
-    {
-      _behaviors = new BehaviorMap();
-      _behaviorsReadOnly = null;
-    }
-
-    List<ClientBehavior> list = _behaviors.get(eventName);
-    if (list == null)
-    {
-      // Use a small number here as it will not be likely to have many behaviors for a component
-      // per event (probably 1)
-      list = new ArrayList<ClientBehavior>(5);
-      _behaviors.put(eventName, list);
-    }
-    list.add(behavior);
+    getFacesBean().addClientBehavior(eventName, behavior);
   }
 
   // Note, we do not need to provide a default implementation for the event names, as client
@@ -1516,17 +1456,7 @@
    */
   protected Map<String, List<ClientBehavior>> getClientBehaviors()
   {
-    if (_behaviors == null)
-    {
-      // never return null, per the spec.
-      return Collections.emptyMap();
-    }
-
-    if (_behaviorsReadOnly == null)
-    {
-      _behaviorsReadOnly = Collections.unmodifiableMap(_behaviors);
-    }
-    return _behaviorsReadOnly;
+    return getFacesBean().getClientBehaviors();
   }
 
   /**
@@ -1716,9 +1646,6 @@
   private Map<String, Object>      _attributes;
   private Map<String, UIComponent> _facets;
   private UIComponent              _parent;
-  private BehaviorMap              _behaviors;
-
-  private transient Map<String, List<ClientBehavior>> _behaviorsReadOnly;
 
   // Cached instance of the Renderer for this component.
   // The instance will be re-retrieved in encodeBegin()
@@ -1807,165 +1734,6 @@
 
   }
 
-  private static class BehaviorMap
-    extends HashMap<String, List<ClientBehavior>>
-    implements PartialStateHolder
-  {
-    BehaviorMap()
-    {
-      // We do not expect many event types to be present on the component and we will assume 5
-      // to avoid the overhead of actually checking the number by calling the component method
-      this(5);
-    }
-
-    BehaviorMap(int initialCapacity)
-    {
-      super(initialCapacity, 1.0f);
-    }
-
-    public void markInitialState()
-    {
-      for (Map.Entry<String, List<ClientBehavior>> e : this.entrySet())
-      {
-        for (ClientBehavior behavior : e.getValue())
-        {
-          if (behavior instanceof PartialStateHolder)
-          {
-            ((PartialStateHolder)behavior).markInitialState();
-          }
-        }
-      }
-      _initialStateMarked = true;
-    }
-
-    public void clearInitialState()
-    {
-      _initialStateMarked = false;
-      for (Map.Entry<String, List<ClientBehavior>> e : this.entrySet())
-      {
-        for (ClientBehavior behavior : e.getValue())
-        {
-          if (behavior instanceof PartialStateHolder)
-          {
-            ((PartialStateHolder)behavior).clearInitialState();
-          }
-        }
-      }
-    }
-
-    public boolean initialStateMarked()
-    {
-      return _initialStateMarked;
-    }
-
-    public Object saveState(
-      FacesContext facesContext)
-    {
-      Map<String, Object[]> state = new HashMap<String, Object[]>(this.size());
-      for (Map.Entry<String, List<ClientBehavior>> e : this.entrySet())
-      {
-        List<ClientBehavior> l = e.getValue();
-        Object[] entryState = new Object[l.size()];
-        boolean stateWasSaved = false;
-        for (int i = 0, size = entryState.length; i < size; ++i)
-        {
-          ClientBehavior behavior = l.get(i);
-          if (_initialStateMarked)
-          {
-            // JSF 2 state saving, only save the behavior's state if it is a state holder,
-            // otherwise the re-application of the template will handle the re-creation of the
-            // client behavior in the correct state
-            if (behavior instanceof StateHolder)
-            {
-              entryState[i] = ((StateHolder)behavior).saveState(facesContext);
-            }
-          }
-          else
-          {
-            // Use JSF <= 1.2 state saving method as the initial state was not marked
-            entryState[i] = StateUtils.saveStateHolder(facesContext, behavior);
-          }
-
-          stateWasSaved &= (entryState[i] != null);
-        }
-
-        if (stateWasSaved)
-        {
-          state.put(e.getKey(), entryState);
-        }
-      }
-      return state.isEmpty() ? null : state;
-    }
-
-    public void restoreState(
-      FacesContext facesContext,
-      Object       state)
-    {
-      @SuppressWarnings("unchecked")
-      Map<String, Object[]> savedState = (Map<String, Object[]>) state;
-
-      if (_initialStateMarked)
-      {
-        // In JSF 2 state saving, we only need to super impose the state onto the existing
-        // client behavior list of the current map as the behaviors will already be restored in
-        // the same order that they were in the previous request (if not there is an application
-        // bug).
-        for (Map.Entry<String, Object[]> e : savedState.entrySet())
-        {
-          // Assume that the behaviors were correctly re-attached to the component and we only
-          // need to restore the state onto the objects. The order must be maintained.
-          List<ClientBehavior> behaviors = get(e.getKey());
-          Object[] entryState = e.getValue();
-          for (int i = 0, size = entryState.length; i < size; ++i)
-          {
-            if (entryState[i] != null)
-            {
-              ClientBehavior behavior = behaviors.get(i);
-              if (behavior instanceof StateHolder)
-              {
-                ((StateHolder)behavior).restoreState(facesContext, entryState[i]);
-              }
-            }
-          }
-        }
-      }
-      else
-      {
-        // For JSF <= 1.2 style state saving, we should ensure that we are empty and then
-        // re-hydrate the behaviors directly from the state
-        this.clear();
-
-        for (Map.Entry<String, Object[]> e : savedState.entrySet())
-        {
-          Object[] entryState = e.getValue();
-          // Assume the list is not going to grow in this request, so only allocate the size
-          // of the list from the previous request
-          List<ClientBehavior> list = new ArrayList<ClientBehavior>(entryState.length);
-          for (int i = 0, size = entryState.length; i < size; ++i)
-          {
-            list.add((ClientBehavior)StateUtils.restoreStateHolder(facesContext, entryState[i]));
-          }
-
-          this.put(e.getKey(), list);
-        }
-      }
-    }
-
-    public boolean isTransient()
-    {
-      return _transient;
-    }
-
-    public void setTransient(
-      boolean newTransientValue)
-    {
-      _transient = newTransientValue;
-    }
-
-    private boolean _transient;
-    private boolean _initialStateMarked;
-  }
-
   static private final LifecycleRenderer _UNDEFINED_LIFECYCLE_RENDERER =
                                                 new ExtendedRendererImpl();
   static private final Renderer _UNDEFINED_RENDERER = new RendererImpl();

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java Thu Dec 10 17:46:13 2009
@@ -81,10 +81,10 @@
    * @return The VisitResult controlling continued iteration of the visit.
    */
   public VisitResult partialEncodeVisit(
-    VisitContext visitContext,
+    VisitContext       visitContext,
     PartialPageContext partialContext,
-    UIComponent component,
-    VisitCallback callback)
+    UIComponent        component,
+    VisitCallback      callback)
   {
     if (partialContext.isPossiblePartialTarget(component.getId()) &&
         partialContext.isPartialTarget(component.getClientId(visitContext.getFacesContext())))
@@ -116,16 +116,16 @@
    * @see #tearDownEncodingContext
    */
   public void setupEncodingContext(
-    FacesContext context,
+    FacesContext     context,
     RenderingContext rc,
-    UIXComponent component)
+    UIXComponent     component)
   {
   }
 
   public void setupEncodingContext(
-    FacesContext context,
+    FacesContext     context,
     RenderingContext rc,
-    UIComponent component)
+    UIComponent      component)
   {
     // temporary hack to change UIComponent.  Once the change has propagated through, we will
     // remove the UIXComponent version.
@@ -150,16 +150,16 @@
    * @see #setupEncodingContext
    */
   public void tearDownEncodingContext(
-    FacesContext context,
+    FacesContext     context,
     RenderingContext rc,
     UIXComponent     component)
   {
   }
 
   public void tearDownEncodingContext(
-    FacesContext context,
+    FacesContext     context,
     RenderingContext rc,
-    UIComponent     component)
+    UIComponent      component)
   {
     // temporary hack to change UIComponent.  Once the change has propagated through, we will
     // remove the UIXComponent version.
@@ -318,8 +318,10 @@
   }
 
   @Override
-  public final void encodeBegin(FacesContext context,
-                          UIComponent component) throws IOException
+  public final void encodeBegin(
+    FacesContext context,
+    UIComponent  component
+    ) throws IOException
   {
     if (!getRendersChildren())
     {
@@ -336,15 +338,19 @@
   }
 
   @Override
-  public final void encodeChildren(FacesContext context, UIComponent component)
+  public final void encodeChildren(
+    FacesContext context,
+    UIComponent  component)
   {
     // encodeChildren() is fairly useless - it's simpler to just
     // put the output in encodeEnd(), or use the encodeAll() hook
   }
 
   @Override
-  public final void encodeEnd(FacesContext context,
-                        UIComponent component) throws IOException
+  public final void encodeEnd(
+    FacesContext context,
+    UIComponent  component
+    ) throws IOException
   {
     RenderingContext rc = RenderingContext.getCurrentInstance();
     if (rc == null)
@@ -372,7 +378,8 @@
     FacesContext     context,
     RenderingContext rc,
     UIComponent      component,
-    FacesBean        bean) throws IOException
+    FacesBean        bean
+    ) throws IOException
   {
     if (getRendersChildren())
       throw new IllegalStateException();
@@ -387,7 +394,8 @@
    */
   protected final void encodeComponentResources(
     FacesContext context,
-    String       target) throws IOException
+    String       target
+    ) throws IOException
   {
     if(target != null)
     {
@@ -407,7 +415,8 @@
     FacesContext     context,
     RenderingContext rc,
     UIComponent      component,
-    FacesBean        bean) throws IOException
+    FacesBean        bean
+    ) throws IOException
   {
     if (getRendersChildren())
       throw new IllegalStateException();
@@ -421,7 +430,8 @@
     FacesContext     context,
     RenderingContext rc,
     UIComponent      component,
-    FacesBean        bean) throws IOException
+    FacesBean        bean
+    ) throws IOException
   {
     if (!getRendersChildren())
       throw new IllegalStateException();
@@ -436,7 +446,8 @@
   @SuppressWarnings("unchecked")
   protected void encodeChild(
     FacesContext context,
-    UIComponent  child) throws IOException
+    UIComponent  child
+    ) throws IOException
   {
     assert(child.isRendered());
     child.encodeBegin(context);
@@ -461,7 +472,8 @@
   @SuppressWarnings("unchecked")
   protected void encodeAllChildren(
     FacesContext context,
-    UIComponent  component) throws IOException
+    UIComponent  component
+    ) throws IOException
   {
     int childCount = component.getChildCount();
     if (childCount == 0)
@@ -481,7 +493,8 @@
     RenderingContext rc,
     UIComponent      component,
     FacesBean        bean,
-    CoreRenderer     renderer) throws IOException
+    CoreRenderer     renderer
+    ) throws IOException
   {
     if (renderer.getRendersChildren())
     {
@@ -498,7 +511,8 @@
     RenderingContext rc,
     UIComponent      component,
     FacesBean        bean,
-    CoreRenderer     renderer) throws IOException
+    CoreRenderer     renderer
+    ) throws IOException
   {
     if (renderer.getRendersChildren())
     {
@@ -515,7 +529,8 @@
     RenderingContext rc,
     UIComponent      component,
     FacesBean        bean,
-    CoreRenderer     renderer) throws IOException
+    CoreRenderer     renderer
+    ) throws IOException
   {
     if (renderer.getRendersChildren())
     {
@@ -532,7 +547,8 @@
    */
   protected void renderId(
     FacesContext context,
-    UIComponent  component) throws IOException
+    UIComponent component
+    ) throws IOException
   {
     if (shouldRenderId(context, component))
     {
@@ -559,7 +575,7 @@
   // TODO Is this a bottleneck?  If so, optimize!
   protected boolean shouldRenderId(
     FacesContext context,
-    UIComponent  component)
+    UIComponent component)
   {
     String id = component.getId();
 
@@ -574,12 +590,14 @@
     return true;
   }
 
-  protected boolean skipDecode(FacesContext context)
+  protected boolean skipDecode(
+    FacesContext context)
   {
     return false;
   }
 
-  protected FacesBean getFacesBean(UIComponent component)
+  protected FacesBean getFacesBean(
+    UIComponent component)
   {
     return ((UIXComponent) component).getFacesBean();
   }
@@ -618,7 +636,8 @@
    * one has rendered=="true".
    */
   @SuppressWarnings("unchecked")
-  static public boolean hasRenderedChildren(UIComponent component)
+  static public boolean hasRenderedChildren(
+    UIComponent component)
   {
     int count = component.getChildCount();
     if (count == 0)
@@ -639,7 +658,8 @@
    * Returns the total number of children with rendered=="true".
    */
   @SuppressWarnings("unchecked")
-  static public int getRenderedChildCount(UIComponent component)
+  static public int getRenderedChildCount(
+    UIComponent component)
   {
     int count = component.getChildCount();
     if (count == 0)
@@ -665,7 +685,7 @@
    */
   public static int getNextRenderedChildIndex(
     List<UIComponent> components,
-    int  afterChildIndex
+    int               afterChildIndex
     )
   {
     int childIndex = afterChildIndex + 1;

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/pom.xml?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/pom.xml (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/pom.xml Thu Dec 10 17:46:13 2009
@@ -141,6 +141,10 @@
           <resourceRoots>
             <resourceRoot>src/main/javascript/</resourceRoot>
           </resourceRoots>
+          <projectHasTests>true</projectHasTests>
+          <testSourceRoots>
+            <file>${project.basedir}/src/test</file>
+          </testSourceRoots>
         </configuration>
       </plugin>
       <plugin>

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/ChartRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/ChartRenderer.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/ChartRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/ChartRenderer.java Thu Dec 10 17:46:13 2009
@@ -80,8 +80,6 @@
     _maxPrecisionKey = type.findKey("maxPrecision");
   }
 
-
-
   /**
    * @todo Decode the chart drill down event
    *
@@ -166,7 +164,7 @@
   @Override
   protected boolean shouldRenderId(
    FacesContext context,
-   UIComponent  component)
+   UIComponent component)
   {
     return true;
   }
@@ -176,42 +174,44 @@
    */
   @Override
   protected void encodeAll(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    if (canSkipRendering(context, arc, component))
+    if (canSkipRendering(context, rc, component))
       return;
 
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement(XhtmlConstants.DIV_ELEMENT, component);
     renderId(context, component);
-    renderStyleAttributes(context, arc, bean, SkinSelectors.AF_CHART_STYLE_CLASS);
+    renderStyleAttributes(context, rc, component, bean, SkinSelectors.AF_CHART_STYLE_CLASS);
     // We need the number convertor so that we can format numbers on the client
-    XhtmlUtils.addLib(context, arc, _NUMBER_CONVERTER_SCRIPTLET);
+    XhtmlUtils.addLib(context, rc, _NUMBER_CONVERTER_SCRIPTLET);
     // output the chart javascript library
-    chartLib.outputScriptlet(context, arc);
+    chartLib.outputScriptlet(context, rc);
 
     // We will render the chart using JavaScript
     StringWriter sw = new StringWriter(5000);
     _outputSVGDocumentCreate(context, sw, component, bean);
     _outputJSChartModel(sw, component);
-    _outputJSChartObject(context, arc, sw, component, bean);
+    _outputJSChartObject(context, rc, sw, component, bean);
     // Output the script to the response
     rw.startElement(XhtmlConstants.SCRIPT_ELEMENT, null);
-    renderScriptDeferAttribute(context, arc);
-    renderScriptTypeAttribute(context, arc);
+    renderScriptDeferAttribute(context, rc);
+    renderScriptTypeAttribute(context, rc);
     rw.write(sw.toString());
     rw.endElement(XhtmlConstants.SCRIPT_ELEMENT);
     rw.endElement(XhtmlConstants.DIV_ELEMENT);
   }
 
   protected void _outputSVGDocumentCreate(
-    FacesContext        context,
+    FacesContext context,
     StringWriter sw,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    UIComponent  component,
+    FacesBean    bean
+    ) throws IOException
   {
     sw.append("ApacheChart.createSVG(\"");
     String clientId = component.getClientId(context);
@@ -219,7 +219,7 @@
     sw.append("\",\"svgChart");
     sw.append(clientId);
     sw.append("\",\"");
-    String templateURL = getTemplateSource(bean);
+    String templateURL = getTemplateSource(component, bean);
     templateURL = context.getExternalContext().encodeResourceURL(templateURL);
     sw.append(templateURL);
     sw.append("\",\"width:100%; height:100%;\"");
@@ -228,7 +228,8 @@
 
   protected void _outputJSChartModel(
     StringWriter sw,
-    UIComponent         component) throws IOException
+    UIComponent  component
+    ) throws IOException
   {
     CoreChart chart = (CoreChart)component;
     ChartModel model = (ChartModel)chart.getValue();
@@ -279,11 +280,12 @@
   }
 
   protected void _outputJSChartObject(
-    FacesContext        context,
-    RenderingContext    arc,
-    StringWriter sw,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    StringWriter     sw,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     Integer type = _typeToJSTypeMap.get(getType(bean));
     if(type == null)
@@ -298,45 +300,45 @@
     sw.append(";\n");
 
     sw.append("var isPerspective = ");
-    _writeJSObject(sw, isPerspective(bean));
+    _writeJSObject(sw, isPerspective(component, bean));
     sw.append(";\n");
 
     sw.append("var legendPosition = ");
-    _writeJSObject(sw, getLegendPosition(bean));
+    _writeJSObject(sw, getLegendPosition(component, bean));
     sw.append(";\n");
 
     sw.append("var apacheChart = ApacheChart.createChart(type, model, chartId, isPerspective, legendPosition);");
 
     sw.append("apacheChart.setYMajorGridLineCount(");
-    _writeJSObject(sw, getYMajorGridLineCount (bean));
+    _writeJSObject(sw, getYMajorGridLineCount(component, bean));
     sw.append(");\n");
 
     sw.append("apacheChart.setYMinorGridLineCount(");
-    _writeJSObject(sw, getYMinorGridLineCount(bean));
+    _writeJSObject(sw, getYMinorGridLineCount(component, bean));
     sw.append(");\n");
 
     sw.append("apacheChart.setXMajorGridLineCount(");
-    _writeJSObject(sw, getXMajorGridLineCount(bean));
+    _writeJSObject(sw, getXMajorGridLineCount(component, bean));
     sw.append(");\n");
 
     sw.append("apacheChart.setGradientsUsed(");
-    _writeJSObject(sw, isGradientsUsed(bean));
+    _writeJSObject(sw, isGradientsUsed(component, bean));
     sw.append(");\n");
 
     sw.append("apacheChart.setAnimationDuration(");
-    _writeJSObject(sw, getAnimationDuration(bean));
+    _writeJSObject(sw, getAnimationDuration(component, bean));
     sw.append(");\n");
 
     sw.append("apacheChart.setTooltipsVisible(");
-    _writeJSObject(sw, isTooltipsVisible(bean));
+    _writeJSObject(sw, isTooltipsVisible(component, bean));
     sw.append(");\n");
 
     sw.append("apacheChart.setMaxPrecision(");
-    _writeJSObject(sw, getMaxPrecision(bean));
+    _writeJSObject(sw, getMaxPrecision(component, bean));
     sw.append(");\n");
 
     String formName;
-    FormData fData = arc.getFormData();
+    FormData fData = rc.getFormData();
     if (fData == null)
       formName =  null;
     else
@@ -356,21 +358,21 @@
       sw.append(");\n");
     }
 
-    if(TrinidadAgent.AGENT_IE.equals(arc.getAgent().getAgentName()))
+    if(TrinidadAgent.AGENT_IE.equals(rc.getAgent().getAgentName()))
     {
       sw.append("apacheChart.setErrorHtml(");
-      _writeJSObject(sw, arc.getTranslatedString("af_chart.IE_SVG_PLUGIN_ERROR_HTML"));
+      _writeJSObject(sw, rc.getTranslatedString("af_chart.IE_SVG_PLUGIN_ERROR_HTML"));
       sw.append(");\n");
     }
     else
     {
       sw.append("apacheChart.setErrorHtml(");
-      _writeJSObject(sw, arc.getTranslatedString("af_chart.SVG_ENABLED_BROWSER_ERROR_HTML"));
+      _writeJSObject(sw, rc.getTranslatedString("af_chart.SVG_ENABLED_BROWSER_ERROR_HTML"));
       sw.append(");\n");
     }
 
     sw.append("apacheChart.setStatusHtml(");
-    _writeJSObject(sw, arc.getTranslatedString("af_chart.SVG_LOADING_STATUS_HTML"));
+    _writeJSObject(sw, rc.getTranslatedString("af_chart.SVG_LOADING_STATUS_HTML"));
     sw.append(");\n");
 
     // finally draw the chart
@@ -380,7 +382,8 @@
   @SuppressWarnings("unchecked")
   static private void _writeJSObject(
     StringWriter sw,
-    Object   attrValue) throws IOException
+    Object       attrValue
+    ) throws IOException
   {
     if (attrValue == null)
     {
@@ -425,7 +428,8 @@
    */
   static private void _writeJSString(
     StringWriter sw,
-    String  value) throws IOException
+    String       value
+    ) throws IOException
   {
     if (value == null)
     {
@@ -535,7 +539,8 @@
    */
   static public void _writeJSInt(
     StringWriter sw,
-    Integer       value) throws IOException
+    Integer       value
+    ) throws IOException
   {
     sw.append(String.valueOf(value));
   }
@@ -548,7 +553,8 @@
    */
   static private void _writeJSBoolean(
     StringWriter sw,
-    Boolean      value) throws IOException
+    Boolean      value
+    ) throws IOException
   {
     sw.append(String.valueOf(value));
   }
@@ -562,7 +568,8 @@
    */
   static private void _writeJSDouble(
     StringWriter sw,
-    Double        value) throws IOException
+    Double       value
+    ) throws IOException
   {
     sw.append(String.valueOf(value));
   }
@@ -573,7 +580,10 @@
    * @param sw           the StringWriter
    * @param color        the color value
    */
-  static private void _writeJSColor(StringWriter sw, Color color) throws IOException
+  static private void _writeJSColor(
+    StringWriter sw,
+    Color        color
+    ) throws IOException
   {
     sw.append("\"RGB(");
     sw.append(String.valueOf(color.getRed()));
@@ -592,7 +602,8 @@
    */
   static private void _writeJSCollection(
     StringWriter  sw,
-    Collection<?> value) throws IOException
+    Collection<?> value
+    ) throws IOException
   {
     if (value == null)
     {
@@ -618,7 +629,9 @@
     }
   }
 
-  private static Object _getProperty(FacesBean bean, PropertyKey key)
+  private static Object _getProperty(
+    FacesBean   bean,
+    PropertyKey key)
   {
     Object ret = bean.getProperty(key);
     if (ret==null)
@@ -626,18 +639,21 @@
     return ret;
   }
 
-  protected String getType(FacesBean bean)
+  protected String getType(
+    FacesBean bean)
   {
     return toString(_getProperty(bean, _typeKey));
   }
 
-  protected String getTemplateSource(FacesBean bean)
+  protected String getTemplateSource(
+    UIComponent component,
+    FacesBean    bean)
   {
     Object ret = bean.getProperty(_templateSourceKey);
     String uri;
     if (ret==null)
     {
-      if(isGradientsUsed(bean))
+      if (isGradientsUsed(component, bean))
         uri = _TEMPLATE_DOC;
       else
         uri = _TEMPLATE_DOC_NOGRADIENT;
@@ -649,47 +665,65 @@
     return toResourceUri(FacesContext.getCurrentInstance(), uri);
   }
 
-  protected boolean isPerspective(FacesBean bean)
+  protected boolean isPerspective(
+    UIComponent component,
+    FacesBean   bean)
   {
     return Boolean.TRUE.equals(_getProperty(bean, _perspectiveKey));
   }
 
-  protected String getLegendPosition(FacesBean bean)
+  protected String getLegendPosition(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(_getProperty(bean, _legendPositionKey));
   }
 
-  protected Integer getAnimationDuration(FacesBean bean)
+  protected Integer getAnimationDuration(
+    UIComponent component,
+    FacesBean   bean)
   {
     return (Integer)_getProperty(bean, _animationDurationKey);
   }
 
-  protected boolean isGradientsUsed(FacesBean bean)
+  protected boolean isGradientsUsed(
+    UIComponent component,
+    FacesBean   bean)
   {
     return Boolean.TRUE.equals(_getProperty(bean, _gradientsUsedKey));
   }
 
-  protected boolean isTooltipsVisible(FacesBean bean)
+  protected boolean isTooltipsVisible(
+    UIComponent component,
+    FacesBean   bean)
   {
     return Boolean.TRUE.equals(_getProperty(bean, _tooltipsVisibleKey));
   }
 
-  protected Integer getYMajorGridLineCount(FacesBean bean)
+  protected Integer getYMajorGridLineCount(
+    UIComponent component,
+    FacesBean   bean)
   {
     return (Integer)_getProperty(bean, _YMajorGridLineCountKey);
   }
 
-  protected Integer getXMajorGridLineCount(FacesBean bean)
+  protected Integer getXMajorGridLineCount(
+    UIComponent component,
+    FacesBean   bean)
   {
     return (Integer)_getProperty(bean, _XMajorGridLineCountKey);
   }
 
-  protected Integer getYMinorGridLineCount(FacesBean bean)
+  protected Integer getYMinorGridLineCount(
+    UIComponent component,
+    FacesBean   bean)
   {
     return (Integer)_getProperty(bean, _YMinorGridLineCountKey);
   }
 
-  protected Integer getMaxPrecision(FacesBean bean)
+  protected Integer getMaxPrecision(
+    UIComponent component,
+    FacesBean   bean)
   {
     return (Integer)_getProperty(bean, _maxPrecisionKey);
   }