……
72 public void updateModel(FacesContext context) {
73 Object value;
……
80 ApplicationFactory aFactory =
81 (ApplicationFactory)FactoryFinder
.getFactory(FactoryFinder.APPLICATION_FACTORY);
82 Application application = aFactory.getApplication();
83 String actionListener =
xulTextbox.getConfig().getActionListenerAsString();
84 if ((actionListener != null) && (!"".equals(actionListener))) {
85 Class[] args = getArgs(value);
86 Object[] values = {value};
87 MethodBinding methodBinding =
88 application.createMethodBinding(actionListener, args);
89 methodBinding.invoke(context, values);
90 }
91 }
92
93 private Class[] getArgs(Object obj) {
94 Class[] stringArgs = {String.class};
95 Class[] integerArgs = {Integer.class};
96 if (obj instanceof String) {
97 return stringArgs;
98 } else if (obj instanceof Integer) {
99 return integerArgs;
100 }
101 return null;
102 }
……