public GenerateWidget() {
    buttonPanel = new HorizontalPanel();
    generatebutton = new Button("Generate Report");
    buttonPanel.add(generatebutton);

    generatebutton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            generatePdf();
          }
        });
    initWidget(buttonPanel);
    Controller.getInstance().addPdfObserver(this);
  }
 private void generatePdf() {
   Controller.getInstance().generatePdf();
 }