1 15 package org.apache.tapestry.valid; 16 17 import org.apache.tapestry.IMarkupWriter; 18 import org.apache.tapestry.IRequestCycle; 19 import org.apache.tapestry.form.IFormComponent; 20 21 28 public class MockDelegate extends ValidationDelegate 29 { 30 31 public void writeLabelPrefix(IFormComponent component, IMarkupWriter writer, IRequestCycle cycle) 32 { 33 writer.print("{LABEL-PREFIX}"); 34 } 35 36 public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle, 37 IFormComponent component, IValidator validator) 38 { 39 writer.attribute("class", "mock-delegate"); 40 } 41 42 public void writeLabelSuffix(IFormComponent component, IMarkupWriter writer, IRequestCycle cycle) 43 { 44 writer.print("{LABEL-SUFFIX}"); 45 } 46 47 public void writePrefix(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component, 48 IValidator validator) 49 { 50 writer.print("{PREFIX}"); 51 } 52 53 public void writeSuffix(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component, 54 IValidator validator) 55 { 56 writer.print("{SUFFIX}"); 57 } 58 } | Popular Tags |