1 16 17 18 package org.apache.velocity.tools.struts; 19 20 import org.apache.struts.action.ActionErrors; 21 22 50 public class ErrorsTool extends ActionMessagesTool 51 { 52 53 59 public void init(Object obj) 60 { 61 super.init(obj); 63 64 this.actionMsgs = StrutsUtils.getErrors(this.request); 65 } 66 67 68 78 public String getMsgs() 79 { 80 return getMsgs(null, null); 81 } 82 83 84 96 public String getMsgs(String property) 97 { 98 return getMsgs(property, null); 99 } 100 101 102 116 public String getMsgs(String property, String bundle) 117 { 118 return StrutsUtils.errorMarkup(property, bundle, request, 119 request.getSession(false), application); 120 } 121 122 123 130 public String getGlobalName() 131 { 132 return ActionErrors.GLOBAL_ERROR; 133 } 134 135 } 136 | Popular Tags |