Permalink
Browse files

Fix Sm2 Tag rules.

  • Loading branch information...
1 parent 62858f0 commit a4ab6bdc70ae4e636ad5104c5488a7a839655f4a @codeconsole codeconsole committed Apr 4, 2012
@@ -4,6 +4,8 @@
import org.sitemesh.tagprocessor.Tag;
import org.sitemesh.content.ContentProperty;
+import java.io.IOException;
+
/**
* Identifies whether a page contains frames (as these would typically
* have different rules for decoration - i.e. none).
@@ -20,8 +22,9 @@ public FramesetRule(ContentProperty propertyToExport) {
}
@Override
- public void process(Tag tag) {
+ public void process(Tag tag) throws IOException {
propertyToExport.setValue("true");
+ tag.writeTo(tagProcessorContext.currentBuffer());
}
}
@@ -4,6 +4,8 @@
import org.sitemesh.tagprocessor.Tag;
import org.sitemesh.content.ContentProperty;
+import java.io.IOException;
+
/**
* Exports any attributes on the <code>&lt;html&gt;</code> tag
* as page properties.
@@ -19,12 +21,13 @@ public HtmlAttributesRule(ContentProperty propertyToExport) {
}
@Override
- public void process(Tag tag) {
+ public void process(Tag tag) throws IOException {
if (tag.getType() == Tag.Type.OPEN) {
for (int i = 0; i < tag.getAttributeCount(); i++) {
propertyToExport.getChild(tag.getAttributeName(i)).setValue(tag.getAttributeValue(i));
}
}
+ tag.writeTo(tagProcessorContext.currentBuffer());
}
}

0 comments on commit a4ab6bd

Please sign in to comment.