Reputation: 401
I've been trying to implement the events in my contact form, however I get the 'Cannot resolve symbol 'ContactFormEvent'' when trying to implement the following methods:
public static class SaveEvent extends ContactFormEvent {
SaveEvent(ContactForm source, Contact contact) {
super(source, contact);
}
}
public static class DeleteEvent extends ContactFormEvent {
DeleteEvent(ContactForm source, Contact contact) {
super(source, contact);
}
}
public static class CloseEvent extends ContactFormEvent {
CloseEvent(ContactForm source) {
super(source, null);
}
}
Additonally, I've been dealing with the reason: no instance(s) of type variable(s) exist so that CloseEvent conforms to ComponentEvent<?>
error for the following methods.
public Registration addDeleteListener(ComponentEventListener<DeleteEvent> listener) {
return addListener(DeleteEvent.class, listener);
}
public Registration addSaveListener(ComponentEventListener<SaveEvent> listener) {
return addListener(SaveEvent.class, listener);
}
public Registration addCloseListener(ComponentEventListener<CloseEvent> listener) {
return addListener(CloseEvent.class, listener);
}
What could be the solution here? I am running out of ideas, it seems like it has to do something with Vaadin's versioning, but I can't find any working solution.
Upvotes: -1
Views: 39
Reputation: 4290
ContactFormEvent
is not a Vaadin class, it's a custom class coming from somewhere else. You'll need to look into where you got that example code from.
Upvotes: 0