# Revision history [back]

### unable to set style to DecoratingComponent

I have created a HtmlNativeComponent("button"), when I apply style to this component for the first time it works fine, but when I re-try to apply style to it without re-loading page, then the component doesn't remain HtmlNativeComponent component rather it changes to StubComponent and even after getting the object of StubComponent and applying style to it doesn't sets the style to button.

Here is the code for that

            if (menuGroup != null) {
child.setStubonly(false);
child.setDynamicProperty("style", style);
child.setAttribute("style", style);
}
}


Is there any way to do this.

### unable to set style to DecoratingComponent

I have created a HtmlNativeComponent("button"), when I apply style to this component for the first time it works fine, but when I re-try to apply style to it without re-loading page, then the component doesn't remain HtmlNativeComponent component rather it changes to StubComponent and even after getting the object of StubComponent and applying style to it doesn't sets the style to button.

Here is the code for that

            if (menuGroup != null) {
child.setStubonly(false);
child.setDynamicProperty("style", style);
child.setAttribute("style", style);
}
}


Is there any way to do this.

### unable to set style to DecoratingComponent

I have created a HtmlNativeComponent("button"), when I apply style to this component for the first time it works fine, but when I re-try to apply style to it without re-loading page, then the component doesn't remain HtmlNativeComponent component rather it changes to StubComponent and even after getting the object of StubComponent and applying style to it doesn't sets the style to button.

Here is the code for that

            if (menuGroup != null) {
child.setStubonly(false);
child.setDynamicProperty("style", style);