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

Norman Richards norman.richards at jboss.com
Tue Feb 6 18:45:16 EST 2007


  User: nrichards
  Date: 07/02/06 18:45:16

  Modified:    src/ui/org/jboss/seam/ui  SelectDate.java
  Log:
  JBSEAM-788: selectDate valuebinding
  
  Revision  Changes    Path
  1.8       +5 -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.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- SelectDate.java	1 Feb 2007 07:20:53 -0000	1.7
  +++ SelectDate.java	6 Feb 2007 23:45:15 -0000	1.8
  @@ -29,7 +29,8 @@
       private String dateFormat = "MM/dd/yyyy";
       
       public String getDateFormat(){
  -        return dateFormat;
  +        ValueBinding vb = getValueBinding("dateFormat");
  +        return (vb != null) ? JSF.getStringValue(getFacesContext(), vb) : dateFormat;
       }
       public void setDateFormat(String dateFormat){
           this.dateFormat = dateFormat;
  @@ -61,13 +62,15 @@
         Object[] values = (Object[]) state;
         super.restoreState(context, values[0]);
         forField = (String) values[1];
  +      dateFormat = (String) values[2];
      }
   
      @Override
      public Object saveState(FacesContext context) {
  -      Object[] values = new Object[2];
  +      Object[] values = new Object[3];
         values[0] = super.saveState(context);
         values[1] = forField;
  +      values[2] = dateFormat;
         return values;
      }
       
  
  
  



More information about the jboss-cvs-commits mailing list