* The Sone web interface
*/
public UnblockSonePage(Template template, WebInterface webInterface) {
- super("unblockSone.html", template, "Page.UnblockSone.Title", webInterface);
+ super("unblockSone.html", template, "Page.UnblockSone.Title", webInterface, true);
}
//
@Override
protected void processTemplate(Request request, Template template) throws RedirectException {
super.processTemplate(request, template);
- String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone", 36);
if (request.getMethod() == Method.POST) {
- getCurrentSone(request.getToadletContext()).removeBlockedSoneId(soneId);
+ String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone", 36);
+ String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64);
+ if (request.getMethod() == Method.POST) {
+ getCurrentSone(request.getToadletContext()).removeBlockedSoneId(soneId);
+ }
+ throw new RedirectException(returnPage);
}
- throw new RedirectException("viewSone.html?sone=" + soneId);
- }
-
- //
- // SONETEMPLATEPAGE METHODS
- //
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected boolean requiresLogin() {
- // TODO Auto-generated method stub
- return super.requiresLogin();
}
}