X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FCreateSonePage.java;h=719f4c634fa7390ec729fc8ea786456b756194da;hp=46302b033e4ec8e00af2bc83b0b3ad714e4a4960;hb=9e4db46b86d084eba9029906e779ec1d96f78ac4;hpb=d3b65841aac0702c8cb8a6ac2907792743ea3d2b diff --git a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java index 46302b0..719f4c6 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java @@ -30,8 +30,8 @@ import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.freenet.wot.OwnIdentity; import net.pterodactylus.sone.web.page.Page.Request.Method; import net.pterodactylus.util.logging.Logging; -import net.pterodactylus.util.template.DataProvider; import net.pterodactylus.util.template.Template; +import net.pterodactylus.util.template.TemplateContext; import freenet.clients.http.ToadletContext; /** @@ -94,10 +94,10 @@ public class CreateSonePage extends SoneTemplatePage { * {@inheritDoc} */ @Override - protected void processTemplate(Request request, DataProvider dataProvider) throws RedirectException { - super.processTemplate(request, dataProvider); + protected void processTemplate(Request request, TemplateContext templateContext) throws RedirectException { + super.processTemplate(request, templateContext); List ownIdentitiesWithoutSone = getOwnIdentitiesWithoutSone(webInterface.getCore()); - dataProvider.set("identitiesWithoutSone", ownIdentitiesWithoutSone); + templateContext.set("identitiesWithoutSone", ownIdentitiesWithoutSone); if (request.getMethod() == Method.POST) { String id = request.getHttpRequest().getPartAsStringFailsafe("identity", 44); OwnIdentity selectedIdentity = null; @@ -108,7 +108,7 @@ public class CreateSonePage extends SoneTemplatePage { } } if (selectedIdentity == null) { - dataProvider.set("errorNoIdentity", true); + templateContext.set("errorNoIdentity", true); return; } /* create Sone. */