Examples of ApplicationMessage


Examples of org.exoplatform.web.application.ApplicationMessage

        }
    }

    private void addOAuthExceptionMessage(WebuiRequestContext context, OAuthException gtnOauthOAuthException, UIApplication uiApp) {
        Object[] args = convertOAuthExceptionAttributes(context, "UIAccountSocial.label.", gtnOauthOAuthException.getExceptionAttributes());
        ApplicationMessage appMessage = new ApplicationMessage("UIUserProfileInputSet.msg.oauth-username-exists", args, ApplicationMessage.WARNING);
        appMessage.setArgsLocalized(false);
        uiApp.addMessage(appMessage);
    }
View Full Code Here

Examples of org.exoplatform.web.application.ApplicationMessage

                }
            }

            String userName = usernameInput.getValue();
            if (service.getUserHandler().findUserByName(userName) != null) {
                uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.user-exist", null, ApplicationMessage.WARNING));
                return;
            }
            uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.user-not-exist", null, ApplicationMessage.INFO));
        }
View Full Code Here

Examples of org.exoplatform.web.application.ApplicationMessage

        WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
        UIApplication uiApp = context.getUIApplication();
        String pass1x = getUIStringInput(PASSWORD1X).getValue();
        String pass2x = getUIStringInput(PASSWORD2X).getValue();
        if (!pass1x.equals(pass2x)) {
            uiApp.addMessage(new ApplicationMessage("UIAccountForm.msg.password-is-not-match", null, ApplicationMessage.ERROR));
            return false;
        }
        String username = getUIStringInput(USERNAME).getValue();
        if (newUser) {
            User user = service.getUserHandler().createUserInstance(username);
            invokeSetBindingField(user);
            // user.setPassword(Util.encodeMD5(pass1x)) ;
            if (service.getUserHandler().findUserByName(user.getUserName()) != null) {
                Object[] args = { user.getUserName() };
                uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.user-exist", args, ApplicationMessage.ERROR));
                return false;
            }

            Query query = new Query();
            query.setEmail(getUIStringInput("email").getValue());
            if (service.getUserHandler().findUsers(query).getAll().size() > 0) {
                Object[] args = { user.getUserName() };
                uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.email-exist", args, ApplicationMessage.ERROR));
                return false;
            }

            service.getUserHandler().createUser(user, true);
            reset();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.