[Yanel-commits] rev 48372 -
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Tue Mar 30 10:12:18 CEST 2010
Author: michi
Date: 2010-03-30 10:12:18 +0200 (Tue, 30 Mar 2010)
New Revision: 48372
Modified:
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
note re template added
Modified: public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2010-03-30 07:59:28 UTC (rev 48371)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2010-03-30 08:12:18 UTC (rev 48372)
@@ -335,21 +335,22 @@
/**
- *
+ * @see org.wyona.yanel.core.api.attributes.CreatableV2#create()
*/
public void create(HttpServletRequest request) {
+ log.debug("Create XML resource ...");
try {
- // TODO: XHTML template should not be hardcoded!
- Repository repo = getRealm().getRepository();
-
String title = request.getParameter("rp.title");
if (title == null || title.length() == 0) {
log.warn("No title has been specified!");
title = "No title has been specified!";
}
+ Repository repo = getRealm().getRepository();
Node newNode = org.wyona.yanel.core.util.YarepUtil.addNodes(repo, getPath().toString(), org.wyona.yarep.core.NodeType.RESOURCE);
Writer writer = new java.io.OutputStreamWriter(newNode.getOutputStream());
+
+ log.warn("TODO: Replace this hard-coded text by some template!");
writer.write("<?xml version=\"1.0\"?>");
writer.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
writer.write("<head>");
More information about the Yanel-commits
mailing list