public Metadata applyRule(String name, final TagAttribute attribute, MetadataTarget meta) {
if (meta.isTargetInstanceOf(UIDialogWindow.class)) {
if ("closeWindowActionListener".equals(name)) {
return new Metadata() {
public void applyMetadata(FaceletContext context, Object instance) {
((UIDialogWindow) instance).setCloseWindowActionListener(new LegacyMethodBinding(
attribute.getMethodExpression(context, null,
new Class[] { ActionEvent.class })));
}
};
} else if ("closeWindowAction".equals(name)) {
return new Metadata() {
public void applyMetadata(FaceletContext context, Object instance) {
((UIDialogWindow) instance).setCloseWindowAction(new LegacyMethodBinding(
attribute.getMethodExpression(context, String.class,
new Class[] { })));