/**
   * Faz a inicialização do compoente de FormCrudWindow
   *
   * @param composer
   */
  private void initFormCrudWindow(ComposerController<?> composer) {
    if (this.crudWindow != null) setTitle(this.crudWindow.getTitulo());

    if (composer.getForm() != null) {
      composer.getForm().setParent(divFields);
    } else {
      buildDivFieldsFromEntity(composer);
    }

    composer.getComponent().setAttribute("formCrudWindow", this);

    this.formCrudWindowBtnSave.setVisible(this.isCanSave());
  }
Пример #2
0
  /**
   * Faz a inicialização do compoente de CrudWindow
   *
   * @param composer
   */
  private void initCrudWindow(ComposerController<?> composer) {
    if (this.getChildren() != null) {
      setComposerRecursive(this.getChildren().get(0), composer);
    }

    composer.setEditForm(this.editFormCrudWindow);
    // composer.setUseCase(getTitulo());

    if (composer.getSearchForm() != null) {
      composer.getSearchForm().setParent(divSearch);
      // new AnnotateDataBinder(divSearch).loadAll();
    }
    if (this.divResult != null) {
      composer.getResult().setParent(divResult);
      new AnnotateDataBinder(divResult).loadAll();
    }
    buildListHearder(composer);
    buildListItem(composer);
    buildAcaoPainel(composer);

    // inicializar as variaveis de controle de operação baseado no atributo
    // crudOperation
    initCrudOpeartion();

    updateComponents();

    editFormCrudWindow.setCanSave(this.isCrudUpdateEnable());

    // composer.getForm().setParent(divForm);
    // new AnnotateDataBinder(divForm).loadAll();

    composer.getComponent().setAttribute("builderSoftCrudWindow", this);

    this.crudWindow.setWidth(this.getWidth());
    this.crudWindow.setHeight(this.getHeight());
    this.divListBox.setPageSize(Integer.parseInt(this.getListBoxSize()));
  }