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

Peter Muir peter at bleepbleep.org.uk
Tue Mar 13 05:17:28 EDT 2007


  User: pmuir   
  Date: 07/03/13 05:17:28

  Modified:    src/ui/org/jboss/seam/ui  UIDecorate.java
  Log:
  JBSEAM-501
  
  Revision  Changes    Path
  1.8       +209 -209  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.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- UIDecorate.java	27 Feb 2007 01:44:53 -0000	1.7
  +++ UIDecorate.java	13 Mar 2007 09:17:28 -0000	1.8
  @@ -2,9 +2,9 @@
   
   import java.io.IOException;
   
  +import javax.faces.component.EditableValueHolder;
   import javax.faces.component.UIComponent;
   import javax.faces.component.UIComponentBase;
  -import javax.faces.component.UIInput;
   import javax.faces.context.FacesContext;
   
   public class UIDecorate extends UIComponentBase
  @@ -39,8 +39,8 @@
         String id = getFor();
         if (id==null)
         {
  -         UIInput input = getInput(this);
  -         return input==null ? null : input.getId();
  +         UIComponent evh = getEditableValueHolder(this);
  +         return evh==null ? null : evh.getId();
         }
         else
         {
  @@ -53,8 +53,8 @@
         String id = getFor();
         if (id==null)
         {
  -         UIInput input = getInput(this);
  -         return input==null ? null : input.getClientId( getFacesContext() );
  +         UIComponent evh = getEditableValueHolder(this);
  +         return evh==null ? null : evh.getClientId( getFacesContext() );
         }
         else
         {
  @@ -64,24 +64,24 @@
      }
   
      /**
  -    * A depth-first search for a UIInput
  +    * A depth-first search for an EditableValueHolder
       */
  -   private static UIInput getInput(UIComponent component)
  +   private static UIComponent getEditableValueHolder(UIComponent component)
      {
         for (Object child: component.getChildren())
         {
  -         if (child instanceof UIInput)
  +         if (child instanceof EditableValueHolder)
            {
  -            UIInput input = (UIInput) child;
  -            if ( input.isRendered() )
  +            UIComponent evh =(UIComponent) child;
  +            if ( evh.isRendered() )
               {
  -               return input;
  +               return evh;
               }
            }
            else if (child instanceof UIComponent)
            {
  -            UIInput input = getInput( (UIComponent) child );
  -            if (input!=null) return input;
  +            UIComponent evh = getEditableValueHolder( (UIComponent) child );
  +            if (evh!=null) return evh;
            }
         }
         return null;
  
  
  



More information about the jboss-cvs-commits mailing list