public EventSetDescriptor[] getEventSetDescriptors() { try { if (eventSetDescriptors == null) { eventSetDescriptors = new EventSetDescriptor[] { new EventSetDescriptor("valueChangeListener", ValueChangeListener.class, //NOI18N new Method[] { ValueChangeListener.class.getMethod("processValueChange", //NOI18N new Class[] {ValueChangeEvent.class})}, null, null) }; } PropertyDescriptor[] propertyDescriptors = this.getPropertyDescriptors(); for (int i = 0; i < propertyDescriptors.length; i++) { if (propertyDescriptors[i].getName().equals("valueChangeListener")) { //NOI18N eventSetDescriptors[0].setValue(Constants.EventSetDescriptor.BINDING_PROPERTY, propertyDescriptors[i]); eventSetDescriptors[0].setShortDescription(propertyDescriptors[i].getShortDescription()); } } return eventSetDescriptors; } catch (Exception e) { return null; } }
actionEventDescriptor.setValue(Constants.EventSetDescriptor.BINDING_PROPERTY, actionDescriptor); actionEventDescriptor.setShortDescription(actionDescriptor.getShortDescription()); return new EventSetDescriptor[] {actionEventDescriptor}; } catch (Exception e) {
public EventSetDescriptor[] getEventSetDescriptors() { if (eventSetDescriptors == null) { try { PropertyDescriptor actionDescriptor = null; PropertyDescriptor[] propertyDescriptors = this.getPropertyDescriptors(); for (int i = 0; i < propertyDescriptors.length && actionDescriptor == null; i++) { if (propertyDescriptors[i].getName().equals("linkAction")) //NOI18N actionDescriptor = propertyDescriptors[i]; } EventSetDescriptor actionEventDescriptor = new EventSetDescriptor("linkAction", Action.class, //NOI18N new Method[] {Action.class.getMethod("action", new Class[] {})}, //NOI18N null, null); actionEventDescriptor.setDisplayName(actionDescriptor.getDisplayName()); actionEventDescriptor.setValue(Constants.EventSetDescriptor.BINDING_PROPERTY, actionDescriptor); actionEventDescriptor.setShortDescription(actionDescriptor.getShortDescription()); eventSetDescriptors = new EventSetDescriptor[] {actionEventDescriptor}; } catch (Exception e) { e.printStackTrace(); } } return eventSetDescriptors; }
valueChangeEventDescriptor.setValue(Constants.EventDescriptor.PARAMETER_NAMES, new String[] { "event" }); //NOI18N valueChangeEventDescriptor.setShortDescription(valueChangeDescriptor.getShortDescription()); EventSetDescriptor validateEventDescriptor = new EventSetDescriptor("validator", Validator.class, //NOI18N validateEventDescriptor.setValue(Constants.EventDescriptor.REQUIRED_IMPORTS, new String[] { "javax.faces.application.FacesMessage", "javax.faces.validator.ValidatorException" }); //NOI18N validateEventDescriptor.setShortDescription(validateDescriptor.getShortDescription()); return new EventSetDescriptor[] {valueChangeEventDescriptor, validateEventDescriptor}; } catch (Exception e) {