Пример #1
0
 /** @return registration status text. */
 public String getStatusText() {
   if (registration.getStatus() == RegistrationStatus.NOT_STARTED) {
     return registration.getStatus().getDisplay();
   }
   String[] args = {registration.getStatus().getDisplay(), getStatusDateDisplay()};
   return action.getText("registration.status.with.date", args);
 }
Пример #2
0
 @Override
 public String intercept(ActionInvocation invocation) throws Exception {
   Object action = invocation.getAction();
   try {
     return invocation.invoke();
   } catch (XHRuntimeException xhe) {
     if (action instanceof ActionSupport) {
       ActionSupport as = (ActionSupport) action;
       String error = as.getText("error." + xhe.getCode());
       as.addActionError(error);
     }
     logger.error("Action XHRuntimeException.", xhe);
   }
   return "exception";
 }
Пример #3
0
 /** @return invitation status text with date. */
 public String getInvitationStatusText() {
   String key = registration.getInvitation().getInvitationStatus().getKey() + ".with.date";
   String[] args = {dateFormat.format(registration.getInvitation().getInvitationChangeDate())};
   return action.getText(key, args);
 }
Пример #4
0
 /**
  * @param action action to help with formated strings
  * @param reg the registration for this row.
  */
 Row(ActionSupport action, AbstractProtocolRegistration reg) {
   this.registration = reg;
   this.action = action;
   dateFormat =
       new SimpleDateFormat(action.getText("date.format.timestamp"), Locale.getDefault());
 }