01: package com.opensymphony.module.sitemesh.html.rules;
02:
03: import com.opensymphony.module.sitemesh.html.BasicRule;
04: import com.opensymphony.module.sitemesh.html.Tag;
05:
06: public class ParameterExtractingRule extends BasicRule {
07:
08: private final PageBuilder page;
09:
10: public ParameterExtractingRule(PageBuilder page) {
11: super ("parameter");
12: this .page = page;
13: }
14:
15: public void process(Tag tag) {
16: page.addProperty(
17: "page." + tag.getAttributeValue("name", false), tag
18: .getAttributeValue("value", false));
19: }
20: }
|