    public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
        if (client.updateComponent(this, uidl, true)) {
            return;
        }
        this.client = client;
        uidlId = uidl.getId();
        maxValue = uidl.getIntAttribute(ATTR_MAX_VALUE);
        value = uidl.getDoubleAttribute(ATTR_VALUE);
        animated = uidl.getBooleanAttribute(ATTR_ANIMATED);
        immediate = uidl.getBooleanAttribute(ATTR_IMMEDIATE);
        disabled = uidl.getBooleanAttribute(ATTR_DISABLED);
        readonly = uidl.getBooleanAttribute(ATTR_READONLY);
        if (!disabled && !readonly) {
            sinkEvents(Event.ONCLICK);
            sinkEvents(Event.ONMOUSEOVER);
            sinkEvents(Event.ONMOUSEOUT);
            sinkEvents(Event.ONFOCUS);
            sinkEvents(Event.ONBLUR);
            sinkEvents(Event.ONKEYUP);
        }
        if (barDiv == null) {
            for (int i = 0; i < maxValue; i++) {
                DivElement starDiv = createStarDiv(i + 1);
                element.appendChild(starDiv);
                width += starDiv.getClientWidth();
                if (height < starDiv.getClientHeight()) {
                    height = starDiv.getClientHeight();
                }
            }
            barDiv = createBarDiv(height);
            element.appendChild(barDiv);
        } else {
            setBarWidth(calcBarWidth(value));
        }
        element.getStyle().setPropertyPx("width", width);
        element.getStyle().setPropertyPx("height", height);
    }

    public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
        if (client.updateComponent(this, uidl, true)) {
            return;
        }
        this.client = client;
        uidlId = uidl.getId();
        maxValue = uidl.getIntAttribute(ATTR_MAX_VALUE);
        value = uidl.getDoubleAttribute(ATTR_VALUE);
        animated = uidl.getBooleanAttribute(ATTR_ANIMATED);
        immediate = uidl.getBooleanAttribute(ATTR_IMMEDIATE);
        disabled = uidl.getBooleanAttribute(ATTR_DISABLED);
        readonly = uidl.getBooleanAttribute(ATTR_READONLY);
        if (!disabled && !readonly) {
            sinkEvents(Event.ONCLICK);
            sinkEvents(Event.ONMOUSEOVER);
            sinkEvents(Event.ONMOUSEOUT);
            sinkEvents(Event.ONFOCUS);
            sinkEvents(Event.ONBLUR);
            sinkEvents(Event.ONKEYUP);
        } else {
        	DOM.sinkEvents(getElement(), 0);
        }
        if (barDiv == null) {
            for (int i = 0; i < maxValue; i++) {
                DivElement starDiv = createStarDiv(i + 1);
                element.appendChild(starDiv);
                width += starDiv.getClientWidth();
                if (height < starDiv.getClientHeight()) {
                    height = starDiv.getClientHeight();
                }
            }
            barDiv = createBarDiv(height);
            element.appendChild(barDiv);
        } else {
            setBarWidth(calcBarWidth(value));
        }
        element.getStyle().setPropertyPx("width", width);
        element.getStyle().setPropertyPx("height", height);
    }
