|  1 |     | 
     | 
  |  2 |     | 
     | 
  |  3 |     | 
     | 
  |  4 |     | 
     | 
  |  5 |     | 
     | 
  |  6 |     | 
     | 
  |  7 |     | 
     | 
  |  8 |     | 
     | 
  |  9 |     | 
     | 
  |  10 |     | 
     | 
  |  11 |     | 
     | 
  |  12 |     | 
     | 
  |  13 |     | 
     | 
  |  14 |     | 
     | 
  |  15 |     | 
     | 
  |  16 |     | 
   package org.kuali.rice.kns.web.struts.form;  | 
  |  17 |     | 
     | 
  |  18 |     | 
   import java.util.ArrayList;  | 
  |  19 |     | 
   import java.util.HashMap;  | 
  |  20 |     | 
   import java.util.List;  | 
  |  21 |     | 
   import java.util.Map;  | 
  |  22 |     | 
     | 
  |  23 |     | 
   import javax.servlet.ServletRequest;  | 
  |  24 |     | 
   import javax.servlet.http.HttpServletRequest;  | 
  |  25 |     | 
     | 
  |  26 |     | 
   import org.apache.commons.lang.StringUtils;  | 
  |  27 |     | 
   import org.apache.struts.action.ActionMapping;  | 
  |  28 |     | 
   import org.kuali.rice.kns.datadictionary.HeaderNavigation;  | 
  |  29 |     | 
   import org.kuali.rice.kns.service.KNSServiceLocator;  | 
  |  30 |     | 
   import org.kuali.rice.kns.util.ActionFormUtilMap;  | 
  |  31 |     | 
   import org.kuali.rice.kns.util.KNSConstants;  | 
  |  32 |     | 
   import org.kuali.rice.kns.util.ObjectUtils;  | 
  |  33 |     | 
   import org.kuali.rice.kns.util.TypedArrayList;  | 
  |  34 |     | 
   import org.kuali.rice.kns.util.WebUtils;  | 
  |  35 |     | 
   import org.kuali.rice.kns.web.format.Formatter;  | 
  |  36 |     | 
   import org.kuali.rice.kns.web.struts.pojo.PojoFormBase;  | 
  |  37 |     | 
   import org.kuali.rice.kns.web.ui.ExtraButton;  | 
  |  38 |     | 
   import org.kuali.rice.kns.web.ui.HeaderField;  | 
  |  39 |     | 
     | 
  |  40 |     | 
     | 
  |  41 |     | 
     | 
  |  42 |     | 
     | 
  |  43 |     | 
   public class KualiForm extends PojoFormBase { | 
  |  44 |     | 
       private static final long serialVersionUID = 1L;  | 
  |  45 |     | 
     | 
  |  46 |     | 
       private static final String literalPrefixAndDelimiter =  | 
  |  47 |     | 
               KNSConstants.LOOKUP_PARAMETER_LITERAL_PREFIX+KNSConstants.LOOKUP_PARAMETER_LITERAL_DELIMITER;  | 
  |  48 |     | 
     | 
  |  49 |     | 
       private String backLocation;  | 
  |  50 |     | 
       private String methodToCall;  | 
  |  51 |     | 
       private String refreshCaller;  | 
  |  52 |     | 
       private String anchor;  | 
  |  53 |     | 
       private Map<String, String> tabStates;  | 
  |  54 |     | 
       private Map actionFormUtilMap;  | 
  |  55 |    0 |        private Map displayedErrors = new HashMap();  | 
  |  56 |    0 |        private Map<String, Object> displayedWarnings = new HashMap<String, Object>();  | 
  |  57 |    0 |        private Map<String, Object> displayedInfo = new HashMap<String, Object>();  | 
  |  58 |    0 |        private int currentTabIndex = 0;  | 
  |  59 |    0 |        private int arbitrarilyHighIndex = 1000000;  | 
  |  60 |     | 
     | 
  |  61 |     | 
       private String navigationCss;  | 
  |  62 |     | 
       private HeaderNavigation[] headerNavigationTabs;  | 
  |  63 |    0 |        protected List<ExtraButton> extraButtons = new TypedArrayList( ExtraButton.class ) ;  | 
  |  64 |     | 
     | 
  |  65 |     | 
       private boolean fieldLevelHelpEnabled;  | 
  |  66 |     | 
         | 
  |  67 |     | 
       private List<HeaderField> docInfo;  | 
  |  68 |    0 |        private int numColumns = 2;  | 
  |  69 |     | 
         | 
  |  70 |     | 
       private String fieldNameToFocusOnAfterSubmit;  | 
  |  71 |     | 
         | 
  |  72 |     | 
         | 
  |  73 |     | 
     | 
  |  74 |     | 
     | 
  |  75 |     | 
       @Override  | 
  |  76 |     | 
       public void addRequiredNonEditableProperties(){ | 
  |  77 |    0 |                super.addRequiredNonEditableProperties();  | 
  |  78 |    0 |                registerRequiredNonEditableProperty(KNSConstants.REFRESH_CALLER);  | 
  |  79 |    0 |        }  | 
  |  80 |     | 
         | 
  |  81 |     | 
       public int getNumColumns() { | 
  |  82 |    0 |            return this.numColumns;  | 
  |  83 |     | 
       }  | 
  |  84 |     | 
     | 
  |  85 |     | 
       public void setNumColumns(int numColumns) { | 
  |  86 |    0 |            this.numColumns = numColumns;  | 
  |  87 |    0 |        }  | 
  |  88 |     | 
     | 
  |  89 |     | 
       public List<HeaderField> getDocInfo() { | 
  |  90 |    0 |            return this.docInfo;  | 
  |  91 |     | 
       }  | 
  |  92 |     | 
     | 
  |  93 |     | 
       public void setDocInfo(List<HeaderField> docInfo) { | 
  |  94 |    0 |            this.docInfo = docInfo;  | 
  |  95 |    0 |        }  | 
  |  96 |     | 
     | 
  |  97 |     | 
         | 
  |  98 |     | 
     | 
  |  99 |     | 
     | 
  |  100 |    0 |        public KualiForm() { | 
  |  101 |    0 |            this.tabStates = new HashMap<String, String>();  | 
  |  102 |    0 |            this.actionFormUtilMap = new ActionFormUtilMap();  | 
  |  103 |    0 |            this.docInfo = new ArrayList<HeaderField>();  | 
  |  104 |    0 |        }  | 
  |  105 |     | 
     | 
  |  106 |     | 
         | 
  |  107 |     | 
     | 
  |  108 |     | 
     | 
  |  109 |     | 
       public void populate(HttpServletRequest request) { | 
  |  110 |    0 |            setMethodToCall(WebUtils.parseMethodToCall(this, request));  | 
  |  111 |     | 
             | 
  |  112 |    0 |            super.populate(request);  | 
  |  113 |     | 
     | 
  |  114 |    0 |            populateBackLocation(request);  | 
  |  115 |    0 |            populateFieldLevelHelpEnabled(request);  | 
  |  116 |     | 
             | 
  |  117 |    0 |            if (actionFormUtilMap instanceof ActionFormUtilMap) { | 
  |  118 |    0 |                ((ActionFormUtilMap) actionFormUtilMap).setCacheValueFinderResults(true);  | 
  |  119 |     | 
           }  | 
  |  120 |    0 |        }  | 
  |  121 |     | 
             | 
  |  122 |    0 |        private static Boolean ENABLE_FIELD_LEVEL_HELP_IND = null;  | 
  |  123 |     | 
         | 
  |  124 |     | 
       protected void populateBackLocation(HttpServletRequest request){ | 
  |  125 |    0 |            if (getParameter(request, "returnLocation") != null) { | 
  |  126 |    0 |                setBackLocation(getParameter(request, "returnLocation"));  | 
  |  127 |     | 
           }  | 
  |  128 |    0 |        }  | 
  |  129 |     | 
         | 
  |  130 |     | 
         | 
  |  131 |     | 
     | 
  |  132 |     | 
     | 
  |  133 |     | 
     | 
  |  134 |     | 
     | 
  |  135 |     | 
     | 
  |  136 |     | 
       protected void populateFieldLevelHelpEnabled(HttpServletRequest request) { | 
  |  137 |    0 |                if ( ENABLE_FIELD_LEVEL_HELP_IND == null ) { | 
  |  138 |    0 |                        ENABLE_FIELD_LEVEL_HELP_IND = KNSServiceLocator.getParameterService().getIndicatorParameter(KNSConstants.KNS_NAMESPACE,  | 
  |  139 |     | 
                               KNSConstants.DetailTypes.ALL_DETAIL_TYPE, KNSConstants.SystemGroupParameterNames.ENABLE_FIELD_LEVEL_HELP_IND);  | 
  |  140 |     | 
               }  | 
  |  141 |    0 |                setFieldLevelHelpEnabled( ENABLE_FIELD_LEVEL_HELP_IND.booleanValue() );  | 
  |  142 |    0 |        }  | 
  |  143 |     | 
     | 
  |  144 |     | 
       public Map getDisplayedErrors() { | 
  |  145 |    0 |            return displayedErrors;  | 
  |  146 |     | 
       }  | 
  |  147 |     | 
     | 
  |  148 |     | 
         | 
  |  149 |     | 
     | 
  |  150 |     | 
     | 
  |  151 |     | 
           public Map<String, Object> getDisplayedWarnings() { | 
  |  152 |    0 |                    return this.displayedWarnings;  | 
  |  153 |     | 
           }  | 
  |  154 |     | 
     | 
  |  155 |     | 
             | 
  |  156 |     | 
     | 
  |  157 |     | 
     | 
  |  158 |     | 
           public Map<String, Object> getDisplayedInfo() { | 
  |  159 |    0 |                    return this.displayedInfo;  | 
  |  160 |     | 
           }  | 
  |  161 |     | 
     | 
  |  162 |     | 
             | 
  |  163 |     | 
     | 
  |  164 |     | 
     | 
  |  165 |     | 
     | 
  |  166 |     | 
     | 
  |  167 |     | 
       public String getMethodToCall() { | 
  |  168 |    0 |            return methodToCall;  | 
  |  169 |     | 
       }  | 
  |  170 |     | 
     | 
  |  171 |     | 
     | 
  |  172 |     | 
         | 
  |  173 |     | 
     | 
  |  174 |     | 
     | 
  |  175 |     | 
       public void setMethodToCall(String methodToCall) { | 
  |  176 |    0 |            this.methodToCall = methodToCall;  | 
  |  177 |    0 |        }  | 
  |  178 |     | 
     | 
  |  179 |     | 
     | 
  |  180 |     | 
         | 
  |  181 |     | 
     | 
  |  182 |     | 
     | 
  |  183 |     | 
     | 
  |  184 |     | 
     | 
  |  185 |     | 
       public String getRefreshCaller() { | 
  |  186 |    0 |            return refreshCaller;  | 
  |  187 |     | 
       }  | 
  |  188 |     | 
     | 
  |  189 |     | 
     | 
  |  190 |     | 
         | 
  |  191 |     | 
     | 
  |  192 |     | 
     | 
  |  193 |     | 
       public void setRefreshCaller(String refreshCaller) { | 
  |  194 |    0 |            this.refreshCaller = refreshCaller;  | 
  |  195 |    0 |        }  | 
  |  196 |     | 
     | 
  |  197 |     | 
         | 
  |  198 |     | 
     | 
  |  199 |     | 
     | 
  |  200 |     | 
       public Map<String, String> getTabStates() { | 
  |  201 |    0 |            return tabStates;  | 
  |  202 |     | 
       }  | 
  |  203 |     | 
     | 
  |  204 |     | 
         | 
  |  205 |     | 
     | 
  |  206 |     | 
     | 
  |  207 |     | 
     | 
  |  208 |     | 
     | 
  |  209 |     | 
       public void setTabStates(Map<String, String> tabStates) { | 
  |  210 |    0 |            this.tabStates = tabStates;  | 
  |  211 |    0 |        }  | 
  |  212 |     | 
     | 
  |  213 |     | 
         | 
  |  214 |     | 
     | 
  |  215 |     | 
     | 
  |  216 |     | 
       public String getTabState(String key) { | 
  |  217 |    0 |            String state = KNSConstants.EMPTY_STRING;  | 
  |  218 |    0 |            if (tabStates.containsKey(key)) { | 
  |  219 |    0 |                if (tabStates.get(key) instanceof String) { | 
  |  220 |    0 |                        state = tabStates.get(key);  | 
  |  221 |     | 
               }  | 
  |  222 |     | 
               else { | 
  |  223 |     | 
                         | 
  |  224 |     | 
                         | 
  |  225 |    0 |                        Object result = tabStates.get(key);  | 
  |  226 |    0 |                        result.getClass();  | 
  |  227 |    0 |                        state = ((String[])result)[0];  | 
  |  228 |     | 
               }  | 
  |  229 |     | 
           }  | 
  |  230 |     | 
     | 
  |  231 |    0 |            return state;  | 
  |  232 |     | 
       }  | 
  |  233 |     | 
     | 
  |  234 |     | 
       public int getCurrentTabIndex() { | 
  |  235 |    0 |            return currentTabIndex;  | 
  |  236 |     | 
       }  | 
  |  237 |     | 
     | 
  |  238 |     | 
       public void setCurrentTabIndex(int currentTabIndex) { | 
  |  239 |    0 |            this.currentTabIndex = currentTabIndex;  | 
  |  240 |    0 |        }  | 
  |  241 |     | 
     | 
  |  242 |     | 
       public void incrementTabIndex() { | 
  |  243 |    0 |            this.currentTabIndex++;  | 
  |  244 |    0 |        }  | 
  |  245 |     | 
     | 
  |  246 |     | 
       public int getNextArbitrarilyHighIndex() { | 
  |  247 |    0 |            return this.arbitrarilyHighIndex++;  | 
  |  248 |     | 
       }  | 
  |  249 |     | 
         | 
  |  250 |     | 
           public String getFieldNameToFocusOnAfterSubmit() { | 
  |  251 |    0 |                    return this.fieldNameToFocusOnAfterSubmit;  | 
  |  252 |     | 
           }  | 
  |  253 |     | 
     | 
  |  254 |     | 
           public void setFieldNameToFocusOnAfterSubmit(String fieldNameToFocusOnAfterSubmit) { | 
  |  255 |    0 |                    this.fieldNameToFocusOnAfterSubmit = fieldNameToFocusOnAfterSubmit;  | 
  |  256 |    0 |            }  | 
  |  257 |     | 
     | 
  |  258 |     | 
             | 
  |  259 |     | 
     | 
  |  260 |     | 
     | 
  |  261 |     | 
       public Map getActionFormUtilMap() { | 
  |  262 |    0 |            return actionFormUtilMap;  | 
  |  263 |     | 
       }  | 
  |  264 |     | 
     | 
  |  265 |     | 
         | 
  |  266 |     | 
     | 
  |  267 |     | 
     | 
  |  268 |     | 
       public void setActionFormUtilMap(Map validOptionsMap) { | 
  |  269 |    0 |            this.actionFormUtilMap = validOptionsMap;  | 
  |  270 |    0 |        }  | 
  |  271 |     | 
     | 
  |  272 |     | 
         | 
  |  273 |     | 
     | 
  |  274 |     | 
     | 
  |  275 |     | 
     | 
  |  276 |     | 
     | 
  |  277 |     | 
       public HeaderNavigation[] getHeaderNavigationTabs() { | 
  |  278 |    0 |            return headerNavigationTabs;  | 
  |  279 |     | 
       }  | 
  |  280 |     | 
     | 
  |  281 |     | 
         | 
  |  282 |     | 
     | 
  |  283 |     | 
     | 
  |  284 |     | 
     | 
  |  285 |     | 
     | 
  |  286 |     | 
       public void setHeaderNavigationTabs(HeaderNavigation[] headerNavigationTabs) { | 
  |  287 |    0 |            this.headerNavigationTabs = headerNavigationTabs;  | 
  |  288 |    0 |        }  | 
  |  289 |     | 
     | 
  |  290 |     | 
         | 
  |  291 |     | 
     | 
  |  292 |     | 
     | 
  |  293 |     | 
     | 
  |  294 |     | 
     | 
  |  295 |     | 
       public String getNavigationCss() { | 
  |  296 |    0 |            return navigationCss;  | 
  |  297 |     | 
       }  | 
  |  298 |     | 
     | 
  |  299 |     | 
         | 
  |  300 |     | 
     | 
  |  301 |     | 
     | 
  |  302 |     | 
     | 
  |  303 |     | 
     | 
  |  304 |     | 
       public void setNavigationCss(String navigationCss) { | 
  |  305 |    0 |            this.navigationCss = navigationCss;  | 
  |  306 |    0 |        }  | 
  |  307 |     | 
     | 
  |  308 |     | 
       public String getAnchor() { | 
  |  309 |    0 |            return anchor;  | 
  |  310 |     | 
       }  | 
  |  311 |     | 
     | 
  |  312 |     | 
       public void setAnchor(String anchor) { | 
  |  313 |    0 |            this.anchor = anchor;  | 
  |  314 |    0 |        }  | 
  |  315 |     | 
     | 
  |  316 |     | 
       public List<ExtraButton> getExtraButtons() { | 
  |  317 |    0 |            return extraButtons;  | 
  |  318 |     | 
       }  | 
  |  319 |     | 
     | 
  |  320 |     | 
       public void setExtraButtons(List<ExtraButton> extraButtons) { | 
  |  321 |    0 |            if ( extraButtons instanceof TypedArrayList ) { | 
  |  322 |    0 |                this.extraButtons = extraButtons;  | 
  |  323 |     | 
           } else { | 
  |  324 |    0 |                this.extraButtons.clear();  | 
  |  325 |    0 |                this.extraButtons.addAll( extraButtons );  | 
  |  326 |     | 
           }  | 
  |  327 |    0 |        }  | 
  |  328 |     | 
     | 
  |  329 |     | 
       public ExtraButton getExtraButton( int index ) { | 
  |  330 |    0 |            return extraButtons.get( index );  | 
  |  331 |     | 
       }  | 
  |  332 |     | 
     | 
  |  333 |     | 
       public void setExtraButton( int index, ExtraButton extraButton ) { | 
  |  334 |    0 |            extraButtons.set( index, extraButton );  | 
  |  335 |    0 |        }  | 
  |  336 |     | 
     | 
  |  337 |     | 
         | 
  |  338 |     | 
     | 
  |  339 |     | 
     | 
  |  340 |     | 
     | 
  |  341 |     | 
     | 
  |  342 |     | 
       public boolean isFieldLevelHelpEnabled() { | 
  |  343 |    0 |            return this.fieldLevelHelpEnabled;  | 
  |  344 |     | 
       }  | 
  |  345 |     | 
     | 
  |  346 |     | 
       public void setFieldLevelHelpEnabled(boolean fieldLevelHelpEnabled) { | 
  |  347 |    0 |            this.fieldLevelHelpEnabled = fieldLevelHelpEnabled;  | 
  |  348 |    0 |        }  | 
  |  349 |     | 
         | 
  |  350 |     | 
         | 
  |  351 |     | 
         | 
  |  352 |     | 
     | 
  |  353 |     | 
     | 
  |  354 |     | 
     | 
  |  355 |     | 
     | 
  |  356 |     | 
     | 
  |  357 |     | 
     | 
  |  358 |     | 
       public String retrieveFormValueForLookupInquiryParameters(String parameterName, String parameterValueLocation) { | 
  |  359 |     | 
                 | 
  |  360 |    0 |                if (parameterValueLocation.startsWith(literalPrefixAndDelimiter)) { | 
  |  361 |    0 |                        return parameterValueLocation.substring(literalPrefixAndDelimiter.length());  | 
  |  362 |     | 
               }  | 
  |  363 |     | 
     | 
  |  364 |    0 |                Object value = ObjectUtils.getPropertyValue(this, parameterValueLocation);  | 
  |  365 |    0 |                    if (value == null) { | 
  |  366 |    0 |                            return null;  | 
  |  367 |     | 
                   }  | 
  |  368 |    0 |                    if (value instanceof String) { | 
  |  369 |    0 |                            return (String) value;  | 
  |  370 |     | 
                   }  | 
  |  371 |    0 |                    Formatter formatter = Formatter.getFormatter(value.getClass());  | 
  |  372 |    0 |                    return (String) formatter.format(value);          | 
  |  373 |     | 
       }  | 
  |  374 |     | 
     | 
  |  375 |     | 
             | 
  |  376 |     | 
     | 
  |  377 |     | 
     | 
  |  378 |     | 
     | 
  |  379 |     | 
     | 
  |  380 |     | 
           @Override  | 
  |  381 |     | 
           public boolean shouldPropertyBePopulatedInForm(  | 
  |  382 |     | 
                           String requestParameterName, HttpServletRequest request) { | 
  |  383 |    0 |                    if (requestParameterName.startsWith(KNSConstants.TAB_STATES)) { | 
  |  384 |    0 |                            return true;  | 
  |  385 |     | 
                   }  | 
  |  386 |     | 
                     | 
  |  387 |    0 |                    if (requestParameterName.equals(KNSConstants.DISPATCH_REQUEST_PARAMETER)) { | 
  |  388 |    0 |                            String methodToCallParameterName = request.getParameter(KNSConstants.DISPATCH_REQUEST_PARAMETER);  | 
  |  389 |    0 |                            if(StringUtils.equals(methodToCallParameterName, KNSConstants.RETURN_METHOD_TO_CALL)){ | 
  |  390 |    0 |                                    return true;  | 
  |  391 |     | 
                           }  | 
  |  392 |     | 
                   }  | 
  |  393 |     | 
                     | 
  |  394 |    0 |                    return super.shouldPropertyBePopulatedInForm(requestParameterName, request);  | 
  |  395 |     | 
           }  | 
  |  396 |     | 
         | 
  |  397 |     | 
       public boolean shouldMethodToCallParameterBeUsed(String methodToCallParameterName, String methodToCallParameterValue, HttpServletRequest request) { | 
  |  398 |    0 |                if ("GET".equalsIgnoreCase(request.getMethod())) { | 
  |  399 |    0 |                        return true;  | 
  |  400 |     | 
               }  | 
  |  401 |    0 |                if (shouldPropertyBePopulatedInForm(methodToCallParameterName, request)) { | 
  |  402 |    0 |                        return true;  | 
  |  403 |     | 
               }  | 
  |  404 |    0 |                if (methodToCallParameterName != null && WebUtils.endsWithCoordinates(methodToCallParameterName)) { | 
  |  405 |    0 |                        methodToCallParameterName = methodToCallParameterName.substring(0, WebUtils.getIndexOfCoordinateExtension(methodToCallParameterName));  | 
  |  406 |    0 |                    if (shouldPropertyBePopulatedInForm(methodToCallParameterName, request)) { | 
  |  407 |    0 |                            return true;  | 
  |  408 |     | 
                   }  | 
  |  409 |     | 
               }  | 
  |  410 |    0 |                if (KNSConstants.METHOD_TO_CALL_PATH.equals(methodToCallParameterName)) { | 
  |  411 |    0 |                        if (shouldPropertyBePopulatedInForm(methodToCallParameterValue, request)) { | 
  |  412 |    0 |                                return true;  | 
  |  413 |     | 
                       }  | 
  |  414 |    0 |                        if (methodToCallParameterValue != null && WebUtils.endsWithCoordinates(methodToCallParameterName)) { | 
  |  415 |    0 |                                methodToCallParameterValue = methodToCallParameterValue.substring(0, WebUtils.getIndexOfCoordinateExtension(methodToCallParameterName));  | 
  |  416 |    0 |                                if (shouldPropertyBePopulatedInForm(methodToCallParameterValue, request)) { | 
  |  417 |    0 |                                    return true;  | 
  |  418 |     | 
                           }  | 
  |  419 |     | 
                       }  | 
  |  420 |     | 
               }  | 
  |  421 |    0 |                return false;  | 
  |  422 |     | 
       }  | 
  |  423 |     | 
     | 
  |  424 |     | 
             | 
  |  425 |     | 
     | 
  |  426 |     | 
     | 
  |  427 |     | 
           @Override  | 
  |  428 |     | 
           public void clearEditablePropertyInformation() { | 
  |  429 |    0 |                    super.clearEditablePropertyInformation();  | 
  |  430 |    0 |            }  | 
  |  431 |     | 
             | 
  |  432 |     | 
           public void setDerivedValuesOnForm(HttpServletRequest request) { | 
  |  433 |    0 |            }  | 
  |  434 |     | 
     | 
  |  435 |     | 
             | 
  |  436 |     | 
     | 
  |  437 |     | 
     | 
  |  438 |     | 
           @Override  | 
  |  439 |     | 
           public void reset(ActionMapping mapping, HttpServletRequest request) { | 
  |  440 |    0 |                    super.reset(mapping, request);  | 
  |  441 |    0 |                    if (extraButtons != null) { | 
  |  442 |    0 |                            extraButtons.clear();  | 
  |  443 |     | 
                   }  | 
  |  444 |     | 
                     | 
  |  445 |    0 |                    clearDisplayedMessages();  | 
  |  446 |    0 |            }  | 
  |  447 |     | 
     | 
  |  448 |     | 
             | 
  |  449 |     | 
     | 
  |  450 |     | 
     | 
  |  451 |     | 
           @Override  | 
  |  452 |     | 
           public void reset(ActionMapping mapping, ServletRequest request) { | 
  |  453 |    0 |                    super.reset(mapping, request);  | 
  |  454 |    0 |                    if (extraButtons != null) { | 
  |  455 |    0 |                            extraButtons.clear();  | 
  |  456 |     | 
                   }  | 
  |  457 |     | 
                     | 
  |  458 |    0 |                    clearDisplayedMessages();  | 
  |  459 |    0 |            }  | 
  |  460 |     | 
             | 
  |  461 |     | 
           private void clearDisplayedMessages() { | 
  |  462 |    0 |                    if (displayedErrors != null) { | 
  |  463 |    0 |                            displayedErrors.clear();  | 
  |  464 |     | 
                   }  | 
  |  465 |    0 |                    if (displayedWarnings != null) { | 
  |  466 |    0 |                            displayedWarnings.clear();  | 
  |  467 |     | 
                   }  | 
  |  468 |    0 |                    if (displayedInfo != null) { | 
  |  469 |    0 |                            displayedInfo.clear();  | 
  |  470 |     | 
                   }  | 
  |  471 |    0 |            }  | 
  |  472 |     | 
             | 
  |  473 |     | 
         | 
  |  474 |     | 
     | 
  |  475 |     | 
     | 
  |  476 |     | 
           public String getBackLocation() { | 
  |  477 |    0 |                    return this.backLocation;  | 
  |  478 |     | 
           }  | 
  |  479 |     | 
     | 
  |  480 |     | 
             | 
  |  481 |     | 
     | 
  |  482 |     | 
     | 
  |  483 |     | 
           public void setBackLocation(String backLocation) { | 
  |  484 |    0 |                    this.backLocation = backLocation;  | 
  |  485 |    0 |            }  | 
  |  486 |     | 
     | 
  |  487 |     | 
   }  |