[jboss-cvs] jboss-seam/src/ui/org/jboss/seam/ui ...

Gavin King gavin.king at jboss.com
Sun Oct 1 21:28:00 EDT 2006


  User: gavin   
  Date: 06/10/01 21:28:00

  Modified:    src/ui/org/jboss/seam/ui   UIDecorate.java
  Removed:     src/ui/org/jboss/seam/ui   UIDecorations.java
  Log:
  s:decorations is not even needed
  
  Revision  Changes    Path
  1.4       +10 -23    jboss-seam/src/ui/org/jboss/seam/ui/UIDecorate.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UIDecorate.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/ui/org/jboss/seam/ui/UIDecorate.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- UIDecorate.java	2 Oct 2006 01:16:38 -0000	1.3
  +++ UIDecorate.java	2 Oct 2006 01:28:00 -0000	1.4
  @@ -53,7 +53,7 @@
      /**
       * A depth-first search for a UIInput
       */
  -   private String getInputId(UIComponent component)
  +   private static String getInputId(UIComponent component)
      {
         for (Object child: component.getChildren())
         {
  @@ -80,22 +80,6 @@
         return true;
      }
      
  -   private UIDecorations getParentDecorations(UIComponent component)
  -   {
  -      if (component instanceof UIDecorations) 
  -      {
  -         return (UIDecorations) component;
  -      }
  -      else if ( component.getParent()==null )
  -      {
  -         return null;
  -      }
  -      else
  -      {
  -         return getParentDecorations( component.getParent() );
  -      }
  -   }
  -
      public String getFor()
      {
         return forId;
  @@ -108,12 +92,15 @@
   
      private UIComponent getDecoration(String name)
      {
  -      UIComponent dec = getFacet(name);
  -      if (dec==null)
  -      {
  -         dec = getParentDecorations(this).getFacet(name);
  +      return getDecoration(name, this);
         }
  -      return dec;
  +   
  +   private static UIComponent getDecoration(String name, UIComponent component)
  +   {
  +      UIComponent dec = component.getFacet(name);
  +      if (dec!=null) return dec;
  +      if ( component.getParent()==null ) return null;
  +      return getDecoration( name, component.getParent() );
      }
   
      @Override
  
  
  



More information about the jboss-cvs-commits mailing list