PDA

View Full Version : Not able to focus on the suggestion box



satish.bodduna
16 Oct 2012, 9:53 AM
Since we are using 2.2.4 Gxt version to developing web application. We have a requirement to automatically focus on suggestion box which is placed on top of Dialog box (popup box). I tried below code to implement but it is not working as expected. Could you please help me. Thanks in Advance.

final DialogBox orderForDialog = new DialogBox();
final FlexTable orderForTable = new FlexTable();
final FlexTable cnfrmAndCancelFlexTable = new FlexTable();

cnfrmAndCancelFlexTable.setStyleName("uienr-delgFlexTable");
orderForDialog.setModal(false);
orderForDialog.setGlassEnabled(true);

SearchDelegateUserOracle popupOracleDialogBox = new SearchDelegateUserOracle();
final SuggestBox popupSuggestBox = new SuggestBox(popupOracleDialogBox);
popupSuggestBox.setStyleName("uienr-SuggestBoxPopup");

orderForTable.setWidget(3, 0, popupSuggestBox);
orderForDialog.add(orderForTable);
orderForDialog.center();
orderForDialog.show();
popupSuggestBox.setFocus(true);