Пример #1
0
  // Ajax Callback
  public void changeLetterCasingNew() {

    /*if(lookupItemHome != null
            && lookupItemHome.getInstance().getName() != null && !lookupItemHome.getInstance().getName().equalsIgnoreCase("")){
        lookupItemHome.getInstance().setName(toCamelCase(lookupItemHome.getInstance().getName()));
    }*/

    if (roleSysNewHome != null
        && roleSysNewHome.getInstance().getInternalCode() != null
        && !roleSysNewHome.getInstance().getInternalCode().equalsIgnoreCase("")) {

      String tempGroupCode = roleSysNewHome.getInstance().getInternalCode().toUpperCase();

      tempGroupCode = tempGroupCode.replaceAll("\\s+", "");

      roleSysNewHome.getInstance().setInternalCode(tempGroupCode);
    }

    if (roleSysNewHome != null
        && roleSysNewHome.getInstance().getGroupCode() != null
        && !roleSysNewHome.getInstance().getGroupCode().equalsIgnoreCase("")) {

      String tempGroupCode = roleSysNewHome.getInstance().getGroupCode().toUpperCase();

      tempGroupCode = tempGroupCode.replaceAll("\\s+", "");

      roleSysNewHome.getInstance().setGroupCode(tempGroupCode);
    }

    if (roleSysNewHome != null
        && roleSysNewHome.getInstance().getRoleType() != null
        && !roleSysNewHome.getInstance().getRoleType().equalsIgnoreCase("")) {

      String tempRoleType = roleSysNewHome.getInstance().getRoleType().toUpperCase();

      tempRoleType = tempRoleType.replaceAll("\\s+", "");

      roleSysNewHome.getInstance().setRoleType(tempRoleType);
    }
  }
Пример #2
0
 public void prepareNewRole(String groupCode, String roleType) {
   roleSysNewHome.clearInstance();
   roleSysNewHome.getInstance().setGroupCode(groupCode);
   roleSysNewHome.getInstance().setRoleType(roleType);
   addNew = true;
 }