// ImageButton is used for its original purpose (as a kind
// of image map). In modern usage, we only care about
// whether the user clicked on the image (and thus submitted
// the form), not where in the image the user actually clicked.
IBinding pointBinding = getBinding("point");
if (pointBinding != null)
{
int x = Integer.parseInt(value);
parameterName = name + ".y";
value = context.getParameter(parameterName);
int y = Integer.parseInt(value);
pointBinding.setObject(new Point(x, y));
}
// Notify the application, by setting the select parameter
// to the tag parameter.
IBinding selectedBinding = getBinding("selected");
if (selectedBinding != null)
selectedBinding.setObject(getTag());
IActionListener listener = getListener();
if (listener != null)
listener.actionTriggered(this, cycle);