Re: svn commit: r893766 - /cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java

From: Andrey Razumovsky (razumovsky.andre..mail.com)
Date: Thu Dec 24 2009 - 17:21:32 EST

  • Next message: ïÌØÇÁ ôËÁÞÅ×: "Re: svn commit: r893766 - /cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java"

    I'm not sure this is same error, but now comboboxes in mirgate/generate
    schema dialogs are empty

    2009/12/24 <oltk..pache.org>

    > Author: oltka
    > Date: Thu Dec 24 14:27:01 2009
    > New Revision: 893766
    >
    > URL: http://svn.apache.org/viewvc?rev=893766&view=rev
    > Log:
    > * not shown values in localDataSources ComboBox in dataNodeEditor
    >
    > Modified:
    >
    > cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java
    >
    > Modified:
    > cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java
    > URL:
    > http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java?rev=893766&r1=893765&r2=893766&view=diff
    >
    > ==============================================================================
    > ---
    > cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java
    > (original)
    > +++
    > cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java
    > Thu Dec 24 14:27:01 2009
    >.. -22,8 +22,9 @@
    > import java.awt.Component;
    > import java.awt.event.ComponentAdapter;
    > import java.awt.event.ComponentEvent;
    > +import java.util.ArrayList;
    > import java.util.HashMap;
    > -import java.util.Iterator;
    > +import java.util.List;
    > import java.util.Map;
    >
    > import javax.swing.DefaultComboBoxModel;
    >.. -76,7 +77,7 @@
    > protected DataNodeEditor tabbedPaneController;
    > protected DataNode node;
    > protected Map datasourceEditors;
    > - protected Map localDataSources;
    > + protected List localDataSources;
    >
    > protected DataSourceEditor defaultSubeditor;
    > protected BindingDelegate nodeChangeProcessor;
    >.. -90,7 +91,7 @@
    > this.tabbedPaneController = tabController;
    > this.view = new MainDataNodeView((ProjectController) getParent());
    > this.datasourceEditors = new HashMap();
    > - this.localDataSources = new HashMap();
    > + this.localDataSources = new ArrayList<String>();
    >
    > this.nodeChangeProcessor = new BindingDelegate() {
    >
    >.. -262,12 +263,12 @@
    > // a slight chance that a real datasource is called
    > NO_LOCAL_DATA_SOURCE...
    > keys[0] = NO_LOCAL_DATA_SOURCE;
    >
    > - Iterator it = sources.entrySet().iterator();
    > - while (it.hasNext()) {
    > - Map.Entry pairs = (Map.Entry)it.next();
    > - localDataSources.put(pairs.getKey(), pairs.getValue());
    > + Object[] dataSources = sources.keySet().toArray();
    > + localDataSources.add(dataSources);
    > + for(int i=0; i<dataSources.length;i++){
    > + keys[i+1] = dataSources[i];
    > }
    > -
    > +
    > view.getLocalDataSources().setModel(new
    > DefaultComboBoxModel(keys));
    > localDataSourceBinding.updateView();
    > }
    >
    >
    >

    -- 
    Andrey
    



    This archive was generated by hypermail 2.0.0 : Thu Dec 24 2009 - 17:22:26 EST