* {@link SharedState}. Never null.
*/
public SharedState getState();
+
+ /**
+ * Checks if an event listener has been registered on the server side for
+ * the given event identifier.
+ *
+ * @param eventIdentifier
+ * The identifier for the event
+ * @return true if a listener has been registered on the server side, false
+ * otherwise
+ */
+ public boolean hasEventListener(String eventIdentifier);
+
}
import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.Focusable;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.ApplicationConnection;
import com.vaadin.client.ComponentConnector;
-import com.vaadin.client.HasComponentsConnector;
import com.vaadin.client.ConnectorMap;
+import com.vaadin.client.HasComponentsConnector;
import com.vaadin.client.LayoutManager;
import com.vaadin.client.ServerConnector;
import com.vaadin.client.StyleConstants;
return LayoutManager.get(getConnection());
}
- /**
- * Checks if there is a registered server side listener for the given event
- * identifier.
- *
- * @param eventIdentifier
- * The identifier to check for
- * @return true if an event listener has been registered with the given
- * event identifier on the server side, false otherwise
- */
- @Override
- public boolean hasEventListener(String eventIdentifier) {
- Set<String> reg = getState().registeredEventListeners;
- return (reg != null && reg.contains(eventIdentifier));
- }
-
@Override
public void updateEnabledState(boolean enabledState) {
super.updateEnabledState(enabledState);
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerManager;
return urlReference.getURL();
}
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.client.ServerConnector#hasEventListener(java.lang.String)
+ */
+ public boolean hasEventListener(String eventIdentifier) {
+ Set<String> reg = getState().registeredEventListeners;
+ return (reg != null && reg.contains(eventIdentifier));
+ }
}