summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2015-05-12 07:23:54 -0700
committerJesse Morgan <jesse@jesterpm.net>2015-05-12 07:23:54 -0700
commitd4e0c770e3a79e5f36ce974f3ed4dd4834639f4f (patch)
treeb0e5399e5402ecee9357b4a93432486d3f985fb8 /src
parent0651218eb462765d75ed8c43fc2f90275dedf568 (diff)
Fixing undefined reference to config on error page.
Diffstat (limited to 'src')
-rw-r--r--src/com/p4square/fmfacade/FreeMarkerPageResource.java8
-rw-r--r--src/com/p4square/grow/frontend/GrowFrontend.java3
2 files changed, 6 insertions, 5 deletions
diff --git a/src/com/p4square/fmfacade/FreeMarkerPageResource.java b/src/com/p4square/fmfacade/FreeMarkerPageResource.java
index c6cf81e..8c8948a 100644
--- a/src/com/p4square/fmfacade/FreeMarkerPageResource.java
+++ b/src/com/p4square/fmfacade/FreeMarkerPageResource.java
@@ -31,10 +31,11 @@ import com.p4square.session.Sessions;
public class FreeMarkerPageResource extends ServerResource {
private static Logger cLog = Logger.getLogger(FreeMarkerPageResource.class);
- public static Map<String, Object> baseRootObject(Context context) {
+ public static Map<String, Object> baseRootObject(final Context context, final FMFacade fmf) {
Map<String, Object> root = new HashMap<String, Object>();
root.put("get", new GetMethod(context.getClientDispatcher()));
+ root.put("config", fmf.getConfig());
return root;
}
@@ -72,12 +73,11 @@ public class FreeMarkerPageResource extends ServerResource {
* @return A map of objects and methods for the template to access.
*/
protected Map<String, Object> getRootObject() {
- Map<String, Object> root = baseRootObject(getContext());
+ Map<String, Object> root = baseRootObject(getContext(), mFMF);
root.put("attributes", getRequestAttributes());
root.put("query", getQuery().getValuesMap());
- root.put("config", mFMF.getConfig());
-
+
if (getClientInfo().isAuthenticated()) {
final User user = getClientInfo().getUser();
final Map<String, String> userMap = new HashMap<String, String>();
diff --git a/src/com/p4square/grow/frontend/GrowFrontend.java b/src/com/p4square/grow/frontend/GrowFrontend.java
index 37d4984..1d221cc 100644
--- a/src/com/p4square/grow/frontend/GrowFrontend.java
+++ b/src/com/p4square/grow/frontend/GrowFrontend.java
@@ -77,7 +77,8 @@ public class GrowFrontend extends FMFacade {
public synchronized void start() throws Exception {
Template errorTemplate = getTemplate("templates/error.ftl");
if (errorTemplate != null) {
- ErrorPage.setTemplate(errorTemplate, FreeMarkerPageResource.baseRootObject(getContext()));
+ ErrorPage.setTemplate(errorTemplate,
+ FreeMarkerPageResource.baseRootObject(getContext(), this));
}
super.start();