Example usage for com.vaadin.v7.ui TextField setNullRepresentation

List of usage examples for com.vaadin.v7.ui TextField setNullRepresentation

Introduction

In this page you can find the example usage for com.vaadin.v7.ui TextField setNullRepresentation.

Prototype

public void setNullRepresentation(String nullRepresentation) 

Source Link

Document

Sets the null-string representation.

Usage

From source file:org.jpos.qi.components.QIFieldFactory.java

License:Open Source License

@Override
public <T extends Field> T createField(Class<?> dataType, Class<T> fieldType) {
    Field f;/*www  . j  a v a 2  s .c  o  m*/
    if (BigDecimal.class.equals(dataType)) {
        f = (Field) new BigDecimalField();
    } else {
        f = super.createField(dataType, fieldType);
    }
    if (f instanceof TextField) {
        TextField tf = (TextField) f;
        tf.setWidth("80%");
        tf.setNullRepresentation("");
        tf.setImmediate(true);
        return (T) tf;
    }
    return (T) f;
}