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

Norman Richards norman.richards at jboss.com
Thu Feb 1 02:20:53 EST 2007


  User: nrichards
  Date: 07/02/01 02:20:53

  Modified:    src/ui/org/jboss/seam/ui  SelectDate.java
  Log:
  JBSEAM-661: use value binding
  
  Revision  Changes    Path
  1.7       +4 -2      jboss-seam/src/ui/org/jboss/seam/ui/SelectDate.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SelectDate.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/ui/org/jboss/seam/ui/SelectDate.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- SelectDate.java	28 Jan 2007 02:55:26 -0000	1.6
  +++ SelectDate.java	1 Feb 2007 07:20:53 -0000	1.7
  @@ -12,6 +12,7 @@
   import javax.faces.component.UIComponentBase;
   import javax.faces.context.FacesContext;
   import javax.faces.context.ResponseWriter;
  +import javax.faces.el.ValueBinding;
   
   import org.jboss.seam.core.Messages;
   
  @@ -35,7 +36,8 @@
       }
       
       public String getFor(){
  -        return forField;
  +        ValueBinding vb = getValueBinding("for");
  +        return (vb != null) ? JSF.getStringValue(getFacesContext(), vb) : forField;
       }    
       public void setFor(String forField) {
           this.forField = forField;
  @@ -72,7 +74,7 @@
       @Override
       public void encodeBegin(FacesContext context) throws IOException
       {
  -        UIComponent forComponent = findComponent(forField);
  +        UIComponent forComponent = findComponent(getFor());
   
           writeScript(context, SELECTDATE_JS);
           ResponseWriter response = context.getResponseWriter();
  
  
  



More information about the jboss-cvs-commits mailing list