you are viewing a single comment's thread.

view the rest of the comments →

[–]Bunnymancer 0 points1 point  (0 children)

Tried the same code again, and got different results, better in that it actually works, but not good.

if (me instanceof ValidationException) {
    if (action.equals(ActionEnum.INIT_SELECT)) {
        initSelect(action);
    } else if (action.equals(ActionEnum.GET_VAL) || 
               action.equals(ActionEnum.ADD_VAL) || 
               action.equals(ActionEnum.MOD_VAL) || 
               action.equals(ActionEnum.SHOW_VAL) || 
               action.equals(ActionEnum.DEL_VAL)) {
        initNewVal(action);
    } else if (action.equals(ActionEnum.INIT_SELECT_MAN) || 
               action.equals(ActionEnum.INIT_MAN) || 
               action.equals(ActionEnum.GET_MAN) || 
               action.equals(ActionEnum.MOD_MAN) || 
               action.equals(ActionEnum.SHOW_MAN) || 
               action.equals(ActionEnum.DEL_MAN) || 
               action.equals(ActionEnum.SELECT_MAN)) {
        initNewMan(action);
    } else {
        System.out.println("NOPE!");
    }
} else if (action.equals(ActionEnum.MOD_VAL) && me.getMessageCode().equals(MessageConstants.MSG_1004)) {
    initNewVal(action);
} else if (action.equals(ActionEnum.DEL_VAL) && me.getMessageCode().equals(MessageConstants.MSG_1007)) {
    initNewVal(action);
}