Dismissable widgetToDismiss = null;
Stack stack = ((XDIMEContextImpl)context).getStack();
// Start from the top of the stack.
int elementIndex = stack.size() - 1;
while (elementIndex >= 0) {
Object element = stack.elementAt(elementIndex);
if (element instanceof Dismissable) {
widgetToDismiss = (Dismissable)element;
dismissAttrs.setDismissableId(
widgetToDismiss.getDismissableId());
break;