Hello,
We are having an issue with DynamicForms and being able to tab to the form buttons. Basically, the buttons just kept skipped over in the tab cycle.
The SmartGWT version is Pro 3.1 (Nightly Build 2013-02-08).
It is happening on all browsers.
Here is a sample form where the buttons do not get tab stops. The form is built up and shown in the getNewUserInformation method, and there are two buttons, Submit and Cancel, wrapped in a CanvasItem.
Thanks a lot.
We are having an issue with DynamicForms and being able to tab to the form buttons. Basically, the buttons just kept skipped over in the tab cycle.
The SmartGWT version is Pro 3.1 (Nightly Build 2013-02-08).
It is happening on all browsers.
Here is a sample form where the buttons do not get tab stops. The form is built up and shown in the getNewUserInformation method, and there are two buttons, Submit and Cancel, wrapped in a CanvasItem.
Thanks a lot.
Code:
public class PopupWindow extends Window { private Canvas bodyCanvas; private String title; public PopupWindow(String title, Canvas bodyCanvas) { this.title = title; this.bodyCanvas = bodyCanvas; doLayout(); } private void doLayout() { this.setWidth(500); this.setHeight(200); this.setShowResizer(false); this.setShowShadow(true); this.setShadowDepth(10); this.setDismissOnEscape(true); this.setIsModal(true); this.setKeepInParentRect(true); this.setAutoCenter(true); this.setShowMinimizeButton(false); this.setTitle(title); this.addItem(bodyCanvas); } public static void getNewUserInformation() { final DynamicForm userForm = new DynamicForm(); userForm.setWidth100(); userForm.setTitleWidth(200); // pwdForm.setMargin(30); userForm.setSaveOnEnter(true); SpacerItem spacer = new SpacerItem(); spacer.setHeight(20); final TextItem userName = new TextItem("userName", "User name"); userName.setLength(30); userName.setWidth(200); userName.setRequired(true); final TextItem userEmail = new TextItem("userEmail", "Email address"); userEmail.setLength(50); userEmail.setWidth(200); userEmail.setRequired(true); SelectItem roleSelectItem = new SelectItem("roleID", "Assigned role"); roleSelectItem.setWidth(200); roleSelectItem.setRequired(true); final PasswordItem passwordItem = new PasswordItem("userPassword", "Password"); passwordItem.setWidth(200); passwordItem.setRequired(true); CanvasItem buttonCanvasItem = new CanvasItem("buttonCanvas", ""); HLayout buttonLayout = new HLayout(); buttonLayout.setHeight(40); buttonCanvasItem.setCanvas(buttonLayout); buttonCanvasItem.setCanFocus(true); final Button submitButton = new Button(); submitButton.setTitle("Submit"); buttonLayout.addMember(submitButton); LayoutSpacer spacerRightOfFirstButton = new LayoutSpacer(); spacerRightOfFirstButton.setWidth(20); buttonLayout.addMember(spacerRightOfFirstButton); Button cancelButton = new Button(); cancelButton.setTitle("Cancel"); buttonLayout.addMember(cancelButton); userForm.setFields(spacer, userName, createRowSpacer(10), userEmail, createRowSpacer(10), roleSelectItem, createRowSpacer(10), passwordItem, createRowSpacer(10), buttonCanvasItem); final PopupWindow newUserWindow = new PopupWindow( "New User Details", userForm); newUserWindow.setHeight(270); // Window close handler newUserWindow.addCloseClickHandler(new CloseClickHandler() { @Override public void onCloseClick(CloseClickEvent event) { newUserWindow.destroy(); } }); // Submit button handler submitButton .addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { @Override public void onClick( com.smartgwt.client.widgets.events.ClickEvent event) { if (userForm.validate()) { newUserWindow.destroy(); } } }); // Cancel button handler cancelButton .addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { @Override public void onClick( com.smartgwt.client.widgets.events.ClickEvent event) { newUserWindow.destroy(); } }); // Handle Enter key userForm.addSubmitValuesHandler(new SubmitValuesHandler() { @Override public void onSubmitValues(SubmitValuesEvent event) { if (userForm.validate()) { newUserWindow.destroy(); } } }); newUserWindow.show(); } public static RowSpacerItem createRowSpacer(Integer height) { RowSpacerItem rowSpacer = new RowSpacerItem(); rowSpacer.setHeight(height); return rowSpacer; } }