first commit
This commit is contained in:
28
hrmsEjb/org/apache/struts/util/ErrorMessages.java
Normal file
28
hrmsEjb/org/apache/struts/util/ErrorMessages.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package org.apache.struts.util;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
public class ErrorMessages {
|
||||
private Vector errors = new Vector();
|
||||
|
||||
public void addError(String key) {
|
||||
this.errors.addElement(key);
|
||||
}
|
||||
|
||||
public String getError(int index) {
|
||||
return this.errors.elementAt(index);
|
||||
}
|
||||
|
||||
public String[] getErrors() {
|
||||
if (this.errors.size() > 0) {
|
||||
String[] array = new String[this.errors.size()];
|
||||
this.errors.copyInto((Object[])array);
|
||||
return array;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return this.errors.size();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user