public QuestionResponseDialog(Long questionId) {
   super();
   this.questionId = questionId;
   // Set the dialog box's caption.
   setText(TEXT_CONSTANTS.questionResponses());
   setAnimationEnabled(true);
   setGlassEnabled(true);
   currentAnswers = new ArrayList<QuestionAnswerStoreDto>();
   changedAnswers = new HashMap<Long, QuestionAnswerStoreDto>();
   currentTextboxes = new ArrayList<TextBox>();
   cursorArray = new ArrayList<String>();
   statusLabel = new Label();
   surveyInstanceSvc = GWT.create(SurveyInstanceService.class);
   nextButton = new Button(TEXT_CONSTANTS.next());
   nextButton.setVisible(true);
   currentPage = 0;
   nextButton.addClickHandler(this);
   previousButton = new Button(TEXT_CONSTANTS.previous());
   previousButton.setVisible(false);
   previousButton.addClickHandler(this);
   paginationPanel = new HorizontalPanel();
   paginationPanel.add(previousButton);
   paginationPanel.add(nextButton);
   dataGrid = new Grid();
   contentPanel = new VerticalPanel();
   contentPanel.add(statusLabel);
   contentPanel.add(dataGrid);
   doneButton = new Button(TEXT_CONSTANTS.done());
   saveButton = new Button(TEXT_CONSTANTS.save());
   saveButton.addClickHandler(this);
   saveButton.setEnabled(false);
   clearButton = new Button(TEXT_CONSTANTS.discardChanges());
   clearButton.addClickHandler(this);
   clearButton.setEnabled(false);
   contentPanel.add(doneButton);
   doneButton.addClickHandler(this);
   setWidget(new ScrollPanel(contentPanel));
   loadResponses();
   setPopupPosition(Window.getClientWidth() / 5, Window.getClientHeight() / 5);
 }