如何在GXT中获取小部件的ID

时间:2013-03-05 18:51:19

标签: gxt

这里我在getId时遇到了一个窗口的setId问题,以便在循环中检索窗口名称。这是一个片段:

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);
                  }
              });

0 个答案:

没有答案