while (null != result && result.getClass().isAssignableFrom(ELException.class)) {
messageStr = result.getMessage();
result = result.getCause();
}
if (null == messageStr) {
MessageFactory messageFactory = ServiceTracker.getService(MessageFactory.class);
message = messageFactory.createMessage(context, FacesMessages.UIINPUT_UPDATE,
MessageUtil.getLabel(context, this));
} else {
message = new FacesMessage(FacesMessage.SEVERITY_ERROR, messageStr, messageStr);
}
} catch (Exception e) {
caught = e;
MessageFactory messageFactory = ServiceTracker.getService(MessageFactory.class);
message = messageFactory.createMessage(context, FacesMessages.UIINPUT_UPDATE,
MessageUtil.getLabel(context, this));
}
if (caught != null) {
assert (message != null);
UpdateModelException toQueue = new UpdateModelException(message, caught);