Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
../../../../../../../img/srcFileCovDistChart0.png 2% of files have more coverage
7   32   4   3.5
4   24   0.57   2
2     2  
1    
 
  DateBinding       Line # 14 7 0% 4 13 0% 0.0
 
No Tests
 
1    package org.kuali.student.lum.program.client.widgets;
2   
3    import org.kuali.student.common.assembly.data.QueryPath;
4    import org.kuali.student.common.ui.client.configurable.mvc.binding.ModelWidgetBinding;
5    import org.kuali.student.common.ui.client.mvc.DataModel;
6    import org.kuali.student.common.ui.client.widgets.KSDatePicker;
7    import org.kuali.student.lum.program.client.ProgramUtils;
8   
9    import java.util.Date;
10   
11    /**
12    * @author Igor
13    */
 
14    class DateBinding implements ModelWidgetBinding<KSDatePicker> {
15   
 
16  0 toggle @Override
17    public void setModelValue(KSDatePicker widget, DataModel model, String path) {
18  0 QueryPath qPath = QueryPath.parse(path);
19  0 Date dateValue = widget.getValue();
20  0 if (dateValue != null) {
21  0 model.set(qPath, ProgramUtils.df.format(dateValue));
22    }
23    }
24   
 
25  0 toggle @Override
26    public void setWidgetValue(KSDatePicker widget, DataModel model, String path) {
27  0 String value = model.get(path);
28  0 if (value != null) {
29  0 widget.setValue(ProgramUtils.df.parse(value));
30    }
31    }
32    }