Author: michiel
Date: 2009-11-11 17:38:02 +0100 (Wed, 11 Nov 2009)
New Revision: 39649
Modified:
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/WriteTag.java
mmbase/trunk/applications/taglib/src/main/xml/mmbase-taglib.xml
Log:
for the purpose of testing that mm:write can be used in junit tests as
mm:import added 'reset' attribute
Modified:
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/WriteTag.java
===================================================================
---
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/WriteTag.java
2009-11-11 16:37:32 UTC (rev 39648)
+++
mmbase/trunk/applications/taglib/src/main/java/org/mmbase/bridge/jsp/taglib/WriteTag.java
2009-11-11 16:38:02 UTC (rev 39649)
@@ -75,7 +75,11 @@
private boolean reset = false;
- void setReset(boolean reset) {
+ /**
+ * Like reset of mm:import. Mainly implemented for testing.
+ * @since MMBase-1.9.2
+ */
+ public void setReset(boolean reset) {
this.reset = reset;
}
@@ -136,6 +140,7 @@
helper.setValue(getObject());
if (getId() != null) {
+ //System.out.println("" + getId() + ":" + helper.getValue() + " "
+ reset);
getContextProvider().getContextContainer().register(getId(),
helper.getValue(), ! reset);
}
if (sessionVar != Attribute.NULL) {
Modified: mmbase/trunk/applications/taglib/src/main/xml/mmbase-taglib.xml
===================================================================
--- mmbase/trunk/applications/taglib/src/main/xml/mmbase-taglib.xml
2009-11-11 16:37:32 UTC (rev 39648)
+++ mmbase/trunk/applications/taglib/src/main/xml/mmbase-taglib.xml
2009-11-11 16:38:02 UTC (rev 39649)
@@ -4122,8 +4122,8 @@
<rtexprvalue>true</rtexprvalue>
<refercontext>true</refercontext>
<info>
- The key of the variable to get. If it is missing (and value is
- missing), then the parent Writer tag is written (if it exist).
+ The key of the variable to get. If it is missing (and value is
+ missing), then the parent Writer tag is written (if it exist).
</info>
</attribute>
<attribute>
@@ -4132,9 +4132,9 @@
<rtexprvalue>true</rtexprvalue>
<refercontext>true</refercontext>
<info>
- The value to write. In this you can use context variables with "$", the
advantage of this
- attribute above the referid attribute is that you can combine variables
and add some text of
- your own. The disadvantages relate to complexity and efficiency.
+ The value to write. In this you can use context variables with "$",
the advantage of this
+ attribute above the referid attribute is that you can combine
variables and add some text of
+ your own. The disadvantages relate to complexity and efficiency.
</info>
</attribute>
<attribute>
@@ -4183,6 +4183,13 @@
</info>
<since>MMBase-1.7.4</since>
</attribute>
+ <attribute>
+ <name>reset</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <see tag="import" attribute="reset" />
+ <since>MMBase-1.9.2</since>
+ </attribute>
<example><!-- write the variable `hoi' to the page -->
<mm:write referid="hoi" /></example>
<example><!-- Create a JSP-variable `greet' from context variable
`hoi', write
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs