Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 967 → Rev 968

/kickup/trunk/src/ak/kickup/core/action/AdminParticipantAction.java
205,8 → 205,16
participant.setPrivateComment((String)theForm.get("privateComment"));
 
ParticipantManager.getInstance().save(participant);
if(newParticipant)
Messages.sendRegistrationMessage(participant, null);
if(newParticipant) {
try {
Messages.sendRegistrationMessage(participant, null);
}
catch(Exception ex) {
request.setAttribute("event", event);
initLists(request, event);
throw ex;
}
}
 
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl());
return null;
/kickup/trunk/src/ak/kickup/core/action/ActAction.java
0,0 → 1,63
package ak.kickup.core.action;
 
import java.util.List;
import java.util.Collections;
import java.util.ArrayList;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
 
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.DynaActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
 
import ak.strutsx.RequestUtilsX;
import ak.strutsx.ErrorHandlerX;
import ak.backpath.BackPath;
 
import ak.kickup.util.StringConverter;
import ak.kickup.util.UserException;
import ak.kickup.util.ModelSecurityException;
import ak.kickup.core.model.Participant;
import ak.kickup.core.model.ParticipantManager;
import ak.kickup.core.model.Event;
import ak.kickup.core.model.EventManager;
import ak.kickup.core.model.ParticipantAct;
import ak.kickup.core.model.EventAct;
import ak.kickup.core.mail.Messages;
 
public final class ActAction
extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
if("list".equals(mapping.getParameter())) {
DynaActionForm theForm = (DynaActionForm)form;
Long eventId = StringConverter.parseLong(theForm.get("event"));
Event event = EventManager.getInstance().get(eventId, true);
Long actId = StringConverter.parseLong(theForm.get("act"));
EventAct act = event.getAct(actId);
List list;
 
if(act == null) throw new UserException("ak.kickup.core.act.edit.id.wrong");
 
list = new ArrayList(ParticipantManager.getInstance().listForAct(act));
Collections.sort(list, ParticipantManager.ACT_NICK_COMPARATOR);
request.setAttribute("list", list);
request.setAttribute("event", event);
request.setAttribute("act", act);
 
return mapping.findForward("default");
}
else {
throw new Exception("unknown mapping parameter");
}
}
}
/kickup/trunk/src/ak/kickup/core/action/TransportAction.java
33,7 → 33,7
Long eventId = StringConverter.parseLong(theForm.get("event"));
Event event = EventManager.getInstance().get(eventId, true);
List list = new ArrayList(ParticipantManager.getInstance().listFreeTransport(event));
Collections.sort(list, ParticipantManager.NICK_COMPARATOR);
Collections.sort(list, ParticipantManager.FROM_ZIP_COMPARATOR);
request.setAttribute("participants", list);
request.setAttribute("event", event);
return mapping.findForward("default");
/kickup/trunk/src/ak/kickup/core/action/ParticipantAction.java
236,7 → 236,14
 
ParticipantManager.getInstance().save(participant);
 
Messages.sendRegistrationMessage(participant, request.getRemoteAddr());
try {
Messages.sendRegistrationMessage(participant, request.getRemoteAddr());
}
catch(Exception ex) {
request.setAttribute("event", event);
initLists(request, event);
throw ex;
}
 
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl());
return null;