//
try {
uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
Util.getPortalRequestContext().setResponseComplete(true);
} catch (Exception e) {
UIPortletApplication uiPortlet = uiGadget.getAncestorOfType(UIPortletApplication.class);
context.addUIComponentToUpdateByAjax(uiPortlet);
context.setAttribute(UIGadget.SAVE_PREF_FAIL, true);
throw new MessageException(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null,
ApplicationMessage.ERROR));
}