package org.ovirt.engine.ui.webadmin.widget.label;

import org.ovirt.engine.ui.webadmin.widget.renderer.EmptyValueRenderer;

import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.TextBox;

public class TextBoxLabel extends TextBox {

    boolean handleEmptyValue;

    public TextBoxLabel() {
        setReadOnly(true);
        getElement().getStyle().setBorderWidth(0, Unit.PX);
        getElement().getStyle().setWidth(100, Unit.PCT);
    }

    public TextBoxLabel(String text) {
        super();
        setText(text);
    }

    public TextBoxLabel(boolean handleEmptyValue) {
        this();
        this.handleEmptyValue = handleEmptyValue;
    }

    @Override
    public void setText(String text) {
        String renderedText = new EmptyValueRenderer<String>(handleEmptyValue).render(text);
        super.setText(renderedText);
        super.setTitle(renderedText);
    }
}

@@ -818,24 +818,83 @@
 nder(text);%0A
+        renderedText = unEscapeRenderedText(renderedText);%0A
         supe
@@ -961,11 +961,168 @@
 );%0A    %7D
+%0A%0A    private String unEscapeRenderedText(String renderedText) %7B%0A        renderedText = renderedText.replace(%22&lt;%22, %22%3C%22);%0A        return renderedText;%0A    %7D
 %0A%7D%0A

Storage general subtab values (#782715)