projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use new template engine.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
CreateReplyPage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java
b/src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java
index
65e8e57
..
0b7e88f
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/CreateReplyPage.java
@@
-21,6
+21,7
@@
import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.web.page.Page.Request.Method;
import net.pterodactylus.util.template.Template;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.web.page.Page.Request.Method;
import net.pterodactylus.util.template.Template;
+import net.pterodactylus.util.template.TemplateContext;
/**
* This page lets the user post a reply to a post.
/**
* This page lets the user post a reply to a post.
@@
-49,11
+50,11
@@
public class CreateReplyPage extends SoneTemplatePage {
* {@inheritDoc}
*/
@Override
* {@inheritDoc}
*/
@Override
- protected void processTemplate(Request request, Template
template
) throws RedirectException {
- super.processTemplate(request, template);
+ protected void processTemplate(Request request, Template
Context templateContext
) throws RedirectException {
+ super.processTemplate(request, template
Context
);
String postId = request.getHttpRequest().getPartAsStringFailsafe("post", 36);
String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim();
String postId = request.getHttpRequest().getPartAsStringFailsafe("post", 36);
String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim();
- String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage",
64
);
+ String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage",
256
);
if (request.getMethod() == Method.POST) {
Post post = webInterface.getCore().getPost(postId);
if (text.length() > 0) {
if (request.getMethod() == Method.POST) {
Post post = webInterface.getCore().getPost(postId);
if (text.length() > 0) {
@@
-61,11
+62,11
@@
public class CreateReplyPage extends SoneTemplatePage {
webInterface.getCore().createReply(currentSone, post, text);
throw new RedirectException(returnPage);
}
webInterface.getCore().createReply(currentSone, post, text);
throw new RedirectException(returnPage);
}
- template.set("errorTextEmpty", true);
+ template
Context
.set("errorTextEmpty", true);
}
}
- template.set("postId", postId);
- template.set("text", text);
- template.set("returnPage", returnPage);
+ template
Context
.set("postId", postId);
+ template
Context
.set("text", text);
+ template
Context
.set("returnPage", returnPage);
}
}
}
}