Project

General

Profile

Download (1.6 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2017 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.vaadin.component;
10

    
11
import com.vaadin.data.Property;
12
import com.vaadin.ui.TextField;
13

    
14
/**
15
 * TextField which has "" as null represnetation, fixed the ugly "null"s in the
16
 * default  TextField implementation in vaadin 7. TODO: this might no longer be
17
 * required in vaadin 8 since it is supposed to have a mechanism to configure
18
 * the null representations.
19
 *
20
 * @author a.kohlbecker
21
 * @since Dec 21, 2017
22
 *
23
 */
24
public class TextFieldNFix extends TextField {
25

    
26
    private static final long serialVersionUID = -7582619519894748364L;
27

    
28
    /**
29
     * @param format
30
     */
31
    public TextFieldNFix(String format) {
32
        super(format);
33
    }
34

    
35

    
36

    
37
    /**
38
     *
39
     */
40
    public TextFieldNFix() {
41
        super();
42
    }
43

    
44

    
45

    
46
    /**
47
     * @param dataSource
48
     */
49
    public TextFieldNFix(Property dataSource) {
50
        super(dataSource);
51
    }
52

    
53

    
54

    
55
    /**
56
     * @param caption
57
     * @param dataSource
58
     */
59
    public TextFieldNFix(String caption, Property dataSource) {
60
        super(caption, dataSource);
61
    }
62

    
63

    
64

    
65
    /**
66
     * @param caption
67
     * @param value
68
     */
69
    public TextFieldNFix(String caption, String value) {
70
        super(caption, value);
71
        // TODO Auto-generated constructor stub
72
    }
73

    
74

    
75

    
76
    /**
77
     * {@inheritDoc}
78
     */
79
    @Override
80
    public String getNullRepresentation() {
81
        return "";
82
    }
83

    
84

    
85

    
86
}
(10-10/10)