Package org.exoplatform.webui.exception

Examples of org.exoplatform.webui.exception.MessageException


         }
         UIFormPageIterator uiInputIterator = uiInputContainer.findFirstComponentOfType(UIFormPageIterator.class);
         if (uiInputIterator.getAvailable() < 1)
         {
            String[] args = {"UITabPane.title.UIListPermissionSelector"};
            throw new MessageException(new ApplicationMessage("EmptyIteratorValidator.msg.empty", args,
               ApplicationMessage.INFO));
         }
      }
View Full Code Here


      {
         String message = e.getLocalizedMessage();
         log.error("Error processing the action: " + message, e);
         Object[] args = {message};
         context.addUIComponentToUpdateByAjax(uicomponent);
         throw new MessageException(new ApplicationMessage("UIPortletLifecycle.msg.process-error", args, ApplicationMessage.ERROR));
      }
     
   }
View Full Code Here

         {
            new GadgetSpec(Uri.parse("http://exoplatform.org"), (String)uiInput.getValue());
         }
         catch (Exception se)
         {
            throw new MessageException(new ApplicationMessage("UIGadgetEditor.msg.invalidSpec", null,
               ApplicationMessage.WARNING));
         }
      }
View Full Code Here

         }
         if (!url.trim().matches(URLValidator.URL_REGEX))
         {
            uiForm.getUIStringInput(FIELD_URL).setValue(uiPortlet.getURL());
            Object[] args = {FIELD_URL, "URL"};
            throw new MessageException(new ApplicationMessage("ExpressionValidator.msg.value-invalid", args));
         }
         PortletRequestContext pcontext = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
         PortletPreferences pref = pcontext.getRequest().getPreferences();
         pref.setValue("url", uiForm.getUIStringInput(FIELD_URL).getValue());
         pref.store();
View Full Code Here

         if ((url == null || url.trim().length() == 0) || (!url.trim().matches(URLValidator.URL_REGEX)))
         {
            UILogoPortlet uiPortlet = uiForm.getParent();
            uiForm.getUIStringInput(FIELD_URL).setValue(uiPortlet.getURL());
            Object[] args = {FIELD_URL, "URL"};
            throw new MessageException(new ApplicationMessage("ExpressionValidator.msg.value-invalid", args));
         }
         PortletRequestContext pcontext = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
         PortletPreferences pref = pcontext.getRequest().getPreferences();
         pref.setValue("url", uiForm.getUIStringInput(FIELD_URL).getValue());
         pref.store();
View Full Code Here

            PortletPreferences pref = pcontext.getRequest().getPreferences();
            String lastValue = pref.getValue(TOTAL_COLUMNS, "" + DEFAULT_COLUMNS);

            if (uiInput.getValue() == null || uiInput.getValue().length() == 0) {
                uiInput.setValue(lastValue);
                throw new MessageException(new ApplicationMessage("EmptyFieldValidator.msg.empty-input", args));
            }

            int totalCols = 0;
            try {
                totalCols = Integer.parseInt(uiInput.getValue());
                if (totalCols < 1 || totalCols > MAX_COLUMNS)
                    throw new Exception();
            } catch (Exception e) {
                uiInput.setValue(lastValue);
                throw new MessageException(new ApplicationMessage("NumberRangeValidator.msg.Invalid-number", args));
            }

            UIDashboardContainer uiDashboardContainer = ((UIContainer) uiForm.getParent()).getChild(UIDashboard.class)
                    .getChild(UIDashboardContainer.class);
            uiDashboardContainer.setColumns(totalCols);
View Full Code Here

        } catch (Exception e) {
            String message = e.getLocalizedMessage();
            log.error("Error processing the action: " + message, e);
            Object[] args = { message };
            context.addUIComponentToUpdateByAjax(uicomponent);
            throw new MessageException(new ApplicationMessage("UIPortletLifecycle.msg.process-error", args,
                    ApplicationMessage.ERROR));
        }

    }
View Full Code Here

                return;
            }
            UIFormPageIterator uiInputIterator = uiInputContainer.findFirstComponentOfType(UIFormPageIterator.class);
            if (uiInputIterator.getAvailable() < 1) {
                String[] args = { "UITabPane.title.UIListPermissionSelector" };
                throw new MessageException(new ApplicationMessage("EmptyIteratorValidator.msg.empty", args,
                        ApplicationMessage.INFO));
            }
        }
View Full Code Here

      {
         String message = e.getLocalizedMessage();
         log.error("Error processing the action: " + message, e);
         Object[] args = {message};
         context.addUIComponentToUpdateByAjax(uicomponent);
         throw new MessageException(new ApplicationMessage("UIPortletLifecycle.msg.process-error", args, ApplicationMessage.ERROR));
      }
     
   }
View Full Code Here

            uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
         } catch(Exception e){
            WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
            UIPortletApplication uiPortlet = uiGadget.getAncestorOfType(UIPortletApplication.class);
            context.addUIComponentToUpdateByAjax(uiPortlet);
            throw new MessageException(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null, ApplicationMessage.ERROR));
         }

         //
         if (uiGadget.isLossData())
         {
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.exception.MessageException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.