Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #33 from codeconsole/sm2tagrules

Fix Sm2 Tag rules.
  • Loading branch information...
commit 87105e6f92eba2f8b74a7ce7def2ac3afb87f271 2 parents a1f7280 + a4ab6bd
@codeconsole codeconsole authored
View
5 sitemesh/src/main/java/org/sitemesh/content/tagrules/html/FramesetRule.java
@@ -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());
}
}
View
5 sitemesh/src/main/java/org/sitemesh/content/tagrules/html/HtmlAttributesRule.java
@@ -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());
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.