1 package com.tonbeller.wcf.form; 2 3 import org.w3c.dom.Element ; 4 5 import com.tonbeller.wcf.component.FormListener; 6 import com.tonbeller.wcf.controller.RequestContext; 7 8 13 public class TestNodeHandler extends NodeHandlerSupport implements FormListener { 14 int renderCount = 0; 15 int revertCount = 0; 16 int validateCount = 0; 17 18 public void initialize(RequestContext context, XmlComponent comp, Element element) throws Exception { 19 super.initialize(context, comp, element); 20 comp.addFormListener(this); 21 } 22 23 public void render(RequestContext context) throws Exception { 24 super.render(context); 25 ++ renderCount; 26 } 27 28 public void revert(RequestContext context) { 29 ++ revertCount; 30 } 31 32 public boolean validate(RequestContext context) { 33 ++ validateCount; 34 return true; 35 } 36 37 } 38 | Popular Tags |