public ActionListenerHandler(TagConfig config) {
super(config);
this.binding = this.getAttribute("binding");
TagAttribute type = this.getAttribute("type");
if (type != null) {
if (!type.isLiteral()) {
throw new TagAttributeException(type, "Must be a literal class name of type ActionListener");
} else {
// test it out
try {
TagHandlerUtils.loadClass(type.getValue(), ActionListener.class);
} catch (ClassNotFoundException e) {
throw new TagAttributeException(type, "Couldn't qualify ActionListener", e);
} catch (ClassCastException e) {
throw new TagAttributeException(type, "Qualified class is not ActionListener", e);
}
}
this.listenerType = type.getValue();
} else {
this.listenerType = null;
}
this.listenerMethod = this.getAttribute("listener");