incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r427760 [2/4] - in /incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad: bean/ bean/util/ change/ component/ config/ context/ convert/ event/ logging/ model/ render/ resource/ util/ validator/ webapp/
Date Tue, 01 Aug 2006 22:00:48 GMT
Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java Tue Aug  1 15:00:44 2006
@@ -20,7 +20,6 @@
 import java.io.Serializable;
 import java.util.AbstractMap;
 import java.util.Collections;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -35,6 +34,7 @@
 import org.apache.myfaces.trinidad.event.SelectionEvent;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.model.CollectionModel;
+import org.apache.myfaces.trinidad.model.SortCriterion;
 
 /**
  * Base class for components that do stamping.
@@ -63,6 +63,7 @@
    * currency will be restored.
    * @param event a FacesEvent
    */
+  @Override
   public void queueEvent(FacesEvent event)
   {
     if (event.getSource() == this)
@@ -90,6 +91,7 @@
    * @param event a FacesEvent
    * @throws javax.faces.event.AbortProcessingException
    */
+  @Override
   public void broadcast(FacesEvent event)
     throws AbortProcessingException
   {
@@ -115,6 +117,7 @@
    * Decodes the children as many times as they are stamped.
    * @param context the FacesContext
    */
+  @Override
   public final void processDecodes(FacesContext context)
   {
     if (context == null)
@@ -146,16 +149,19 @@
     decodeChildren(context);
   }
 
+  @Override
   protected void decodeChildrenImpl(FacesContext context)
   {
     processFacetsAndChildren(context, PhaseId.APPLY_REQUEST_VALUES);
   }
 
+  @Override
   protected void validateChildrenImpl(FacesContext context)
   {
     processFacetsAndChildren(context, PhaseId.PROCESS_VALIDATIONS);
   }
 
+  @Override
   protected void updateChildrenImpl(FacesContext context)
   {
     processFacetsAndChildren(context, PhaseId.UPDATE_MODEL_VALUES);
@@ -175,6 +181,7 @@
     iState._stampState.clear(initKey);
   }
 
+  @Override
   public Object processSaveState(FacesContext context)
   {
     // If we saved state in the middle of processing a row,
@@ -199,13 +206,14 @@
     return savedState;
   }
 
+  @Override
   public Object saveState(FacesContext context)
   {
     // _stampState is stored as an instance variable, so it isn't
     // automatically saved
     Object superState = super.saveState(context);
     Object stampState;
-    ValueMap currencyCache;
+    ValueMap<Object> currencyCache;
 
     // becareful not to create the internal state too early:
     // otherwise, the internal state will be shared between
@@ -230,6 +238,8 @@
   }
 
 
+  @SuppressWarnings("unchecked")
+  @Override
   public void restoreState(FacesContext context, Object state)
   {
     final Object superState, stampState, currencyCache;
@@ -250,7 +260,7 @@
     {
       InternalState iState = _getInternalState(true);
       iState._stampState = (StampState) stampState;
-      iState._currencyCache = (ValueMap) currencyCache;
+      iState._currencyCache = (ValueMap<Object>) currencyCache;
     }
     else
     {
@@ -413,7 +423,7 @@
    * @see org.apache.myfaces.trinidad.model.SortCriterion
    * @see CollectionModel#setSortCriteria
    */
-  public void setSortCriteria(List criteria)
+  public void setSortCriteria(List<SortCriterion> criteria)
   {
     getCollectionModel().setSortCriteria(criteria);
   }
@@ -425,7 +435,7 @@
    * @see org.apache.myfaces.trinidad.model.SortCriterion
    * @see CollectionModel#getSortCriteria
    */
-  public final List getSortCriteria()
+  public final List<SortCriterion> getSortCriteria()
   {
     return getCollectionModel().getSortCriteria();
   }
@@ -433,6 +443,7 @@
   /**
    * Clears all the currency strings.
    */
+  @Override
   public final void encodeBegin(FacesContext context) throws IOException
   {
     _init();
@@ -447,6 +458,7 @@
     assert _assertKeyPreserved(assertKey) : "CurrencyKey not preserved";
   }
 
+  @Override
   public void encodeEnd(FacesContext context) throws IOException
   {
     Object assertKey = null;
@@ -510,7 +522,7 @@
   {
     assert rowKey != null;
 
-    ValueMap currencyCache = _getCurrencyCache();
+    ValueMap<Object> currencyCache = _getCurrencyCache();
     String key = (String) currencyCache.get(rowKey);
     if (key == null)
     {
@@ -548,7 +560,7 @@
     return ((key.length() > 0) && (!Character.isDigit(key.charAt(0))));
   }
 
-  private String _createToken(ValueMap currencyCache)
+  private String _createToken(ValueMap<Object> currencyCache)
   {
     String key = String.valueOf(currencyCache.size());
     return key;
@@ -619,6 +631,7 @@
    * @see #getCurrencyString
    * @return the local clientId
    */
+  @Override
   protected final String getLocalClientId()
   {
     String id = super.getLocalClientId();
@@ -691,7 +704,7 @@
       // varStatus yet:
       if ((iState._varStatus != null) && (iState._prevVarStatus == _NULL))
       {
-        Map varStatusMap = createVarStatusMap();
+        Map<String, Object> varStatusMap = createVarStatusMap();
         iState._prevVarStatus = _setELVar(iState._varStatus, varStatusMap);
       }
     }
@@ -704,7 +717,8 @@
    * This implementation simply returns the children of this component.
    * @return each element must be of type UIComponent.
    */
-  protected List getStamps()
+  @SuppressWarnings("unchecked")
+  protected List<UIComponent> getStamps()
   {
     return getChildren();
   }
@@ -731,6 +745,7 @@
    * @return this object must be Serializable if client-side state saving is
    * used.
    */
+  @SuppressWarnings("unchecked")
   protected Object saveStampState(FacesContext context, UIComponent stamp)
   {
     Object[] state = new Object[3];
@@ -743,14 +758,14 @@
     else
     {
       facetState = new Object[facetCount * 2];
-      Map facetMap = stamp.getFacets();
-      Iterator facets = facetMap.entrySet().iterator();
-      for (int i=0; facets.hasNext(); i++)
+      Map<String, UIComponent> facetMap = stamp.getFacets();
+      int i = 0;
+      for(Map.Entry<String, UIComponent> entry : facetMap.entrySet())
       {
-        Map.Entry entry = (Map.Entry) facets.next();
-        facetState[i * 2] = entry.getKey();
-        facetState[(i * 2) + 1] = saveStampState(context,
-                                                 (UIComponent) entry.getValue());
+        int base = i * 2;
+        facetState[base] = entry.getKey();
+        facetState[base + 1] = saveStampState(context, entry.getValue());
+        i++;
       }
     }
 
@@ -764,11 +779,11 @@
     }
     else
     {
-      List children = stamp.getChildren();
+      List<UIComponent> children = stamp.getChildren();
       childState = new Object[childCount];
       for(int i=0; i < childCount; i++)
       {
-        UIComponent child = (UIComponent) children.get(i);
+        UIComponent child = children.get(i);
         childState[i] = saveStampState(context, child);
       }
     }
@@ -784,6 +799,7 @@
    * to match the new currency.
    * This method recurses for the children and facets of the stamp.
    */
+  @SuppressWarnings("unchecked")
   protected void restoreStampState(FacesContext context, UIComponent stamp,
                                    Object stampState)
   {
@@ -797,12 +813,11 @@
       restoreStampState(context, stamp.getFacet(facetName), facetState[i + 1]);
     }
 
-    List children = stamp.getChildren();
+    List<UIComponent> children = stamp.getChildren();
     Object[] childState = (Object[]) state[2];
     for(int i=0; i<childState.length; i++)
     {
-      UIComponent child = (UIComponent) children.get(i);
-      restoreStampState(context, child, childState[i]);
+      restoreStampState(context, children.get(i), childState[i]);
     }
   }
 
@@ -911,10 +926,11 @@
    * <li>current - returns the current rowData
    * </ul>
    */
-  protected Map createVarStatusMap()
+  protected Map<String, Object> createVarStatusMap()
   {
-    return new AbstractMap()
+    return new AbstractMap<String, Object>()
     {
+      @Override
       public Object get(Object key)
       {
         // some of these keys are from <c:forEach>, ie:
@@ -930,7 +946,9 @@
         return null;
       }
 
-      public Set entrySet()
+      @SuppressWarnings("unchecked")
+      @Override
+      public Set<Map.Entry<String, Object>> entrySet()
       {
         return Collections.EMPTY_SET;
       }
@@ -1018,15 +1036,15 @@
    */
   private void _saveStampState()
   {
-    InternalState iState = _getInternalState(true);
+    // Never read and created by _getStampState
+    //InternalState iState = _getInternalState(true);
+    
     StampState stampState = _getStampState();
     FacesContext context = getFacesContext();
     Object currencyObj = getRowKey();
-    Iterator stamps = getStamps().iterator();
     int position = 0;
-    while(stamps.hasNext())
+    for(UIComponent stamp : getStamps())
     {
-      UIComponent stamp = (UIComponent) stamps.next();
       Object state = saveStampState(context, stamp);
 //      String stampId = stamp.getId();
       // TODO
@@ -1052,11 +1070,9 @@
     StampState stampState = _getStampState();
     FacesContext context = getFacesContext();
     Object currencyObj = getRowKey();
-    Iterator stamps = getStamps().iterator();
     int position = 0;
-    while(stamps.hasNext())
+    for(UIComponent stamp : getStamps())
     {
-      UIComponent stamp = (UIComponent) stamps.next();
 //      String stampId = stamp.getId();
       // TODO
       // temporarily use position. later we need to use ID's to access
@@ -1097,11 +1113,11 @@
     return iState._stampState;
   }
 
-  private ValueMap _getCurrencyCache()
+  private ValueMap<Object> _getCurrencyCache()
   {
     InternalState iState = _getInternalState(true);
     if (iState._currencyCache == null)
-      iState._currencyCache = new ValueMap();
+      iState._currencyCache = new ValueMap<Object>();
     return iState._currencyCache;
   }
 
@@ -1158,7 +1174,7 @@
     private transient Object _initialStampStateKey = _NULL;
 
     private StampState _stampState = null;
-    private ValueMap _currencyCache = null;
+    private ValueMap<Object> _currencyCache = null;
   }
 
   // do not assign a non-null value. values should be assigned lazily. this is

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java Tue Aug  1 15:00:44 2006
@@ -58,46 +58,119 @@
   
   // Everything below here is a UIComponent method
 
+  @SuppressWarnings("unchecked")
+  @Override
   public abstract Map getAttributes();
+  
+  @Override
 	public abstract ValueBinding getValueBinding(String name);
+  
+  @Override
   public abstract void setValueBinding(String name, ValueBinding binding);
+
+  @Override
   public abstract String getClientId(FacesContext context);
+
+  @Override
   public abstract String getFamily();
+
+  @Override
   public abstract String getId();
+
+  @Override
   public abstract void setId(String id);
+
+  @Override
   public abstract UIComponent getParent();
+
+  @Override
   public abstract void setParent(UIComponent parent);
+
+  @Override
   public abstract boolean isRendered();
+
+  @Override
   public abstract void setRendered(boolean rendered);
+
+  @Override
   public abstract String getRendererType();
+
+  @Override
   public abstract void setRendererType(String rendererType);
+
+  @Override
   public abstract boolean getRendersChildren();
+
+  @SuppressWarnings("unchecked")
+  @Override
   public abstract List getChildren();
+
+  @Override
   public abstract int getChildCount();
+
+  @Override
   public abstract UIComponent findComponent(String expr);
+
+  @SuppressWarnings("unchecked")
+  @Override
   public abstract Map getFacets();
+
+  @Override
   public abstract UIComponent getFacet(String name);
+
+  @SuppressWarnings("unchecked")
+  @Override
   public abstract Iterator getFacetsAndChildren();
+
+  @Override
   public abstract void broadcast(FacesEvent event)
       throws AbortProcessingException;
+
+  @Override
   public abstract void decode(FacesContext context);
+
+  @Override
   public abstract void encodeBegin(FacesContext context) throws IOException;
+
+  @Override
   public abstract void encodeChildren(FacesContext context) throws IOException;
+
+  @Override
   public abstract void encodeEnd(FacesContext context) throws IOException;
 
+  @Override
   protected abstract void addFacesListener(FacesListener listener);
+
+  @SuppressWarnings("unchecked")
+  @Override
   protected abstract FacesListener[] getFacesListeners(Class clazz);
+
+  @Override
   protected abstract void removeFacesListener(FacesListener listener);
 
+  @Override
   public abstract void queueEvent(FacesEvent event);
+
+  @Override
   public abstract void processRestoreState(FacesContext context,
                                            Object state);
+
+  @Override
   public abstract void processDecodes(FacesContext context);
+
+  @Override
   public abstract void processValidators(FacesContext context);
+
+  @Override
   public abstract void processUpdates(FacesContext context);
+
+  @Override
   public abstract Object processSaveState(FacesContext context);
 
+  @Override
   protected abstract FacesContext getFacesContext();
+
+  @Override
   protected abstract Renderer getRenderer(FacesContext context);
 
   public abstract Object saveState(FacesContext context);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java Tue Aug  1 15:00:44 2006
@@ -17,14 +17,12 @@
 
 
 import java.io.IOException;
-
 import java.net.URL;
-
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.NoSuchElementException;
 import java.util.Properties;
 
 import javax.faces.component.NamingContainer;
@@ -136,6 +134,7 @@
     return TYPE;
   }
 
+  @Override
   public FacesBean getFacesBean()
   {
     if (_facesBean == null)
@@ -145,27 +144,32 @@
   }
 
 
+  @Override
   public void addAttributeChangeListener(AttributeChangeListener acl)
   {
     addFacesListener(acl);
   }
 
+  @Override
   public void removeAttributeChangeListener(AttributeChangeListener acl)
   {
     removeFacesListener(acl);
   }
 
+  @Override
   public AttributeChangeListener[] getAttributeChangeListeners()
   {
     return (AttributeChangeListener[])
       getFacesListeners(AttributeChangeListener.class);
   }
 
+  @Override
   public void setAttributeChangeListener(MethodBinding mb)
   {
     setProperty(_ATTRIBUTE_CHANGE_LISTENER_KEY, mb);
   }
 
+  @Override
   public MethodBinding getAttributeChangeListener()
   {
     return (MethodBinding) getProperty(_ATTRIBUTE_CHANGE_LISTENER_KEY);
@@ -174,6 +178,7 @@
 
   /**
    */
+  @Override
   public ValueBinding getValueBinding(String name)
   {
     if (name == null)
@@ -191,6 +196,7 @@
   }
 
 
+  @Override
   public void setValueBinding(String name, ValueBinding binding)
   {
     if (name == null)
@@ -201,6 +207,8 @@
   }
 
 
+  @SuppressWarnings("unchecked")
+  @Override
   public Map getAttributes()
   {
     if (_attributes == null)
@@ -212,6 +220,7 @@
   // ------------------------------------------------------------- Properties
 
 
+  @Override
   public String getClientId(FacesContext context)
   {
     // NOTE - client ids cannot be cached because the generated
@@ -251,12 +260,14 @@
   }
 
 
+  @Override
   public String getId()
   {
     return (String) getProperty(ID_KEY);
   }
 
 
+  @Override
   public void setId(String id)
   {
     // =-=AEW Currently, setId() assumes that resetting to
@@ -268,9 +279,11 @@
 
 
 
+  @Override
   abstract public String getFamily();
 
 
+  @Override
   public UIComponent getParent()
   {
     return _parent;
@@ -284,34 +297,39 @@
    * @param parent The new parent, or <code>null</code> for the root node
    *  of a component tree
    */
+  @Override
   public void setParent(UIComponent parent)
   {
     _parent = parent;
   }
 
 
+  @Override
   public boolean isRendered()
   {
     return getBooleanProperty(RENDERED_KEY, true);
   }
 
 
+  @Override
   public void setRendered(boolean rendered)
   {
     setBooleanProperty(RENDERED_KEY, rendered);
   }
 
+  @Override
   public boolean isTransient()
   {
     return getBooleanProperty(TRANSIENT_KEY, false);
   }
 
+  @Override
   public void setTransient(boolean newTransient)
   {
     setBooleanProperty(TRANSIENT_KEY, newTransient);
   }
 
-
+  @Override
   public String getRendererType()
   {
     // Don't create the FacesBean just to get the renderer type;
@@ -324,7 +342,7 @@
     return (String) getProperty(RENDERER_TYPE_KEY);
   }
 
-
+  @Override
   public void setRendererType(String rendererType)
   {
     String oldRendererType = getRendererType();
@@ -347,6 +365,7 @@
   /**
    * @todo Pass through to Renderer
    */
+  @Override
   public boolean getRendersChildren()
   {
     Renderer renderer = getRenderer(getFacesContext());
@@ -366,6 +385,7 @@
   /**
    * @exception NullPointerException {@inheritDoc}
    */
+  @Override
   public UIComponent findComponent(String id)
   {
     if (id == null)
@@ -438,6 +458,8 @@
    * <p>Create (if necessary) and return a List of the children associated
    * with this component.</p>
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public List getChildren()
   {
     if (_children == null)
@@ -446,6 +468,7 @@
     return _children;
   }
 
+  @Override
   public int getChildCount()
   {
     if (_children == null)
@@ -458,6 +481,8 @@
    * <p>Create (if necessary) and return a Map of the facets associated
    * with this component.</p>
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public Map getFacets()
   {
 
@@ -468,7 +493,7 @@
   }
 
 
-
+  @Override
   public UIComponent getFacet(String facetName)
   {
     if (facetName == null)
@@ -486,10 +511,10 @@
    * no facets.  (Note that this is not part of the
    * UIComponent API.)
    */
-  public Iterator getFacetNames()
+  public Iterator<String> getFacetNames()
   {
     if (_facets == null)
-      return _EMPTY_ITERATOR;
+      return _EMPTY_STRING_ITERATOR;
     return _facets.keySet().iterator();
   }
 
@@ -497,13 +522,15 @@
   /**
    * @todo optimize to a compound iterator
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public Iterator getFacetsAndChildren()
   {
     // =-=AEW Is this supposed to be an immutable Iterator?
     if (_facets == null)
     {
       if (_children == null)
-        return _EMPTY_ITERATOR;
+        return _EMPTY_UICOMPONENT_ITERATOR;
 
       return _children.iterator();
     }
@@ -513,18 +540,19 @@
         return _facets.values().iterator();
     }
 
-    ArrayList childrenAndFacets = new ArrayList();
-    Iterator facetsItr = _facets.values().iterator();
-    while (facetsItr.hasNext())
-      childrenAndFacets.add(facetsItr.next());
-
-
-    Iterator kidsItr = _children.iterator();
-    while (kidsItr.hasNext())
-      childrenAndFacets.add(kidsItr.next());
+    ArrayList<UIComponent> childrenAndFacets = new ArrayList<UIComponent>();
+    for(UIComponent facet : _facets.values())
+    {
+      childrenAndFacets.add(facet);
+    }
+    
+    for(UIComponent child : _children)
+    {
+      childrenAndFacets.add(child);
+    }
 
-    if (childrenAndFacets.size() == 0 )
-      return _EMPTY_ITERATOR;
+    if (childrenAndFacets.isEmpty())
+      return _EMPTY_UICOMPONENT_ITERATOR;
 
     return childrenAndFacets.iterator();
   }
@@ -532,6 +560,7 @@
 
   // ------------------------------------------- Event processing methods
 
+  @Override
   public void broadcast(FacesEvent event)
     throws AbortProcessingException
   {
@@ -549,7 +578,7 @@
         adfContext.partialUpdateNotify(component);
     }
 
-    Iterator iter = getFacesBean().entries(_LISTENERS_KEY);
+    Iterator<Object> iter = getFacesBean().entries(_LISTENERS_KEY);
     while (iter.hasNext())
     {
       FacesListener listener = (FacesListener) iter.next();
@@ -569,13 +598,17 @@
   // ------------------------------------------- Lifecycle Processing Methods
 
 
+  @SuppressWarnings("unchecked")
+  @Override
   public void decode(FacesContext context)
   {
     if (context == null)
       throw new NullPointerException();
 
     // Find all the partialTriggers and save on the context
-    Map attrs = getAttributes();
+    // FIXME: -= Simon Lessard =-
+    //        JSF 1.2 specify <String, Object>
+    Map<Object, Object> attrs = getAttributes();
     Object triggers = attrs.get("partialTriggers");
     if (triggers instanceof String[])
     {
@@ -587,6 +620,7 @@
     __rendererDecode(context);
   }
 
+  @Override
   public void encodeBegin(FacesContext context) throws IOException
   {
     if (context == null)
@@ -604,6 +638,7 @@
     }
   }
 
+  @Override
   public void encodeChildren(FacesContext context) throws IOException
   {
     if (context == null)
@@ -620,6 +655,7 @@
     }
   }
 
+  @Override
   public void encodeEnd(FacesContext context) throws IOException
   {
     if (context == null)
@@ -642,6 +678,7 @@
    * is false, each child whose "rendered" property is true
    * will be sequentially rendered;  facets will be ignored.
    */
+  @Override
   public void encodeAll(FacesContext context) throws IOException
   {
     if (context == null)
@@ -657,6 +694,7 @@
    * @exception IllegalStateException {@inheritDoc}
    * @exception NullPointerException {@inheritDoc}
    */
+  @Override
   public void queueEvent(FacesEvent event)
   {
     if (event == null)
@@ -671,6 +709,7 @@
 
   // ----------------------------------------------- Lifecycle Phase Handlers
 
+  @Override
   public void processDecodes(FacesContext context)
   {
     if (context == null)
@@ -687,6 +726,7 @@
 
   }
 
+  @Override
   public void processValidators(FacesContext context)
   {
     if (context == null)
@@ -699,6 +739,7 @@
     validateChildren(context);
   }
 
+  @Override
   public void processUpdates(FacesContext context)
   {
     if (context == null)
@@ -711,6 +752,7 @@
     updateChildren(context);
   }
 
+  @Override
   public Object processSaveState(FacesContext context)
   {
     if (context == null)
@@ -742,6 +784,7 @@
    * @todo crashes and burns if there are fewer children or missing
    *  facets from when state was saved.
    */
+  @Override
   public void processRestoreState(FacesContext context, Object state)
   {
     if (context == null)
@@ -763,23 +806,29 @@
     }
   }
 
+  @Override
   public void markInitialState()
   {
-    _initialStateMarked = true;
+    // FIXME: -= Simon Lessard =-
+    //        Set to true, but never read
+    //_initialStateMarked = true;
     getFacesBean().markInitialState();
   }
 
+  @Override
   public Object saveState(FacesContext context)
   {
     return getFacesBean().saveState(context);
   }
 
+  @Override
   public void restoreState(FacesContext context, Object stateObj)
   {
     getFacesBean().restoreState(context, stateObj);
   }
 
 
+  @Override
   public String toString()
   {
     String className = getClass().getName();
@@ -793,6 +842,7 @@
   /**
    * <p>Return the {@link FacesContext} instance for the current request.</p>
    */
+  @Override
   protected FacesContext getFacesContext()
   {
     // If we ever have a way for a component to get notified
@@ -827,12 +877,13 @@
    * component.
    * @param context the current FacesContext
    */
+  @SuppressWarnings("unchecked")
   protected void decodeChildrenImpl(FacesContext context)
   {
-    Iterator kids = getFacetsAndChildren();
+    Iterator<UIComponent> kids = getFacetsAndChildren();
     while (kids.hasNext())
     {
-      UIComponent kid = (UIComponent) kids.next();
+      UIComponent kid = kids.next();
       kid.processDecodes(context);
     }
   }
@@ -863,13 +914,14 @@
    * component.
    * @param context the current FacesContext
    */
+  @SuppressWarnings("unchecked")
   protected void validateChildrenImpl(FacesContext context)
   {
     // Process all the facets and children of this component
-    Iterator kids = getFacetsAndChildren();
+    Iterator<UIComponent> kids = getFacetsAndChildren();
     while (kids.hasNext())
     {
-      UIComponent kid = (UIComponent) kids.next();
+      UIComponent kid = kids.next();
       kid.processValidators(context);
     }
   }
@@ -895,17 +947,19 @@
     }
   }
 
+  @SuppressWarnings("unchecked")
   protected void updateChildrenImpl(FacesContext context)
   {
     // Process all the facets and children of this component
-    Iterator kids = getFacetsAndChildren();
+    Iterator<UIComponent> kids = getFacetsAndChildren();
     while (kids.hasNext())
     {
-      UIComponent kid = (UIComponent) kids.next();
+      UIComponent kid = kids.next();
       kid.processUpdates(context);
     }
   }
 
+  @Override
   protected void addFacesListener(FacesListener listener)
   {
     if (listener == null)
@@ -914,6 +968,7 @@
     getFacesBean().addEntry(_LISTENERS_KEY, listener);
   }
 
+  @Override
   protected void removeFacesListener(FacesListener listener)
   {
     if (listener == null)
@@ -922,7 +977,8 @@
     getFacesBean().removeEntry(_LISTENERS_KEY, listener);
   }
 
-
+  @SuppressWarnings("unchecked")
+  @Override
   protected FacesListener[] getFacesListeners(Class clazz)
   {
     if (clazz == null)
@@ -1002,6 +1058,7 @@
     return null;
   }
 
+  @Override
   protected Renderer getRenderer(FacesContext context)
   {
     Renderer renderer = _cachedRenderer;
@@ -1073,6 +1130,7 @@
    * Return the number of facets.  This is more efficient than
    * calling getFacets().size();
    */
+  @Override
   public int getFacetCount()
   {
     if (_facets == null)
@@ -1111,6 +1169,7 @@
    * render a component. this is called by renderers whose
    * getRendersChildren() return true.
    */
+  @SuppressWarnings("unchecked")
   void __encodeRecursive(FacesContext context, UIComponent component)
     throws IOException
   {
@@ -1125,9 +1184,10 @@
       {
         if (component.getChildCount() > 0)
         {
-          Iterator children = component.getChildren().iterator();
-          while (children.hasNext())
-            __encodeRecursive(context, (UIComponent) children.next());
+          for(UIComponent child : (List<UIComponent>)component.getChildren())
+          {
+            __encodeRecursive(context, child);
+          }
         }
       }
 
@@ -1136,14 +1196,15 @@
   }
 
 
+  @SuppressWarnings("unchecked")
   static private UIComponent _findInsideOf(
     UIComponent from,
     String id)
   {
-    Iterator kids = from.getFacetsAndChildren();
+    Iterator<UIComponent> kids = from.getFacetsAndChildren();
     while (kids.hasNext())
     {
-      UIComponent kid = (UIComponent) kids.next();
+      UIComponent kid = kids.next();
       if (id.equals(kid.getId()))
         return kid;
 
@@ -1211,24 +1272,35 @@
     if (oldBean != null)
       _facesBean.addAll(oldBean);
 
+    // FIXME: -= Simon Lessard =- 
+    //        JSF 1.2 specify <String, Object>, but ValueMap
+    //        accept PropertyKey as key as well
     _attributes = new ValueMap(_facesBean);
   }
 
-  private FacesBean   _facesBean;
-  private List        _children;
-  private Map         _attributes;
-  private Map         _facets;
-  private UIComponent _parent;
+  private FacesBean                _facesBean;
+  private List<UIComponent>        _children;
+  // FIXME: -= Simon Lessard =- JSF 1.2 specify <String, Object>
+  private Map<Object, Object>      _attributes;
+  private Map<String, UIComponent> _facets;
+  private UIComponent              _parent;
 
   // Cached instance of the Renderer for this component.
   // The instance will be re-retrieved in encodeBegin()
   private transient Renderer _cachedRenderer = _UNDEFINED_RENDERER;
   private transient LifecycleRenderer _cachedLifecycleRenderer =
                                                 _UNDEFINED_LIFECYCLE_RENDERER;
-  private transient boolean _initialStateMarked;
+  
+  // FIXME: -= Simon Lessard =- 
+  //        _initialStateMarked is never read 
+  //        So commented out, is that ok? If so, this attribute should be deleted
+  //private transient boolean _initialStateMarked;
 
-  static private Iterator _EMPTY_ITERATOR =
-    Collections.EMPTY_LIST.iterator();
+  private static final Iterator<String> _EMPTY_STRING_ITERATOR =
+    new EmptyIterator<String>();
+
+  private static final Iterator<UIComponent> _EMPTY_UICOMPONENT_ITERATOR =
+    new EmptyIterator<UIComponent>();
 
   static private FacesBean.Type _createType()
   {
@@ -1268,6 +1340,25 @@
 
   static private class ExtendedRendererImpl extends ExtendedRenderer
   {
+  }
+  
+  private static class EmptyIterator<T> implements Iterator<T>
+  {
+    public boolean hasNext()
+    {
+      return false;
+    }
+
+    public T next()
+    {
+      throw new NoSuchElementException();
+    }
+
+    public void remove()
+    {
+      throw new UnsupportedOperationException();
+    }
+    
   }
 
   static private final LifecycleRenderer _UNDEFINED_LIFECYCLE_RENDERER =

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java Tue Aug  1 15:00:44 2006
@@ -34,7 +34,6 @@
  */
 abstract public class UIXHierarchy extends UIXCollection implements CollectionComponent
 {
-
   /**
    * Create a Page component with the given render-type
    */
@@ -49,6 +48,7 @@
     this(null);
   }
 
+  @Override
   public CollectionModel createCollectionModel(CollectionModel current, Object value)
   {
     TreeModel model = ModelUtils.toTreeModel(value);
@@ -168,7 +168,7 @@
    * Gets the all the rowKeys of the ancestors of the given child row.
    * @see TreeModel#getAllAncestorContainerRowKeys(Object)
    */
-  public List getAllAncestorContainerRowKeys(Object childRowKey)
+  public List<Object> getAllAncestorContainerRowKeys(Object childRowKey)
   {
     return getTreeModel().getAllAncestorContainerRowKeys(childRowKey);
   }
@@ -182,7 +182,9 @@
     return model;
   } 
   
-  protected List getStamps()
+  @SuppressWarnings("unchecked")
+  @Override
+  protected List<UIComponent> getStamps()
   {
     UIComponent nodeStamp = getFacet("nodeStamp");
     if (nodeStamp != null)

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXMenuHierarchy.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXMenuHierarchy.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXMenuHierarchy.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXMenuHierarchy.java Tue Aug  1 15:00:44 2006
@@ -15,10 +15,6 @@
  */
 package org.apache.myfaces.trinidad.component;
 
-import org.apache.myfaces.trinidad.model.CollectionModel;
-import org.apache.myfaces.trinidad.model.MenuModel;
-import org.apache.myfaces.trinidad.model.ModelUtils;
-
 
 /**
  * Base class for the Menu component.

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXNavigationHierarchy.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXNavigationHierarchy.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXNavigationHierarchy.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXNavigationHierarchy.java Tue Aug  1 15:00:44 2006
@@ -46,6 +46,7 @@
     this(null);
   }
 
+  @Override
   public CollectionModel createCollectionModel(CollectionModel current, Object value)
   {
     MenuModel model = ModelUtils.toMenuModel(value);
@@ -68,6 +69,7 @@
    * @see MenuModel#getFocusRowKey
    * @return the focus rowKey for the current viewId
    */
+  @Override
   public Object getFocusRowKey()
   {
     MenuModel model = getMenuModel();

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ValueMap.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ValueMap.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ValueMap.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ValueMap.java Tue Aug  1 15:00:44 2006
@@ -14,12 +14,12 @@
 * limitations under the License.
 */
 package org.apache.myfaces.trinidad.component;
+
 import java.io.Externalizable;
 
 import java.util.AbstractMap;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 import java.io.ObjectOutput;
@@ -34,7 +34,7 @@
  * 
  * @author The Oracle ADF Faces Team
  */
-final class ValueMap extends AbstractMap implements Externalizable 
+final class ValueMap<T> extends AbstractMap<T, T> implements Externalizable 
 {
   public ValueMap()
   {
@@ -44,7 +44,8 @@
   /**
    * Gets the value associated with the given key
    */
-  public Object get(Object key)
+  @Override
+  public T get(Object key)
   {
     return _cache.get(key);
   }
@@ -57,45 +58,48 @@
     return _valueMap.get(value);
   }
   
-  public Object put(Object key, Object value)
+  @Override
+  public T put(T key, T value)
   {
-    Object oldKey = _valueMap.put(value, key);
+    T oldKey = _valueMap.put(value, key);
     assert oldKey == null : "value:"+value+" is referenced by both key:"+key+
       " and key:"+oldKey;                          
 
-    Object old = _cache.put(key, value);
+    T old = _cache.put(key, value);
     assert old == null : "can't put the same key twice";
     return old;
   }
     
+  @Override
   public void clear()
   {
     _cache.clear();
     _valueMap.clear();
   }
   
+  @Override
   public int size()
   {
     return _cache.size();
   }
   
-  public Set entrySet()
+  @Override
+  public Set<Map.Entry<T, T>> entrySet()
   {
     return Collections.unmodifiableSet(_cache.entrySet());
   }
   
-  private static Map _setupValueMap(Map cache)
+  private static <T> Map<T, T> _setupValueMap(Map<T, T> cache)
   {
-    Map valueMap = new HashMap(cache.size());
-    Iterator entries = cache.entrySet().iterator();
-    while(entries.hasNext())
+    Map<T, T> valueMap = new HashMap<T, T>(cache.size());
+    for(Map.Entry<T, T> entry : cache.entrySet())
     {
-      Map.Entry entry = (Map.Entry) entries.next();
-      Object old = valueMap.put(entry.getValue(), entry.getKey());
+      T old = valueMap.put(entry.getValue(), entry.getKey());
       assert old == null : "the value:"+entry.getValue()+
                            " was bound to both key:"+old+
                            " and key:"+entry.getKey();
     }
+    
     return valueMap;
   }
   
@@ -104,14 +108,15 @@
     out.writeObject(_cache);
   }
 
+  @SuppressWarnings("unchecked")
   public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
   {
-    _cache = (Map) in.readObject();
+    _cache = (Map<T, T>) in.readObject();
     _valueMap = _setupValueMap(_cache);
   }
 
-  private Map _cache = new HashMap(13);
-  private transient Map _valueMap = new HashMap(13);
+  private Map<T, T> _cache = new HashMap<T, T>(13);
+  private transient Map<T, T> _valueMap = new HashMap<T, T>(13);
 
   //private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(InvertibleMap.class);
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/WrapperEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/WrapperEvent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/WrapperEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/WrapperEvent.java Tue Aug  1 15:00:44 2006
@@ -14,6 +14,7 @@
 * limitations under the License.
 */
 package org.apache.myfaces.trinidad.component;
+
 import javax.faces.component.UIComponent;
 import javax.faces.event.FacesEvent;
 import javax.faces.event.FacesListener;
@@ -35,22 +36,26 @@
     _event = wrappedEvent;
   }
 
+  @Override
   public PhaseId getPhaseId()
   {
     return _event.getPhaseId();
   }
 
+  @Override
   public void setPhaseId(PhaseId phaseId)
   {
     _event.setPhaseId(phaseId);
   }
 
+  @Override
   public void processListener(FacesListener listener)
   {
     // This event is never delivered to a listener
     throw new IllegalStateException();
   }
 
+  @Override
   public boolean isAppropriateListener(FacesListener listener)
   {
     // This event is never delivered to a listener

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/RegionManager.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/RegionManager.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/RegionManager.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/RegionManager.java Tue Aug  1 15:00:44 2006
@@ -36,7 +36,7 @@
    *  Each key is a regionType String.
    *  Each value is of type {@link RegionConfig}.
    */
-  public abstract Map getRegionConfigs();
+  public abstract Map<String, RegionConfig> getRegionConfigs();
   
   /**
    * Gets the RegionConfig for a particular regionType

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java Tue Aug  1 15:00:44 2006
@@ -163,5 +163,5 @@
    * <br><i>accessKeys</i>- returns a Boolean value signifying whether or not the Agent
    * supports accessKeys.
    */
-  public Map getCapabilities ();
+  public Map<String, Object> getCapabilities();
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/DialogService.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/DialogService.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/DialogService.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/DialogService.java Tue Aug  1 15:00:44 2006
@@ -119,10 +119,10 @@
    */
   public abstract void launchDialog(
     UIViewRoot  dialogRoot,
-    Map         dialogParameters,
+    Map<Object, Object> dialogParameters,
     UIComponent source,
     boolean     useWindow,
-    Map         windowProperties);
+    Map<Object, Object> windowProperties);
 
 
   /**
@@ -139,7 +139,7 @@
    *   displayed within the same window might be reached by the back button.
    */
   public abstract boolean returnFromDialog(Object returnValue,
-                                           Map returnParameters);
+                                           Map<Object, Object> returnParameters);
 
 
   /**
@@ -165,17 +165,17 @@
    */
   public abstract void queueReturnEvent(
     Object returnValue,
-    Map    returnParams);
+    Map<Object, Object> returnParams);
 
   //
   // OBSOLETE METHODS THAT WILL BE DELETED
   // 
   public abstract void pushPageFlowScope(boolean copyParent);
-  public abstract Map popPageFlowScope(boolean discardScope);
-  public abstract void restorePageFlowScope(Map pageFlowScope);
+  public abstract Map<String, Object> popPageFlowScope(boolean discardScope);
+  public abstract void restorePageFlowScope(Map<String, Object> pageFlowScope);
   public abstract boolean isPageFlowScopeInvalid();
   public abstract String getPageFlowScopeToken();
-  public abstract Map getPageFlowScope(String token);
+  public abstract Map<String, Object> getPageFlowScope(String token);
 
   private UIComponent _currentLaunchSource;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/PageFlowScopeProvider.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/PageFlowScopeProvider.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/PageFlowScopeProvider.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/PageFlowScopeProvider.java Tue Aug  1 15:00:44 2006
@@ -45,7 +45,7 @@
    * 
    * @param context the current FacesContext
    */
-  public abstract Map getPageFlowScope(FacesContext context); 
+  public abstract Map<String, Object> getPageFlowScope(FacesContext context); 
 
   /**
    * Pushes a new process scope onto the stack.
@@ -55,7 +55,7 @@
    *   scope will be copied into the new process scope.
    * @return the new scope
    */
-  public abstract Map pushPageFlowScope(
+  public abstract Map<String, Object> pushPageFlowScope(
     FacesContext context,
     boolean copyParent);
 
@@ -68,7 +68,7 @@
    *   example), but this is at the discretion of the implementation,
    *   which may aggressively destroy page flow scopes in some circumstances.
    */
-  public abstract Map popPageFlowScope(FacesContext context, boolean discardScope);
+  public abstract Map<String, Object> popPageFlowScope(FacesContext context, boolean discardScope);
 
   /**
    * Encode the page flow scope into the current URL for processing

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java Tue Aug  1 15:00:44 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.myfaces.trinidad.context;
 
+import java.awt.Color;
+import java.net.URL;
+import java.util.List;
 import java.util.Map;
 import java.util.TimeZone;
 
@@ -71,7 +74,7 @@
    */
   static public RequestContext getCurrentInstance()
   {
-    return (RequestContext) _CURRENT_CONTEXT.get();
+    return _CURRENT_CONTEXT.get();
   }
 
   
@@ -92,12 +95,13 @@
   /**
    * Returns a Map of objects at "pageFlow" scope.
    */
-  public abstract Map getPageFlowScope();
+  public abstract Map<String, Object> getPageFlowScope();
 
   /**
    * @deprecated use getPageFlowScope()
    */
-  final public Map getProcessScope()
+  @SuppressWarnings("dep-ann")
+  final public Map<String, Object> getProcessScope()
   {
     return getPageFlowScope();
   }
@@ -121,7 +125,7 @@
    */
   public abstract void returnFromDialog(
     Object returnValue,
-    Map    returnParameters);
+    Map<Object, Object> returnParameters);
 
 
   /**
@@ -155,10 +159,10 @@
    */
   public abstract void launchDialog(
     UIViewRoot  dialogRoot,
-    Map         dialogParameters,
+    Map<Object, Object> dialogParameters,
     UIComponent source,
     boolean     useWindow,
-    Map         windowProperties);
+    Map<Object, Object> windowProperties);
 
   //
   // General ADF Faces
@@ -282,13 +286,13 @@
    * Returns a Map that will accept topic names as keys, and return
    * an URL as a result.
    */
-  public abstract Map getHelpTopic();
+  public abstract Map<String, URL> getHelpTopic();
 
   /**
    * Returns a Map that will accept help system properties as keys, and return
    * an URL as a result.
    */
-  public abstract Map getHelpSystem();
+  public abstract Map<String, URL> getHelpSystem();
 
   //
   // Date formatting
@@ -356,7 +360,7 @@
    * Returns a Map that takes color palette names as keys, and returns
    * the color palette as a result.
    */
-  public abstract Map getColorPalette();
+  public abstract Map<String, List<Color>> getColorPalette();
 
   /**
    * Returns a Map that performs message formatting with a recursive Map
@@ -364,7 +368,7 @@
    * second the first parameter into the message. (The formatter Map supports
    * only a single parameter at this time.)
    */
-  public abstract Map getFormatter();
+  public abstract Map<Object, String> getFormatter();
 
   /**
    * Returns the Agent information for the current context
@@ -386,7 +390,8 @@
     if (o != this)
       throw new IllegalStateException("Trying to release a different " +
                      "RequestContext than the current context.");
-    _CURRENT_CONTEXT.set(null);
+    
+    _CURRENT_CONTEXT.remove();
   }
 
   /**
@@ -404,6 +409,7 @@
     _CURRENT_CONTEXT.set(this);
   }
 
-  static private final ThreadLocal _CURRENT_CONTEXT = new ThreadLocal();
+  static private final ThreadLocal<RequestContext> _CURRENT_CONTEXT = 
+    new ThreadLocal<RequestContext>();
   
-}
\ No newline at end of file
+}

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContextFactory.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContextFactory.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContextFactory.java Tue Aug  1 15:00:44 2006
@@ -16,6 +16,7 @@
 package org.apache.myfaces.trinidad.context;
 
 import java.util.HashMap;
+import java.util.Map;
 
 /**
  * Factory for creating RequestContext objects.
@@ -31,7 +32,7 @@
   {
     synchronized (_FACTORIES)
     {
-      return (RequestContextFactory) _FACTORIES.get(_getClassLoader());
+      return _FACTORIES.get(_getClassLoader());
     }
   }
 
@@ -66,5 +67,6 @@
     return Thread.currentThread().getContextClassLoader();
   }
 
-  static private final HashMap _FACTORIES = new HashMap();
+  static private final Map<ClassLoader, RequestContextFactory> _FACTORIES = 
+    new HashMap<ClassLoader, RequestContextFactory>();
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java Tue Aug  1 15:00:44 2006
@@ -334,6 +334,7 @@
    * @return true if and only if the specified Object is a ColorConverter
    * and if the values patterns, transparentAllowed and transient are equal.
    */
+  @Override
   public boolean equals(Object obj)
   {
     if ( null == obj)
@@ -359,6 +360,7 @@
    * <p>Returns the hash code for this converter.</p>
    * @return a hash code value for this object.
    */
+  @Override
   public int hashCode()
   {
     int result = 17;
@@ -534,6 +536,11 @@
     return patterns[0];
   }
 
+  private Object _getRawConvertMessageDetail()
+  {
+    return _facesBean.getRawProperty(_CONVERT_MESSAGE_DETAIL_KEY);
+  }
+
   private boolean _isEqualPatterns(String[] patterns)
   {
     String[]  thisPattern = getPatterns();
@@ -560,7 +567,7 @@
     String[]       patternsArray
     )
   {
-    String noMatchMsgDet = getConvertMessageDetail();
+    Object noMatchMsgDet = _getRawConvertMessageDetail();
 
     Object label = ConverterUtils.getComponentLabel(component);
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorFormat.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorFormat.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorFormat.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorFormat.java Tue Aug  1 15:00:44 2006
@@ -56,6 +56,7 @@
    *
    * @exception ParseException if the specified string is invalid.
    */
+  @Override
   public Object parseObject(
     String source) throws ParseException 
   {
@@ -75,6 +76,7 @@
   /**
    * Returns the value as a Color.
    */
+  @Override
   abstract public Object parseObject(
     String        source, 
     ParsePosition status);
@@ -92,6 +94,7 @@
     return format(color, new StringBuffer(),new FieldPosition(0)).toString();
   }
 
+  @Override
   public final StringBuffer format(
     Object obj, 
     StringBuffer toAppendTo,

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ConverterUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ConverterUtils.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ConverterUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ConverterUtils.java Tue Aug  1 15:00:44 2006
@@ -45,6 +45,7 @@
  {
    FacesBeanImpl bean = new FacesBeanImpl()
                            {
+                             @Override
                              public FacesBean.Type getType()
                              {
                                return type;

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java Tue Aug  1 15:00:44 2006
@@ -282,6 +282,7 @@
    * type other than {@link java.util.Date}, {@link java.lang.String}. The
    * <code>value</code> can be null.
    */
+  @Override
   public Object getAsObject(
     FacesContext context,
     UIComponent component,
@@ -313,6 +314,7 @@
    * @exception NullPointerException if <code>context</code> or
    *  <code>component</code> is <code>null</code>
    */
+  @Override
   public String getAsString(
     FacesContext context,
     UIComponent component,
@@ -678,6 +680,7 @@
    *
    * @param locale The new <code>Locale</code> (or <code>null</code>)
    */
+  @Override
   public void setLocale(Locale locale)
   {
     _facesBean.setProperty(_LOCALE_KEY, locale);
@@ -690,6 +693,7 @@
   * request is used during call to <code>getAsObject</code> and
   * <code>getAsString</code>.</p>
   */
+  @Override
   public Locale getLocale()
   {
     Object locale = _facesBean.getProperty(_LOCALE_KEY);
@@ -705,15 +709,17 @@
    *
    * @param pattern The new format pattern
    */
-    public void setPattern(String pattern)
-    {
-      _facesBean.setProperty(_PATTERN_KEY, pattern);
-    }
+  @Override
+  public void setPattern(String pattern)
+  {
+    _facesBean.setProperty(_PATTERN_KEY, pattern);
+  }
 
   /**
    * <p>Return the format pattern to be used when formatting and
    * parsing dates and times.</p>
    */
+  @Override
   public String getPattern()
   {
     Object pattern = _facesBean.getProperty(_PATTERN_KEY);
@@ -725,6 +731,7 @@
    *
    * @param timeZone The new time zone
    */
+  @Override
   public void setTimeZone(TimeZone timeZone)
   {
     _facesBean.setProperty(_TIME_ZONE_KEY, timeZone);
@@ -737,6 +744,7 @@
   * for the web-app is used. If time zone is not set for the web-app then
   * the default time zone of <code>GMT</code> is used.</p>
   */
+  @Override
   public TimeZone getTimeZone()
   {
     Object timeZone = _facesBean.getProperty(_TIME_ZONE_KEY);
@@ -752,6 +760,7 @@
   *
   * @param type The new date style
   */
+  @Override
   public void setType(String type)
   {
     _facesBean.setProperty(_TYPE_KEY, type);
@@ -762,6 +771,7 @@
    * If not explicitly set, the default type, <code>date</code>
    * is returned.</p>
    */
+  @Override
   public String getType()
   {
     Object type = _facesBean.getProperty(_TYPE_KEY);
@@ -778,6 +788,7 @@
    *
    * @param dateStyle The new style code
    */
+  @Override
   public void setDateStyle(String dateStyle)
   {
     _facesBean.setProperty(_DATE_STYLE_KEY, dateStyle);
@@ -789,6 +800,7 @@
    * @see #setDateStyle(java.lang.String)
    * @return date style
    */
+  @Override
   public String getDateStyle()
   {
     Object dateStyle = _facesBean.getProperty(_DATE_STYLE_KEY);
@@ -804,6 +816,7 @@
    *
    * @param timeStyle The new style code
    */
+  @Override
   public void setTimeStyle(String timeStyle)
   {
     _facesBean.setProperty(_TIME_STYLE_KEY, timeStyle);
@@ -813,6 +826,7 @@
    * <p>Return the style to be used to format or parse times.  If not set,
    * the default value, <code>short</code>, is returned.</p>
    */
+  @Override
   public String getTimeStyle()
   {
     Object timeStyle = _facesBean.getProperty(_TIME_STYLE_KEY);
@@ -842,21 +856,25 @@
     return ComponentUtils.resolveString(secPattern);
   }
 
+  @Override
   public boolean isTransient()
   {
     return _isTransient;
   }
 
+  @Override
   public void setTransient(boolean isTransient)
   {
     _isTransient = isTransient;
   }
 
+  @Override
   public Object saveState(FacesContext context)
   {
     return _facesBean.saveState(context);
   }
 
+  @Override
   public void restoreState(FacesContext context, Object state)
   {
     _facesBean.restoreState(context, state);
@@ -905,6 +923,7 @@
    * @return true if and only if the specified Object is a DateTimeConverter
    * and if all parameters are equal.
    */
+  @Override
   public boolean equals(Object object)
   {
     if (this == object)
@@ -940,6 +959,7 @@
    * <p>Returns the hash code for this Converter.</p>
    * @return a hash code value for this object.
    */
+  @Override
   public int hashCode()
   {
     int result = 17;
@@ -1174,7 +1194,7 @@
     // 03/Oct/99 --> 03-Oct-99
     // 03.Oct.99 --> 03-Oct-99
 
-    Set patterns = new HashSet();
+    Set<String> patterns = new HashSet<String>();
 
     String[] leniencyApplicablePatterns = new String[1];
     leniencyApplicablePatterns[0] = pattern;
@@ -1213,7 +1233,7 @@
         patterns.add(leniencyApplicablePatterns[i].replaceAll("\\.", "-"));
       }
     }
-    return (String[]) patterns.toArray(_EMTPTY_ARRAY);
+    return patterns.toArray(_EMTPTY_ARRAY);
   }
 
   private Object[] _getPlaceHolderParameters(
@@ -1227,6 +1247,21 @@
      return params;
   }
 
+  private Object _getRawConvertBothMessageDetail()
+  {
+    return _facesBean.getRawProperty(_CONVERT_BOTH_MESSAGE_DETAIL_KEY);
+  }
+
+  private Object _getRawConvertDateMessageDetail()
+  {
+    return _facesBean.getRawProperty(_CONVERT_DATE_MESSAGE_DETAIL_KEY);
+  }
+
+  private Object _getRawConvertTimeMessageDetail()
+  {
+    return _facesBean.getRawProperty(_CONVERT_TIME_MESSAGE_DETAIL_KEY);
+  }
+
   private FacesMessage _getConvertErrorFacesMessage(
     FacesContext context,
     String key,
@@ -1234,18 +1269,18 @@
     UIComponent component
     )
   {
-    String msgPattern = null;
+    Object msgPattern;
     if (key == CONVERT_DATE_MESSAGE_ID)
     {
-      msgPattern = getConvertDateMessageDetail();
+      msgPattern = _getRawConvertDateMessageDetail();
     }
     else if (key == CONVERT_TIME_MESSAGE_ID)
     {
-      msgPattern = getConvertTimeMessageDetail();
+      msgPattern = _getRawConvertTimeMessageDetail();
     }
     else if (key == CONVERT_BOTH_MESSAGE_ID)
     {
-      msgPattern = getConvertBothMessageDetail();
+      msgPattern = _getRawConvertBothMessageDetail();
     }
     else
     {

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java Tue Aug  1 15:00:44 2006
@@ -187,6 +187,7 @@
    * @exception ConverterException {@inheritDoc}
    *
    */
+  @Override
   public Object getAsObject(
     FacesContext context,
     UIComponent component,
@@ -261,6 +262,7 @@
    *            type other than {@link java.lang.Number}, {@link java.lang.String}.
    *            <code>value</code> can be null.
    */
+  @Override
   public String getAsString(
     FacesContext context,
     UIComponent component,
@@ -305,6 +307,7 @@
     return formatter.format(value);
   }
 
+  @Override
   public void restoreState(
     FacesContext context,
     Object state)
@@ -312,6 +315,7 @@
     _facesBean.restoreState(context, state);
   }
 
+  @Override
   public Object saveState(FacesContext context)
   {
     return _facesBean.saveState(context);
@@ -457,45 +461,53 @@
     return ComponentUtils.resolveString(msg);
   }
 
+  @Override
   public void setCurrencyCode(String currencyCode)
   {
     _facesBean.setProperty(_CURRENCY_CODE_KEY, currencyCode);
   }
 
+  @Override
   public String getCurrencyCode()
   {
     Object currCode = _facesBean.getProperty(_CURRENCY_CODE_KEY);
     return ComponentUtils.resolveString(currCode);
   }
 
+  @Override
   public void setCurrencySymbol(String currencySymbol)
   {
     _facesBean.setProperty(_CURRENCY_SYMBOL_KEY, currencySymbol);
   }
 
+  @Override
   public String getCurrencySymbol()
   {
     Object currSymbol = _facesBean.getProperty(_CURRENCY_SYMBOL_KEY);
     return ComponentUtils.resolveString(currSymbol);
   }
 
+  @Override
   public void setGroupingUsed(boolean groupingUsed)
   {
     Boolean grpUsed = _getBooleanValue(groupingUsed);
     _facesBean.setProperty(_GROUPING_USED_KEY, grpUsed);
   }
 
+  @Override
   public  boolean isGroupingUsed()
   {
     Object grpUSed = _facesBean.getProperty(_GROUPING_USED_KEY);
     return ComponentUtils.resolveBoolean(grpUSed);
   }
 
+  @Override
   public void setIntegerOnly(boolean integerOnly)
   {
     _facesBean.setProperty(_INTEGER_ONLY_KEY, _getBooleanValue(integerOnly));
   }
 
+  @Override
   public boolean isIntegerOnly()
   {
     Object isInt = _facesBean.getProperty(_INTEGER_ONLY_KEY);
@@ -510,6 +522,7 @@
    *
    * @param locale The new <code>Locale</code> (or <code>null</code>)
    */
+  @Override
   public void setLocale(Locale locale)
   {
     _facesBean.setProperty(_LOCALE_KEY, locale);
@@ -522,6 +535,7 @@
    * in the {@link javax.faces.component.UIViewRoot} for the current request
    * will be utilized during parsing.</p>
    */
+  @Override
   public Locale getLocale()
   {
     Object locale = _facesBean.getProperty(_LOCALE_KEY);
@@ -531,66 +545,78 @@
   // All these overrides are mainly to identify whether these were set or nor in
   // the first place
 
+  @Override
   public void setMaxFractionDigits(int maxFractionDigits)
   {
     _facesBean.setProperty(_MAX_FRACTION_DIGITS_KEY, _getIntValue(maxFractionDigits));
   }
 
+  @Override
   public int getMaxFractionDigits()
   {
     Object value = _facesBean.getProperty(_MAX_FRACTION_DIGITS_KEY);
     return ComponentUtils.resolveInteger(value);
   }
 
+  @Override
   public void setMaxIntegerDigits(int maxIntegerDigits)
   {
     _facesBean.setProperty(_MAX_INTEGER_DIGITS_KEY, _getIntValue(maxIntegerDigits));
   }
 
+  @Override
   public int getMaxIntegerDigits()
   {
     Object value = _facesBean.getProperty(_MAX_INTEGER_DIGITS_KEY);
     return ComponentUtils.resolveInteger(value);
   }
 
+  @Override
   public void setMinFractionDigits(int minFractionDigits)
   {
     _facesBean.setProperty(_MIN_FRACTION_DIGITS_KEY, _getIntValue(minFractionDigits));
   }
 
+  @Override
   public int getMinFractionDigits()
   {
     Object value = _facesBean.getProperty(_MIN_FRACTION_DIGITS_KEY);
     return ComponentUtils.resolveInteger(value);
   }
 
+  @Override
   public void setMinIntegerDigits(int minIntegerDigits)
   {
     _facesBean.setProperty(_MIN_INTEGER_DIGITS_KEY, _getIntValue(minIntegerDigits));
   }
 
+  @Override
   public int getMinIntegerDigits()
   {
     Object value = _facesBean.getProperty(_MIN_INTEGER_DIGITS_KEY);
     return ComponentUtils.resolveInteger(value);
   }
 
+  @Override
   public void setPattern(String pattern)
   {
     _facesBean.setProperty(_PATTERN_KEY, pattern);
   }
 
+  @Override
   public String getPattern()
   {
     Object pattern = _facesBean.getProperty(_PATTERN_KEY);
     return ComponentUtils.resolveString(pattern);
   }
 
+  @Override
   public void setType(String type)
   {
     _facesBean.setProperty(_TYPE_KEY, type);
   }
 
+  @Override
   public String getType()
   {
     Object type = _facesBean.getProperty(_TYPE_KEY);
@@ -600,6 +626,7 @@
   /**
    * Returns the hash code for this Converter.
    */
+  @Override
   public int hashCode()
   {
     int result = 17;
@@ -625,6 +652,7 @@
   /**
    * <p>Compares this NumberConverter with the specified Object for equality.</p>
    */
+  @Override
   public boolean equals(Object numberConverter)
   {
     if (this == numberConverter)
@@ -688,11 +716,15 @@
   {
     synchronized(_SYMBOLS_LOCK)
     {
+      // -= Simon Lessard =- That if looks paranoid, the map get instanciated 
+      //                     during static initialization and is never set to 
+      //                     null
        if (_patternFormatSymbolsHolder == null)
-        _patternFormatSymbolsHolder = new HashMap();
+        _patternFormatSymbolsHolder = new HashMap<Locale, DecimalFormatSymbols>();
        else
        // to clone here or at the point of creation??
-      _patternFormatSymbolsHolder.put(locale, symbols.clone());
+      // FIXME: Is that line really supposed to go in the else????
+      _patternFormatSymbolsHolder.put(locale, (DecimalFormatSymbols)symbols.clone());
     }
   }
 
@@ -716,15 +748,15 @@
       // get the map for the appropriate type('number','currency', 'percent') or
       // based on diff patterns - pattern1.. pattern2 for diff locales.
       String key = ((pattern != null) ? pattern : type);
-      Map nfMap = (Map)_numberFormatHolder.get(key);
+      Map<Locale, NumberFormat> nfMap = _numberFormatHolder.get(key);
 
       if (nfMap == null)
         return null;
       else
       {
-        Object nf = nfMap.get(locale);
+        NumberFormat nf = nfMap.get(locale);
         if (nf != null)
-          return (NumberFormat) ((NumberFormat) nf).clone();
+          return (NumberFormat) nf.clone();
       }
       return null;
     }
@@ -738,8 +770,11 @@
   {
     synchronized(_TYPE_LOCK)
     {
+      // -= Simon Lessard =- That if looks paranoid, the map get instanciated 
+      //                     during static initialization and is never set to 
+      //                     null
       if (_numberFormatHolder == null)
-      _numberFormatHolder = new HashMap();
+        _numberFormatHolder = new HashMap<String, Map<Locale, NumberFormat>>();
 
       else
       {
@@ -747,14 +782,14 @@
         // stored or it can be based on the pattern also.
         String key = ((pattern != null) ? pattern : type);
 
-        Map nfMap = (Map) _numberFormatHolder.get(key);
+        Map<Locale, NumberFormat> nfMap = _numberFormatHolder.get(key);
 
         // if we have not cached any NumberFormat for this type, then create a
         // map for that type and add to it based on the locale
         if (nfMap == null)
         {
-          nfMap = new HashMap();
-          nfMap.put(locale, format.clone());
+          nfMap = new HashMap<Locale, NumberFormat>();
+          nfMap.put(locale, (NumberFormat)format.clone());
         }
         // add this based on the type ('number','currency','percent') or
         // pattern1, pattern2.. patternN to the main holder
@@ -931,6 +966,26 @@
     return nfmt;
   }
 
+  private Object _getRawConvertCurrencyMessageDetail()
+  {
+    return _facesBean.getRawProperty(_CONVERT_CURRENCY_MESSAGE_DETAIL_KEY);
+  }
+
+  private Object _getRawConvertNumberMessageDetail()
+  {
+    return _facesBean.getRawProperty(_CONVERT_NUMBER_MESSAGE_DETAIL_KEY);
+  }
+
+  private Object _getRawConvertPatternMessageDetail()
+  {
+    return _facesBean.getRawProperty(_CONVERT_PATTERN_MESSAGE_DETAIL_KEY);
+  }
+
+  private Object _getRawConvertPercentMessageDetail()
+  {
+    return _facesBean.getRawProperty(_CONVERT_PERCENT_MESSAGE_DETAIL_KEY);
+  }
+
   protected final FacesMessage getConvertMessage(
     FacesContext context,
     UIComponent component,
@@ -939,41 +994,40 @@
     )
   {
     int type = _getType(getPattern(), getType());
+    Object convMsgDet;
+    String msgId;
 
     // Always check for pattern first.
     if (_PATTERN_TYPE == type)
     {
-      String convPatMsgDet = getConvertPatternMessageDetail();
-      return MessageFactory.getMessage(context, CONVERT_PATTERN_MESSAGE_ID,
-                                       convPatMsgDet, params, component);
+      convMsgDet = _getRawConvertPatternMessageDetail();
+      msgId = CONVERT_PATTERN_MESSAGE_ID;
     }
     else if(_NUMBER_TYPE == type)
     {
-      String convNumMsgDet = getConvertNumberMessageDetail();
-      FacesMessage msg = MessageFactory.getMessage(context,
-                                                   CONVERT_NUMBER_MESSAGE_ID,
-                                                   convNumMsgDet,
-                                                   params,
-                                                   component);
-      return msg;
-
+      convMsgDet = _getRawConvertNumberMessageDetail();
+      msgId = CONVERT_NUMBER_MESSAGE_ID;
     }
     else if(_CURRENCY_TYPE == type)
     {
-      String convCurMsgDet = getConvertCurrencyMessageDetail();
-      return MessageFactory.getMessage(context, CONVERT_CURRENCY_MESSAGE_ID,
-                                       convCurMsgDet, params, component);
+      convMsgDet = _getRawConvertCurrencyMessageDetail();
+      msgId = CONVERT_CURRENCY_MESSAGE_ID;
     }
     else if(_PERCENT_TYPE == type)
     {
-      String convPercMsgDet = getConvertPercentMessageDetail();
-      return MessageFactory.getMessage(context, CONVERT_PERCENT_MESSAGE_ID,
-                                       convPercMsgDet, params, component);
+      convMsgDet = _getRawConvertPercentMessageDetail();
+      msgId = CONVERT_PERCENT_MESSAGE_ID;
     }
     else
     {
       throw new IllegalArgumentException("Invalid type: " + getType());
     }
+    
+    return MessageFactory.getMessage(context, 
+                                     msgId, 
+                                     convMsgDet, 
+                                     params, 
+                                     component);
   }
 
   private Locale _getLocale(FacesContext context)
@@ -1011,7 +1065,10 @@
     NumberFormat numberFormatter
    )
   {
-    if (numberFormatter instanceof NumberFormat)
+    // Useless if... should be instanceof DecimalFormat
+    // Potential ClassCastException before the change
+    //if (numberFormatter instanceof NumberFormat)
+    if (numberFormatter instanceof DecimalFormat)
     {
       DecimalFormat dfmt = (DecimalFormat)numberFormatter;
       DecimalFormatSymbols symbols = dfmt.getDecimalFormatSymbols();
@@ -1122,14 +1179,16 @@
   // hold a Map as its value.
   // This Map (value part of the type) will hold locale as its key and Number
   // formats as its values.
-  private static Map _numberFormatHolder = new HashMap();
+  private static Map<String, Map<Locale, NumberFormat>> _numberFormatHolder = 
+    new HashMap<String, Map<Locale, NumberFormat>>();
 
   // This is map to hold DecimalFormatSymbols when the converter is used,
   // by specifying a pattern. When a pattern is specified we take care of
   // creating the DecimalFormatSymbols. We are caching decimal format symbols
   // based on the locale so that we can make use of it, when a new number
   // converters is instantiated and used based on pattern and not by type.
-  private static Map _patternFormatSymbolsHolder = new HashMap();
+  private static Map<Locale, DecimalFormatSymbols> _patternFormatSymbolsHolder = 
+    new HashMap<Locale, DecimalFormatSymbols>();
 
   private static final Object _TYPE_LOCK = new Object();
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/RGBColorFormat.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/RGBColorFormat.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/RGBColorFormat.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/RGBColorFormat.java Tue Aug  1 15:00:44 2006
@@ -82,6 +82,7 @@
   /**
    * Returns the value as a Color.
    */
+  @Override
   public Object parseObject(
     String        text,
     ParsePosition pos)
@@ -270,6 +271,7 @@
 
   }
 
+  @Override
   public StringBuffer format(
     Color color,
     StringBuffer toAppendTo,

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/AttributeChangeEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/AttributeChangeEvent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/AttributeChangeEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/AttributeChangeEvent.java Tue Aug  1 15:00:44 2006
@@ -70,16 +70,19 @@
     return _newValue;
   }
 
+  @Override
   public void processListener(FacesListener listener)
   {
     ((AttributeChangeListener) listener).processAttributeChange(this);
   }
 
+  @Override
   public boolean isAppropriateListener(FacesListener listener)
   {
     return (listener instanceof AttributeChangeListener);
   }
   
+  @Override
   public String toString()
   {
     StringBuffer sb = new StringBuffer();

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/DisclosureEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/DisclosureEvent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/DisclosureEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/DisclosureEvent.java Tue Aug  1 15:00:44 2006
@@ -41,16 +41,19 @@
     return _expanded;
   }
 
+  @Override
   public void processListener(FacesListener listener)
   {
     ((DisclosureListener) listener).processDisclosure(this);
   }
 
+  @Override
   public boolean isAppropriateListener(FacesListener listener)
   {
     return (listener instanceof DisclosureListener);
   }
   
+  @Override
   public int hashCode()
   {
     int expandedHC = (_expanded ? Boolean.TRUE.hashCode() 
@@ -60,8 +63,8 @@
            (getComponent().hashCode());
   }
   
-  public boolean equals(
-   Object o)
+  @Override
+  public boolean equals(Object o)
   {
     if (o instanceof DisclosureEvent)
     {
@@ -74,6 +77,7 @@
     return false;
   }
 
+  @Override
   public String toString()
   {
     StringBuffer sb = new StringBuffer();

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/FocusEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/FocusEvent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/FocusEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/FocusEvent.java Tue Aug  1 15:00:44 2006
@@ -38,27 +38,27 @@
   {
     super(source);
   }
-
-
-
+  
+  @Override
   public void processListener(FacesListener listener)
   {
     ((FocusListener) listener).processFocus(this);
   }
 
+  @Override
   public boolean isAppropriateListener(FacesListener listener)
   {
     return (listener instanceof FocusListener);
   }
 
-
+  @Override
   public int hashCode()
   {
     return (getComponent() == null) ? 0 : getComponent().hashCode();
   }
 
-  public boolean equals(
-   Object o)
+  @Override
+  public boolean equals(Object o)
   {
     if (o instanceof FocusEvent)
     {
@@ -69,6 +69,7 @@
     return false;
   }
 
+  @Override
   public String toString()
   {
     StringBuffer sb = new StringBuffer();

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/LaunchEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/LaunchEvent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/LaunchEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/LaunchEvent.java Tue Aug  1 15:00:44 2006
@@ -52,8 +52,8 @@
   {
     super(source);
     _viewRoot = viewRoot;
-    _dialogParameters = new HashMap();
-    _windowProperties  = new HashMap();
+    _dialogParameters = new HashMap<Object, Object>();
+    _windowProperties  = new HashMap<Object, Object>();
 
     // LaunchEvents should always be queued for the current phase
     setPhaseId(PhaseId.ANY_PHASE);
@@ -84,7 +84,7 @@
    * A map of parameters to pass to the dialog.  All entries
    * in the map will be added to the pageFlowScope.
    */
-  public Map getDialogParameters()
+  public Map<Object, Object> getDialogParameters()
   {
     return _dialogParameters;
   }
@@ -96,23 +96,24 @@
    * The map will be ignored if a dialog is not used.
    * =-=AEW getWindowProperties or getDialogProperties or ??
    */
-  public Map getWindowProperties()
+  public Map<Object, Object> getWindowProperties()
   {
     return _windowProperties;
   }
 
-
+  @Override
   public void processListener(FacesListener listener)
   {
     ((LaunchListener) listener).processLaunch(this);
   }
 
+  @Override
   public boolean isAppropriateListener(FacesListener listener)
   {
     return (listener instanceof LaunchListener);
   }
 
-
+  @Override
   public int hashCode()
   {
     int result = (getComponent() == null) ? 0 : getComponent().hashCode();
@@ -122,8 +123,8 @@
     return result;
   }
 
-  public boolean equals(
-   Object o)
+  @Override
+  public boolean equals(Object o)
   {
     if (o == this)
       return true;
@@ -157,6 +158,7 @@
     return false;
   }
 
+  @Override
   public String toString()
   {
     StringBuffer sb = new StringBuffer();
@@ -173,7 +175,7 @@
     return sb.toString();
   }
 
-  private UIViewRoot _viewRoot;
-  private Map        _dialogParameters;
-  private Map        _windowProperties;
+  private UIViewRoot          _viewRoot;
+  private Map<Object, Object> _dialogParameters;
+  private Map<Object, Object> _windowProperties;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/PollEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/PollEvent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/PollEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/PollEvent.java Tue Aug  1 15:00:44 2006
@@ -33,16 +33,19 @@
     super(source);
   }
 
+  @Override
   public void processListener(FacesListener listener)
   {
     ((PollListener) listener).processPoll(this);
   }
 
+  @Override
   public boolean isAppropriateListener(FacesListener listener)
   {
     return (listener instanceof PollListener);
   }
 
+  @Override
   public int hashCode()
   {
     //A simple implementation to differentiate based on component that
@@ -50,8 +53,8 @@
     return (getComponent() == null) ? 0 : getComponent().hashCode();
   }
 
-  public boolean equals(
-   Object o)
+  @Override
+  public boolean equals(Object o)
   {
     if (o instanceof PollEvent)
     {
@@ -62,6 +65,7 @@
     return false;
   }
 
+  @Override
   public String toString()
   {
     StringBuffer sb = new StringBuffer();

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RangeChangeEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RangeChangeEvent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RangeChangeEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RangeChangeEvent.java Tue Aug  1 15:00:44 2006
@@ -31,7 +31,6 @@
  */
 public class RangeChangeEvent extends FacesEvent
 {
-
   /**
    * Construct a new event object from the specified source component, 
    * old start (inclusive), old end (exclusive), new start (inclusive)
@@ -96,16 +95,19 @@
     return _newEnd;
   }
    
+  @Override
   public void processListener(FacesListener listener)
   {
     ((RangeChangeListener)listener).processRangeChange(this);
   }
 
+  @Override
   public boolean isAppropriateListener(FacesListener listener)
   {
     return (listener instanceof RangeChangeListener);
   }
 
+  @Override
   public int hashCode()
   {
     return (_newStart << 4) ^
@@ -113,8 +115,8 @@
            (getComponent().hashCode());
   }
 
-  public boolean equals(
-   Object o)
+  @Override
+  public boolean equals(Object o)
   {
     if (o instanceof RangeChangeEvent)
     {
@@ -130,6 +132,7 @@
     return false;
   }
 
+  @Override
   public String toString()
   {
     StringBuffer sb = new StringBuffer();

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/ReturnEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/ReturnEvent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/ReturnEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/ReturnEvent.java Tue Aug  1 15:00:44 2006
@@ -42,15 +42,21 @@
     this(source, returnValue, null);
   }
 
-  public ReturnEvent(UIComponent source, Object returnValue, Map returnParams)
+  @SuppressWarnings("unchecked")
+  public ReturnEvent(
+      UIComponent source, 
+      Object returnValue, 
+      Map<Object, Object> returnParams)
   {
     super(source);
     _returnValue = returnValue;
-    _returnParams = new HashMap();
+    // -= Simon Lessard =- 
+    // Useless and expensive instanciation 
+    //_returnParams = new HashMap<Object, Object>();
     if (returnParams == null)
       _returnParams = Collections.EMPTY_MAP;
     else
-      _returnParams = new HashMap(returnParams);
+      _returnParams = new HashMap<Object, Object>(returnParams);
   }
 
 
@@ -59,22 +65,25 @@
     return _returnValue;
   }
 
-  public Map getReturnParameters()
+  public Map<Object, Object> getReturnParameters()
   {
     return Collections.unmodifiableMap(_returnParams);
   }
 
+  @Override
   public void processListener(FacesListener listener)
   {
     ((ReturnListener) listener).processReturn(this);
   }
 
+  @Override
   public boolean isAppropriateListener(FacesListener listener)
   {
     return (listener instanceof ReturnListener);
   }
 
 
+  @Override
   public int hashCode()
   {
     return ((getComponent() == null) ? 0 : getComponent().hashCode()) +
@@ -82,8 +91,8 @@
             37 * ((_returnParams == null) ? 0 : _returnParams.hashCode())));
   }
 
-  public boolean equals(
-   Object o)
+  @Override
+  public boolean equals(Object o)
   {
     if (o == this)
       return true;
@@ -122,6 +131,7 @@
     return false;
   }
 
+  @Override
   public String toString()
   {
     StringBuffer sb = new StringBuffer();
@@ -142,6 +152,6 @@
   }
 
   private Object _returnValue;
-  private Map    _returnParams;
+  private Map<Object, Object> _returnParams;
 }
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowDisclosureEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowDisclosureEvent.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowDisclosureEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowDisclosureEvent.java Tue Aug  1 15:00:44 2006
@@ -33,7 +33,10 @@
    * @param collapsed the set of rowKeys that have just been collapsed.
    * @param expanded the set of rowKeys that have just been expanded.
    */
-  public RowDisclosureEvent(UIComponent source, RowKeySet collapsed, RowKeySet expanded)
+  public RowDisclosureEvent(
+      UIComponent source, 
+      RowKeySet<Object> collapsed, 
+      RowKeySet<Object> expanded)
   {
     super(source, collapsed, expanded);
   }
@@ -43,18 +46,24 @@
    * @param oldSet the set of rowKeys before any changes.
    * @param newSet the set of rowKeys after any changes.
    */
-  public RowDisclosureEvent(RowKeySet oldSet, RowKeySet newSet, UIComponent source)
+  public RowDisclosureEvent(
+      RowKeySet<Object> oldSet, 
+      RowKeySet<Object> newSet, 
+      UIComponent source)
   {
     super(oldSet, newSet, source);
   }
 
+  @Override
   public void processListener(FacesListener listener)
   {
     ((RowDisclosureListener) listener).processDisclosure(this);
   }
 
+  @Override
   public boolean isAppropriateListener(FacesListener listener)
   {
     return (listener instanceof RowDisclosureListener);
-  }  
+  }
+  
 }



Mime
View raw message