Announcement

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

    ComboBox Items displaying off screen

    Hello,
    I'm using SmartGWT version 3.0p from 07 Apr. 2012
    I have issues with combo boxes where the list items are displayed off-screen (see screenshot). It looks that it happens only when you have more than 50 items.
    This is a code to reproduce the problem:

    Code:
    DynamicForm form = new DynamicForm();
    SectionItem section = new SectionItem("dados");
    section.setDefaultValue("Dados gerais");
    ComboBoxItem combo = new ComboBoxItem("combobox", "Seleção");
    combo.setValueField("id");
    combo.setDisplayField("nome");
    combo.setOptionDataSource(DataSource.get("tipoOperacao"));
    section.setSectionExpanded(false);
    section.setItemIds("combobox");
    form.setItems(section, combo);
    form.draw();
    This is the code of the datasource:

    Code:
    <DataSource ID="tipoOperacao" tableName="S_TIPO_OPERACAO" serverConstructor="xx.xxx.xxxx.ds.XXXDataSource">
        <fields>  
            <field name="id"	nativeName="ID_TIPOOPERACAO"		type="sequence"   hidden="true"   primaryKey="true" />  
            <field name="nome"	nativeName="NM_TIPOOPERACAO"		type="text"       title="Nome"    length="80" >
            	<validators>
            		<validator type="serverCustom">  
                   	    <serverObject lookupStyle="new" className="xx.xxx.xxxx.validator.ValidatorXXXX" />  
                       	<errorMessage>$mensagem</errorMessage>  
                	</validator> 
            		<validator type="required" errorMessage="Campo obrigatório."/>
    	        </validators>
    	        <width>400</width>
            </field>
        </fields>
    </DataSource>
    Attached Files

    #2
    This looks unlikely to be a problem in the framework, and more likely to be some strange issue with code not shown or third-party widgets. Please:

    1. try the latest patched build

    2. make sure you can reproduce this in a clean project - one of the sample projects from the SDK - and not just in your application

    3. let us know whether the SectionItem is actually required to reproduce the problem

    4. if you still think this is a framework problem, show the code you use from #2

    Comment


      #3
      I have made tests with the above code putting it in onModuleLoad (as the only code, outside the application) and was able to reproduce the problem.

      Comment


        #4
        That's not the same as dropping it into a standard project, as there are many other things potentially going on. For one, your DataSource. This is also only 1 of the 4 points above.

        Comment


          #5
          I've edited BuiltinDS sample from latest SmartGWT 3.0p and the problem didn't occur. Do you have any hint of what could be wrong with in my application?

          PS: Here's the altered code in BuiltinDS EntryPoint:
          Code:
          ...
                          "<li>double-click a record in the grid to edit inline (press Return, or arrow/tab to another record, to save)</li>" +
                          "</ul>");
                  vStack.addMember(label);
                  
                  /* Início das alterações */
                  DynamicForm form = new DynamicForm();
                  ComboBoxItem combo = new ComboBoxItem("muitosRegistros");
                  combo.setValueField("itemID");
                  combo.setDisplayField("itemName");
                  combo.setOptionDataSource(DataSource.get("supplyItem"));
                  form.setItems(combo);
                  vStack.addMember(form);
                  /* Término das alterações */
          
                  boundList = new ListGrid();
                  boundList.setHeight(200);

          Comment


            #6
            We'd suggest looking into the following and removing these customizations to see what triggers the problem:

            1. any changes to the skin

            2. any third-party GWT modules you are inheriting

            3. any CSS you've added, including CSS possibly inherited from third-party modules

            4. your DOCTYPE setting on your .html file, especially if it's wrong (like declaring XHTML)

            5. any direct use of GWT APIs that affect the whole page, such as RootPanel

            Comment

            Working...
            X