Announcement

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

    ComboBoxItem - not showing list

    version:
    smartgwt-2.4
    GWT-2.2.0
    GAE-1.4.3

    Hi all,
    I make simple grid, but is not working.

    code:
    Code:
    public class TableInfo extends DynamicForm {
        private static final MysqlEditorInfoConstants CONSTANTS = GWT.create(MysqlEditorInfoConstants.class);
        private SelectItem collationBox;
        public TableInfo() {
            private ComboBoxItem collationBox;
            collationBox = new ComboBoxItem("collationBox", CONSTANTS.tableCollation_text());
            collationBox.setValueMap("Cat", "Dog", "Giraffe", "Goat", "Marmoset", "Mouse");
            collationBox.setHint(CONSTANTS.tableCollationHelp_text());
    		String[] values = CONSTANTS.mysqlEngineTypes_array();
    		LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
    
    		for (int i=0;i<values.length;i++) {
    			valueMap.put(i+"", values[i]);
    		}
    		collationBox.setValueMap(valueMap);
    	collationBox.setShowHint(true);
    	collationBox.setWidth(200);
    	setFields(new FormItem[] { nameItem, collationBox, engineBox, commentArea});
        }
    }
    public interface MysqlEditorInfoConstants extends Constants {
    	String[] mysqlEngineTypes_array();
    }
    MysqlEditorInfoConstants.properties :
    mysqlEngineTypes_array=MEMORY\\,MyISAM\\,BLACKHOLE\\,MRG_MYISAM\\,CSV\\,ARCHIVE\\,InnoDB

    when I run it, all fields is in one line. look here http://2.2ajtaci.appspot.com/
    can you tell me what I do wrong ?

    Im try it with
    Code:
    collationBox.setValueMap(CONSTANTS.mysqlEngineTypes_array());
    but result is same,

    thanks
    Last edited by tito100; 30 Apr 2011, 05:04.

    #2
    Im do it.

    mysqlEngineTypes_array=MEMORY\,MyISAM\,BLACKHOLE\,MRG_MYISAM\,CSV\,ARCHIVE\,InnoDB
    engineBox.setValueMap((String[])CONSTANTS.mysqlEngineTypes_array());
    http://3.2ajtaci.appspot.com/

    but when I run it in local server in eclipse, then collationBox is not showing.
    Last edited by tito100; 30 Apr 2011, 05:30.

    Comment

    Working...
    X