Announcement

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

    Bug: Appearance of FormItems in ToolStrips

    Hi,

    I tried latest SmartGwt 6.0 build from 09.04.2016. The form items do not appear correct in Toolstrip bars (see Screenshots).

    Thanks and best regards
    Andy



    Wrong Appearance of FormItems:
    Click image for larger version

Name:	toolBarWrong.png
Views:	174
Size:	4.3 KB
ID:	236774


    Correct appearance in previous builds (e.g. 05.04.2016, same code):

    Click image for larger version

Name:	toolBarCorrect.png
Views:	174
Size:	4.2 KB
ID:	236775

    Code:
                FormItem eventItem = new FormItem( "eventItem" );
                eventItem.setTitle( GWebAdmin.lang.filterEventByName() );
                eventItem.setTitleOrientation( TitleOrientation.TOP );
              
                FormItem checkIncludeFest = new FormItem( "checkIncludeFest" );
                checkIncludeFest.setTitle( "Show Fest");
                checkIncludeFest.setType( "boolean" );
                checkIncludeFest.setTitleOrientation( TitleOrientation.TOP );
                checkIncludeFest.setDefaultValue( false );
    
                ToolStrip toolBarTop = new ToolStrip();
                toolBarTop.setWidth100();
    
                toolBarTop.addFormItem( eventItem );
                toolBarTop.addFormItem( checkIncludeFest );
    
                toolBarTop.draw();

    #2
    Ok I found a solution... replacing "FormItem" against CheckboxItem worked.... I do not know why I used FormItems... anyway it works.

    Code:
    CheckboxItem checkIncludeIndicators = new CheckboxItem( "checkIncludeIndicators" );
                checkIncludeIndicators.setTitle( GWebAdmin.lang.includeIndicators() );
                checkIncludeIndicators.setTitleOrientation( TitleOrientation.TOP );
                checkIncludeIndicators.setDefaultValue( false );
    ​

    Comment


      #3
      We've applied a fix to SGWT 6.0p/SC 11.0p and newer to address this, which will be the nightly builds dated 2016-04-15 and beyond.

      Note that creating the specific SGWT wrapper type if you know it, as you show in your second post, is actually better than the first approach because with just the FormItem wrapper, you don't have access to any of the SGWT APIs from the Java subclass (CheckboxItem in this case) corresponding to the live JS object.

      Comment


        #4
        yeah I know, I do not know why I have chosen the first approach.... anyway... thanks!!!

        Comment

        Working...
        X