After analyzing the Mailreader2 application, I cannot figure out these
three lines of the Welcome.java file, full class below:
String message = getText(Constants.ERROR_DATABASE_MISSING);
if (Constants.ERROR_DATABASE_MISSING.equals(message)) {
addActionError(Constants.ERROR_MESSAGES_NOT_LOADED);
}
Wouldn't we always be adding an ActionError? Does getText do something
that I am not seeing in the API?
Thanks,
########
The Welcome Action class
package mailreader2;
public class Welcome extends MailreaderSupport {
public String execute() {
// Confirm message resources loaded
String message = getText(Constants.ERROR_DATABASE_MISSING);
if (Constants.ERROR_DATABASE_MISSING.equals(message)) {
addActionError(Constants.ERROR_MESSAGES_NOT_LOADED);
}
// Confirm database loaded
if (null==getDatabase()) {
addActionError(Constants.ERROR_DATABASE_NOT_LOADED);
}
if (hasErrors()) {
return ERROR;
}
else {
return SUCCESS;
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]