1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.uruma.binding.value.command;
17
18 import java.lang.reflect.Field;
19 import java.util.List;
20
21 import org.seasar.framework.beans.PropertyDesc;
22 import org.seasar.uruma.annotation.ExportSelection;
23 import org.seasar.uruma.binding.value.BindingCommand;
24 import org.seasar.uruma.binding.value.ValueBinder;
25 import org.seasar.uruma.component.UIComponent;
26 import org.seasar.uruma.desc.FormDesc;
27
28
29
30
31
32
33 public class ExportSelectionCommand extends
34 AbstractBindingCommand<ExportSelection> {
35
36
37
38
39 public List<PropertyDesc> getTargetPropertyDescs(final FormDesc desc) {
40 return desc.getExportSelectionProperties();
41 }
42
43
44
45
46
47
48 @Override
49 protected void doBind(final ValueBinder binder, final Object widget,
50 final Object formObj, final PropertyDesc propDesc,
51 final UIComponent uiComp) {
52 binder.exportSelection(widget, formObj, propDesc, uiComp);
53 }
54
55
56
57
58 @Override
59 protected ExportSelection getAnnotation(final Field field) {
60 return field.getAnnotation(ExportSelection.class);
61 }
62
63
64
65
66 @Override
67 protected String getId(final ExportSelection annotation) {
68 return annotation.id();
69 }
70 }