Revision history [back]

click to hide/show revision 1
initial version

asked 2016-09-02 06:06:12 +0800

nirmalmandhata gravatar image nirmalmandhata flag of India

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

ActionMenuGroup menuGroup = (ActionMenuGroup) component;

            if (menuGroup != null) {
                menuGroup.setGroupStyle(style);
                if(menuGroup.getFirstChild() instanceof HtmlNativeComponent){
                    HtmlNativeComponent child = (HtmlNativeComponent) menuGroup.getFirstChild();
                    child.setStubonly(false);
                    child.setDynamicProperty("style", style);
                }else if(menuGroup.getFirstChild() instanceof AbstractComponent){
                    AbstractComponent child = (StubComponent) menuGroup.getFirstChild();
                    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

ActionMenuGroup menuGroup = (ActionMenuGroup) component;

            if (menuGroup != null) {
                menuGroup.setGroupStyle(style);
                if(menuGroup.getFirstChild() instanceof HtmlNativeComponent){
                    HtmlNativeComponent child = (HtmlNativeComponent) menuGroup.getFirstChild();
                    child.setStubonly(false);
                    child.setDynamicProperty("style", style);
                }else if(menuGroup.getFirstChild() instanceof AbstractComponent){
                    AbstractComponent child = (StubComponent) menuGroup.getFirstChild();
                    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

ActionMenuGroup menuGroup = (ActionMenuGroup) component;

            if (menuGroup != null) {
                menuGroup.setGroupStyle(style);
                if(menuGroup.getFirstChild() instanceof HtmlNativeComponent){
                    HtmlNativeComponent child = (HtmlNativeComponent) menuGroup.getFirstChild();
                    child.setStubonly(false);
                    child.setDynamicProperty("style", style);
                }else if(menuGroup.getFirstChild() instanceof AbstractComponent){
                    AbstractComponent child = (StubComponent) menuGroup.getFirstChild();
                    child.setAttribute("style", style);
                }
            }

Is there any way to do this.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More