Package com.google.gdt.eclipse.designer.gxt.databinding.ui.contentproviders

Examples of com.google.gdt.eclipse.designer.gxt.databinding.ui.contentproviders.AutobindUiContentProvider


  public void createContentProviders(List<IUiContentProvider> providers,
      IPageListener listener,
      final DatabindingsProvider provider) throws Exception {
    super_createContentProviders(providers, listener, provider);
    //
    AutobindUiContentProvider autoBindEditor = new AutobindUiContentProvider(this);
    providers.add(autoBindEditor);
    //
    MultiTargetRunnable multiTargetRunnable = null;
    //
    if (m_model instanceof WidgetObserveInfo) {
      WidgetObserveInfo model = (WidgetObserveInfo) m_model;
      if (model.isGrid()) {
        ChooseClassConfiguration configuration = new ChooseClassConfiguration();
        configuration.setDialogFieldLabel("Grid selection element:");
        configuration.setBaseClassName("com.extjs.gxt.ui.client.data.ModelData");
        configuration.setValueScope("beans");
        configuration.setChooseInterfaces(true);
        configuration.setEmptyClassErrorMessage("Choose Grid selection element");
        configuration.setErrorMessagePrefix("Grid selection element");
        //
        ChooseClassUiContentProvider gridSelectionElementEditor =
            new ChooseClassUiContentProvider(configuration) {
              public void updateFromObject() throws Exception {
                if (m_gridSelectionModel == null) {
                  calculateFinish();
                } else {
                  setClassName(m_gridSelectionModel.getObjectType().getName());
                }
              }

              public void saveToObject() throws Exception {
                m_gridSelectionModel =
                    new BeanObserveInfo(provider.getBeansContainer().getBeanSupport(),
                        m_modelProperty,
                        getChoosenClass());
                ((WidgetObserveInfo) m_model).getSelfProperty().setProperties(
                    m_gridSelectionModel.getChildren(ChildrenContext.ChildrenForPropertiesTable));
              }
            };
        providers.add(gridSelectionElementEditor);
        //
        multiTargetRunnable = new MultiTargetRunnable(gridSelectionElementEditor);
        new ChooseClassRouter(gridSelectionElementEditor, multiTargetRunnable);
      }
    }
    //
    TabContainerConfiguration configuration = new TabContainerConfiguration();
    configuration.setUseMultiAddButton(true);
    configuration.setCreateEmptyPage("Bindings", "Add field bindings for this form.");
    //
    providers.add(new FormBindingUiContentProvider(provider,
        configuration,
        (BooleanDialogField) autoBindEditor.getDialogField(),
        multiTargetRunnable,
        this));
  }
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.gxt.databinding.ui.contentproviders.AutobindUiContentProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.