2010-12-01 57 views
1

我想通過傳遞一個字符串數組來創建一個ObjectChoiceField。它會創建下拉框並顯示第一個值,但在您點擊它時不會下拉。沒有錯誤。在9500 OS 5.0上測試。ObjectChoiceField沒有下降

 ocf = new ObjectChoiceField("", getProfessions("specialty_nurse.xml")); 
     profLabel = new LabelField("Please Choose a Profession"); 
     add(new LabelField("")); 
     add(profLabel); 
     add(new SeparatorField()); 
     ChoiceListener myChoiceListener = new ChoiceListener(); 
     ocf.setChangeListener(myChoiceListener); 
     add(ocf); 
+0

愚蠢的問題:你確定你的字符串數組包含多個元素? – Thomas 2010-12-01 23:13:57

回答

1

已解決。 navigationClick()方法被覆蓋,所以我必須檢查ObjectChoiceField的點擊。如果有人需要,我會發布代碼。謝謝!