KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > module > sitemesh > parser > rules > ParameterExtractingRule


1 package com.opensymphony.module.sitemesh.parser.rules;
2
3 import com.opensymphony.module.sitemesh.HTMLPage;
4 import com.opensymphony.module.sitemesh.html.BasicRule;
5 import com.opensymphony.module.sitemesh.html.Tag;
6
7 public class ParameterExtractingRule extends BasicRule{
8
9     private final HTMLPage page;
10
11     public ParameterExtractingRule(HTMLPage page) {
12         super("parameter");
13         this.page = page;
14     }
15
16     public void process(Tag tag) {
17         page.addProperty("page." + tag.getAttributeValue("name"), tag.getAttributeValue("value"));
18     }
19 }
20
Popular Tags