……
17 public class ButtonComponent extends UICommand
implements CoveComponent {
18 public XulButton xulButton;
19
20 public ButtonComponent(XulButton button) {
21 super();
22 xulButton = button;
23 setId(button.getId());
24 setup(button.getContent());
25 }
……
35 private void setup(IXulButtonChoice[] choice) {
36 for (int i=0; i<choice.length; i++) {
37 if (choice[i] instanceof XulConfig) {
38 XulConfig xulConfig = (XulConfig)choice[i];
39 ApplicationFactory aFactory =
40 (ApplicationFactory) FactoryFinder
.getFactory(FactoryFinder.APPLICATION_FACTORY);
41 Application application = aFactory.getApplication();
42 String action = xulConfig.getActionAsString();
43 if ((action != null) && (!"".equals(action))) {
44 MethodBinding methodBinding;
45 if (UIComponentTag.isValueReference(action)) {
46 Class[] args = {ActionEvent.class};
47 methodBinding =
48 application.createMethodBinding(action,
args);
49 } else {
50 methodBinding =
51 new ConstantMethodBinding(action);
52 }
53 super.setAction(methodBinding);
54 }
……