Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.temp.client.foundation.widget.input.support;

import com.google.gwt.event.dom.client.*;
import com.google.gwt.event.shared.*;
import com.temp.client.foundation.widget.input.fieldsupport.*;
import com.temp.client.foundation.widget.input.support.*;
import com.temp.shared.utils.*;

public class TextBoxBaseValueAdapter implements InputWidgetValueAdapter<String>
{

    private final ActiveTextBoxBase inputWidget;

    public TextBoxBaseValueAdapter(ActiveTextBoxBase inputWidget) {
        Validate.notNull("inputWidget", this.inputWidget = inputWidget);
    }

    @Override
    public HandlerRegistration addChangeHandler(ChangeHandler handler) {
        return inputWidget.addChangeHandler(handler);
    }

    @Override
    public String getValue() {
        return StringUtils.deNull(inputWidget.getText()).trim();
    }

    @Override
    public void setValue(String value) {
        inputWidget.setText(StringUtils.deNull(value).trim());
    }
}

Commits for litesoft/trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/input/support/TextBoxBaseValueAdapter.java

Diff revisions: vs.
Revision Author Commited Message
626 GeorgeS picture GeorgeS Wed 11 Apr, 2012 19:39:41 +0000