1 15 package org.apache.tapestry.form.translator; 16 17 import org.apache.tapestry.form.IFormComponent; 18 19 26 public class StringTranslator extends AbstractTranslator 27 { 28 29 private String _empty = null; 30 31 public StringTranslator() 32 { 33 } 34 35 37 public StringTranslator(String initializer) 38 { 39 super(initializer); 40 } 41 42 46 protected Object parseText(IFormComponent field, String text) 47 { 48 return text; 49 } 50 51 55 protected String formatObject(IFormComponent field, Object object) 56 { 57 return object.toString(); 58 } 59 60 public Object getEmpty() 61 { 62 return _empty; 63 } 64 65 public void setEmpty(String empty) 66 { 67 _empty = empty; 68 } 69 70 } 71 | Popular Tags |