Ejemplo n.º 1
0
  public void show(final Pair<Product, String> productPair) {
    this.product = productPair.getEntity1();
    if (null != product.getDescription()) description.setHTML(product.getDescription());
    else description.setText("");
    tags.setValues(product.getTags());
    name.setValue(product.getName());
    versionNumber.setValue(product.getVersionNumber());
    organization.setValue(product.getOrganizationName());
    webpageUrl.setValue(product.getWebsiteUrl());
    wikiUrl.setValue(product.getWikiUrl());
    downloadUrl.setValue(product.getDownloadUrl());
    showcaseUrl.setValue(product.getDemoUrl());
    forumUrl.setValue(product.getForumUrl());
    issueTrackerUrl.setValue(product.getIssueTrackerUrl());
    newsfeedUrl.setValue(product.getNewsUrl());
    WidgetUtil.selectValue(license.getComponent(), product.getLicense());
    WidgetUtil.selectValue(status.getComponent(), product.getStatus());
    WidgetUtil.selectValue(category.getComponent(), product.getCategoryId());
    new GetProductCategoriesCommand() {

      @Override
      public void onSuccess(ArrayList<Category> result) {
        WidgetUtil.selectValue(category.getComponent(), product.getCategoryId());
      }
    }.execute();
    resetIcon();
    uploaderContainer.clear();
    if (null != product && null != product.getId()) {
      uploaderContainer.add(new ProductImageUploadPanel(product, this));
    }
  }