here I got a problem with the setId of a window at the time of getId in order to retrieve the window name in a loop. Here is a snippet:
int counter1 =1;
final Integer counter = new Integer(counter1);
windowDoneTextButton.addSelectHandler(new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
if (counter <= 100) {
window.setId(new Integer(counter).toString());
windowQuestionVerticalLayoutContainer.setId(new Integer(counter).toString());
window.hide();
addItemSplitButton.removeFromParent();
Label questionTitleLabelOfWindowQuestionTextField = new Label();
questionTitleLabelOfWindowQuestionTextField.setText(windowQuestionTextField.getValue());
Label questionHelpTextLabelOfWindowQuestionHelpTextTextField = new Label();
questionHelpTextLabelOfWindowQuestionHelpTextTextField.setText(windowQuestionHelpTextTextField.getValue());
FormPanel editFormPanel = new FormPanel();
HorizontalPanel editHorizontalPanel = new HorizontalPanel();
TextButton editButton = new TextButton();
editButton.addSelectHandler(new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
addItemSplitButton.removeFromParent();
window.show();
homePageVerticalLayoutContainer.add(window);
homePageVerticalLayoutContainer.add(addItemSplitButton);
}
});