the problem is this code:
String value = request.getParameter(elementName);
if (value == null) return;
Runnable sendNotification = new Runnable()
public void run()
resources.triggerEvent(event, context, null);
With an image submit there is no request parameter with the name of the element, instead there are 2 parameters, name.x and name.y indicating where the user clicked on the image. Thus request.getParameter(elementName) always returns null and the selected event is never fired.