Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    LinkItem base style smartGWT5.0p

    Hello.
    When upgrading to smartGWT5 I have noticed that the LinkItem default css class style is now staticTextItemDisabled.

    from the smartGWT showcase (http://www.smartclient.com/smartgwt/...ntrols_various) I can see with firebug the following for the LinkItem:

    Code:
    <div id="isc_GN" class="staticTextItemDisabled" style="min-width:146px;min-height:36px;white-space:nowrap;" $89="isc_LinkItem_1">
    The code that creates this item in the showcase is:

    Code:
    LinkItem linkItem = new LinkItem("link");  
            linkItem.setTitle("LinkItem");  
            linkItem.setLinkTitle("<br>Click Me<br>");  
            linkItem.setHeight(36);  
            linkItem.addClickHandler(new ClickHandler() {  
                public void onClick(ClickEvent event) {  
                    SC.say("Hello World");  
                }  
            });
    Is this intended? If so, how can I modify it so that the base style is not "staticTextItemDisabled" but rather "staticTextItem"? And in this case, if I disable the link, will it then apply the "disabled" suffix to the item base style?

    #2
    Style naming was normalized as part of the introduction of formItem.readOnlyDisplay. The new style sets more accurately reflect the state of the FormItems.

    Rather than attempting to prevent the Disabled suffix, if you have modified styles from a previous version, you should just modify the new style names in a corresponding way.

    Comment


      #3
      I do not understand how that solution will help me.
      The style that is applied to LinkItem is "staticTextItem" independently of if I change properties of any other new style or not.
      Or did I understand you wrong?

      Comment


        #4
        You previously said "staticTextItem" previously "staticTextItemDisabled". Can you explain what style you were expecting, and why? Please also indicate what state you have the component is (see docs about readOnlyDisplay) and whether you have applied custom styles.

        Comment


          #5
          I am expecting the style applied to be "staticTextItem" and not "staticTextItemDisabled" as it is currently applied. I have tried to use the new property "readOnlyDisplay" to no avail.

          Additionally, if I do now linkItem.disable() I will end up with an applied style called staticTextItemDisabledDisabled; this style is not defined on the original css file.

          So the initial question remains, is this intended?
          This means I am forced to define a new style called staticTextItemDisabledDisabled?

          Comment


            #6
            No, that was a bug, which is now fixed - please retest with a build dated April 9 or later.

            Comment

            Working...
            X