1 6 7 20 package org.wings.text; 21 22 import org.wings.SFormattedTextField; 23 import org.wings.script.JavaScriptListener; 24 25 31 public class SDefaultFormatter 32 extends SAbstractFormatter 33 { 34 37 public SDefaultFormatter() { 38 } 39 40 public Object stringToValue(String text) { 41 return text; 42 } 43 44 public String valueToString(Object value) { 45 return ""; 46 } 47 48 52 public JavaScriptListener generateJavaScript(SFormattedTextField field, boolean actionListener) { 53 if (actionListener) { 54 JavaScriptListener javaScriptListener = new JavaScriptListener("onchange", "submit()"); 55 return javaScriptListener; 56 } else { 57 return new JavaScriptListener("", ""); 58 } 59 } 60 } 61 | Popular Tags |