Skip to content
This repository
Browse code

Merge pull request #33 from codeconsole/sm2tagrules

Fix Sm2 Tag rules.
  • Loading branch information...
commit 87105e6f92eba2f8b74a7ce7def2ac3afb87f271 2 parents a1f7280 + a4ab6bd
Scott Murphy authored April 03, 2012
5  sitemesh/src/main/java/org/sitemesh/content/tagrules/html/FramesetRule.java
@@ -4,6 +4,8 @@
4 4
 import org.sitemesh.tagprocessor.Tag;
5 5
 import org.sitemesh.content.ContentProperty;
6 6
 
  7
+import java.io.IOException;
  8
+
7 9
 /**
8 10
  * Identifies whether a page contains frames (as these would typically
9 11
  * have different rules for decoration - i.e. none).
@@ -20,8 +22,9 @@ public FramesetRule(ContentProperty propertyToExport) {
20 22
     }
21 23
 
22 24
     @Override
23  
-    public void process(Tag tag) {
  25
+    public void process(Tag tag) throws IOException {
24 26
         propertyToExport.setValue("true");
  27
+        tag.writeTo(tagProcessorContext.currentBuffer());
25 28
     }
26 29
 
27 30
 }
5  sitemesh/src/main/java/org/sitemesh/content/tagrules/html/HtmlAttributesRule.java
@@ -4,6 +4,8 @@
4 4
 import org.sitemesh.tagprocessor.Tag;
5 5
 import org.sitemesh.content.ContentProperty;
6 6
 
  7
+import java.io.IOException;
  8
+
7 9
 /**
8 10
  * Exports any attributes on the <code>&lt;html&gt;</code> tag
9 11
  * as page properties.
@@ -19,12 +21,13 @@ public HtmlAttributesRule(ContentProperty propertyToExport) {
19 21
     }
20 22
 
21 23
     @Override
22  
-    public void process(Tag tag) {
  24
+    public void process(Tag tag) throws IOException {
23 25
         if (tag.getType() == Tag.Type.OPEN) {
24 26
             for (int i = 0; i < tag.getAttributeCount(); i++) {
25 27
                 propertyToExport.getChild(tag.getAttributeName(i)).setValue(tag.getAttributeValue(i));
26 28
             }
27 29
         }
  30
+        tag.writeTo(tagProcessorContext.currentBuffer());
28 31
     }
29 32
 
30 33
 }

0 notes on commit 87105e6

Please sign in to comment.
Something went wrong with that request. Please try again.