@Override
 public void dispose() {
   window.clear();
   window.removeFromParent();
   window = null;
   validate = null;
   cancel = null;
   targetListWidget = null;
   resourceListWidget = null;
 }
  @Override
  public void init() {
    FlowPanel mainPanel = new FlowPanel();

    GroupBoxPanel generalBox = new GroupBoxPanel();
    mainPanel.add(generalBox);

    FlowPanel contentPanel = new FlowPanel();
    contentPanel.addStyleName("BlocCreationViewHeader");
    generalBox.add(contentPanel);

    name = new LabelMarkup();
    contentPanel.add(name);
    contentPanel.add(new LabelMarkup("Commentaire:"));
    comment = new TextArea();
    contentPanel.add(comment);

    GroupBoxPanel iPanel = new GroupBoxPanel();
    iPanel.setText("Serveurs");
    mainPanel.add(iPanel);
    targetListWidget = new NewTargetListWidget(Boolean.FALSE);
    iPanel.add(targetListWidget);

    iPanel = new GroupBoxPanel();
    iPanel.setText("Ressources");
    mainPanel.add(iPanel);
    resourceListWidget = new NewTargetListWidget(Boolean.TRUE);
    iPanel.add(resourceListWidget);

    FlowPanel actionsPanel = new FlowPanel();
    mainPanel.add(actionsPanel);

    cancel = new AnchorButton("Annuler");
    cancel.addStyleName("button_delete");
    cancel.setTitle("Annuler");
    actionsPanel.add(cancel);

    validate = new AnchorButton("Valider");
    validate.addStyleName("button_ok");
    validate.setTitle("Valider les changements");
    actionsPanel.add(validate);

    window = new WindowPopup();
    window.getContent().add(mainPanel);
    window.setCaption("Nouvelle Publication");
    window.setWidth("640px");
    window.center();
    window.show();
  }
 @Override
 public void addCloseHandler(ClickHandler clickHandler) {
   if (clickHandler != null && cancel != null) cancel.addClickHandler(clickHandler);
   if (window != null) window.addClosehandler(clickHandler);
 }