freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [07/36] incubator-freemarker git commit: FREEMARKER-55: Adding javadocs
Date Wed, 13 Sep 2017 09:49:08 GMT
FREEMARKER-55: Adding javadocs


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/63f42c3d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/63f42c3d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/63f42c3d

Branch: refs/heads/3
Commit: 63f42c3dfcb06b7873e7aec58c90894e8b291ced
Parents: 2de73b0
Author: Woonsan Ko <woonsan@apache.org>
Authored: Wed Aug 30 09:21:55 2017 -0400
Committer: Woonsan Ko <woonsan@apache.org>
Committed: Wed Aug 30 09:21:55 2017 -0400

----------------------------------------------------------------------
 .../model/AbstractSpringTemplateDirectiveModel.java |  3 +++
 .../freemarker/spring/model/BindDirective.java      | 16 ++++++++++++++++
 2 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/63f42c3d/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/AbstractSpringTemplateDirectiveModel.java
----------------------------------------------------------------------
diff --git a/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/AbstractSpringTemplateDirectiveModel.java
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/AbstractSpringTemplateDirectiveModel.java
index 1c5332b..e1b34b4 100644
--- a/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/AbstractSpringTemplateDirectiveModel.java
+++ b/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/AbstractSpringTemplateDirectiveModel.java
@@ -38,6 +38,9 @@ import org.springframework.web.servlet.support.BindStatus;
 import org.springframework.web.servlet.support.RequestContext;
 import org.springframework.web.servlet.view.AbstractTemplateView;
 
+/**
+ * Abstract TemplateDirectiveModel for derived classes to support Spring MVC based templating
environment.
+ */
 public abstract class AbstractSpringTemplateDirectiveModel implements TemplateDirectiveModel
{
 
     // TODO: namespace this into 'spring.nestedPath'??

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/63f42c3d/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/BindDirective.java
----------------------------------------------------------------------
diff --git a/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/BindDirective.java
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/BindDirective.java
index d7967c8..b4b8ad9 100644
--- a/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/BindDirective.java
+++ b/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/BindDirective.java
@@ -35,6 +35,22 @@ import org.apache.freemarker.core.util.CallableUtils;
 import org.apache.freemarker.core.util.StringToIndexMap;
 import org.springframework.web.servlet.support.RequestContext;
 
+/**
+ * Provides <code>TemplateModel</code> wrapping <code>BindStatus</code>
for the given bind path, working similarly
+ * to Spring Framework's <code>&lt;spring:bind /&gt;</code> JSP Tag Library.
+ * <P>
+ * This directive supports the following parameters:
+ * <UL>
+ * <LI><code>ignoreNestedPath</code>: Set whether to ignore a nested path,
if any. <code>false</code> by default.</LI>
+ * <LI><code>path</code>: The path to the bean or bean property to bind
status information for.</LI>
+ * </UL>
+ * </P>
+ * <P>
+ * <EM>Note:</EM> Unlike Spring Framework's <code>&lt;spring:bind /&gt;</code>
JSP Tag Library, this directive
+ * does not support <code>htmlEscape</code> parameter. It always has <code>BindStatus</code>
not to escape HTML's
+ * because it is much easier to control escaping in FreeMarker Template expressions rather
than depending on directives.
+ * </P>
+ */
 public class BindDirective extends AbstractSpringTemplateDirectiveModel {
 
     private static final int PATH_PARAM_IDX = 0;


Mime
View raw message