1 15 16 package com.jdon.controller.events; 17 18 public class EventUtil { 19 public final static String VIEW_STR = "view"; 20 public final static String CREATE_STR = "create"; 21 public final static String EDIT_STR = "edit"; 22 public final static String DELETE_STR = "delete"; 23 24 public static int actionTransfer(String actionName) { 25 if (actionName.equalsIgnoreCase(CREATE_STR)) 26 return EventSupport.CREATE; 27 else if (actionName.equalsIgnoreCase(EDIT_STR)) 28 return EventSupport.EDIT; 29 else if (actionName.equalsIgnoreCase(DELETE_STR)) 30 return EventSupport.DELETE; 31 else if (actionName.equalsIgnoreCase(VIEW_STR)) 32 return EventSupport.VIEW; 33 else 34 return 0; 35 36 } 37 38 } 39 | Popular Tags |