Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/raster/impl/DefaultCoverageStore.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/raster/impl/DefaultCoverageStore.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/raster/impl/DefaultCoverageStore.java	(revision 44259)
@@ -71,6 +71,7 @@
 import org.gvsig.tools.persistence.PersistentState;
 import org.gvsig.tools.persistence.exception.PersistenceException;
 import org.gvsig.tools.undo.command.Command;
+import org.gvsig.tools.util.UnmodifiableBasicMap;
 import org.gvsig.tools.visitor.Visitor;
 
 /**
@@ -149,28 +150,11 @@
 	}
 
 
-	/* (non-Javadoc)
-	 * @see org.gvsig.fmap.dal.DataStore#getChildren()
-	 */
-	public Iterator getChildren() {
-		return this.provider.getChildren();
-	}
-
         @Override
-        public DataStore getChild(String name) {
-            return null;
-        }
-
-        @Override
-        public List<String> getChildrenNames() {
-            return Collections.EMPTY_LIST;
-        }
+	public UnmodifiableBasicMap<String,DataStore> getChildren() {
+		return UnmodifiableBasicMap.EMPTY_UNMODIFIABLEBASICMAP;
+	}
         
-        @Override
-        public boolean hasChildren() {
-            return false;
-        }
-        
 	/* (non-Javadoc)
 	 * @see org.gvsig.fmap.dal.DataStore#getDataSet()
 	 */
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/expressionevaluator/DALSymbolTable.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/expressionevaluator/DALSymbolTable.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/expressionevaluator/DALSymbolTable.java	(revision 44259)
@@ -23,7 +23,7 @@
 public class DALSymbolTable extends AbstractSymbolTable {
 
     public static final String FUNCTION_FEATURES = "FEATURES";
-    
+
     public static class FeaturesFunction extends AbstractFunction {
 
         public FeaturesFunction() {
@@ -32,7 +32,7 @@
                     FUNCTION_FEATURES,
                     Range.between(1, 3),
                     "Return a list of the features selecteds with filter in the store.",
-                    FUNCTION_FEATURES+"({{store_name}}, filter, order)",
+                    FUNCTION_FEATURES + "({{store_name}}, filter, order)",
                     new String[]{
                         "store - data store name to be used",
                         "where - Optional. String value with a filter expression",
@@ -58,11 +58,11 @@
             }
             try {
                 DataStore store = this.getStore(storeName);
-                if( store == null || !(store instanceof FeatureStore) ) {
-                    throw new ExpressionRuntimeException("Cant locate the store '"+storeName+"' in function '"+FUNCTION_FEATURES+"'.");
+                if (store == null || !(store instanceof FeatureStore)) {
+                    throw new ExpressionRuntimeException("Cant locate the store '" + storeName + "' in function '" + FUNCTION_FEATURES + "'.");
                 }
-                if( !(store instanceof FeatureStore) ) {
-                    throw new ExpressionRuntimeException("The store'"+storeName+"' is not valid for function '"+FUNCTION_FEATURES+"', a FeatureStore is required.");
+                if (!(store instanceof FeatureStore)) {
+                    throw new ExpressionRuntimeException("The store'" + storeName + "' is not valid for function '" + FUNCTION_FEATURES + "', a FeatureStore is required.");
                 }
                 FeatureStore featureStore = (FeatureStore) store;
                 List<Feature> features;
@@ -80,10 +80,10 @@
                     features = featureStore.getFeatures(query);
                 }
                 return features;
-            } catch(ExpressionRuntimeException ex) {
+            } catch (ExpressionRuntimeException ex) {
                 throw ex;
             } catch (Exception ex) {
-                throw new ExpressionRuntimeException("Problems calling '"+FUNCTION_FEATURES+"' function", ex);
+                throw new ExpressionRuntimeException("Problems calling '" + FUNCTION_FEATURES + "' function", ex);
             }
         }
 
@@ -104,6 +104,6 @@
     public static void selfRegister() {
         ExpressionEvaluatorManager manager = ExpressionEvaluatorLocator.getManager();
         manager.registerSymbolTable(new DALSymbolTableFactory());
-    }    
+    }
 
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/expressionevaluator/DefaultFeatureSymbolTable.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/expressionevaluator/DefaultFeatureSymbolTable.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/expressionevaluator/DefaultFeatureSymbolTable.java	(revision 44259)
@@ -1,8 +1,11 @@
 package org.gvsig.fmap.dal.impl.expressionevaluator;
 
 import org.apache.commons.lang3.Range;
+import org.gvsig.expressionevaluator.ExpressionBuilder;
 import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator;
 import org.gvsig.expressionevaluator.ExpressionEvaluatorManager;
+import org.gvsig.expressionevaluator.ExpressionRuntimeException;
+import org.gvsig.expressionevaluator.ExpressionUtils;
 import org.gvsig.expressionevaluator.Interpreter;
 import org.gvsig.expressionevaluator.MutableSymbolTable;
 import org.gvsig.expressionevaluator.spi.AbstractFunction;
@@ -17,7 +20,9 @@
 import org.gvsig.fmap.dal.feature.FeatureSelection;
 import org.gvsig.fmap.dal.feature.FeatureStore;
 import org.gvsig.fmap.dal.feature.FeatureType;
+import static org.gvsig.fmap.dal.impl.expressionevaluator.DALSymbolTable.FUNCTION_FEATURES;
 import org.gvsig.fmap.dal.impl.expressionevaluator.DALSymbolTable.FeaturesFunction;
+import org.gvsig.tools.dynobject.Tags;
 import org.gvsig.tools.script.Script;
 import org.gvsig.tools.util.UnmodifiableBasicList;
 
@@ -25,8 +30,69 @@
  *
  * @author jjdelcerro
  */
+    @SuppressWarnings("UseSpecificCatch")
 public class DefaultFeatureSymbolTable extends AbstractSymbolTable implements FeatureSymbolTable {
-    
+
+    public static final String FUNCTION_FOREING_VALUE = "FOREING_VALUE";
+
+    public class ForeingValueFunction extends AbstractFunction {
+
+        public ForeingValueFunction() {
+            super(
+                    "Data access",
+                    FUNCTION_FOREING_VALUE,
+                    Range.is(1),
+                    "Return the value of a field throw a relation from other tables.",
+                    FUNCTION_FOREING_VALUE + "({{field_name}})",
+                    new String[]{
+                        "fieldName - dot separated field path"
+                    },
+                    "OBJECT"
+            );
+        }
+
+        @Override
+        public Object call(Interpreter interpreter, Object[] args) throws Exception {
+            ExpressionBuilder builder = ExpressionUtils.createExpressionBuilder();
+            String fullFieldName = getStr(args, 0);
+            String[] nameParts = fullFieldName.split("[.]");
+            Feature currentFeature = feature;
+            try {
+                String namePart;
+                Object value;
+                for (int i = 0; i < nameParts.length-1; i++) {
+                    namePart = nameParts[i];
+                    value = currentFeature.get(namePart);
+                    
+                    FeatureAttributeDescriptor attrdesc = currentFeature.getType().getAttributeDescriptor(namePart);
+                    Tags tags = attrdesc.getTags();
+                    String storeName = tags.getString(DataManager.DAL_FOREING_TABLE, null);
+                    String attrName = tags.getString(DataManager.DAL_FOREING_CODE, null);
+
+                    StoresRepository repository = currentFeature.getStore().getStoresRepository();
+                    FeatureStore store = (FeatureStore) repository.get(storeName);
+                    currentFeature = store.findFirst(
+                            builder.eq(
+                                    builder.constant(value), 
+                                    builder.variable(attrName)
+                            ).toString()
+                    );
+                    if( currentFeature==null ) {
+                        return null;
+                    }
+                }
+                namePart = nameParts[nameParts.length-1];
+                value = currentFeature.get(namePart);
+                return value;
+            } catch (ExpressionRuntimeException ex) {
+                throw ex;
+            } catch (Exception ex) {
+                throw new ExpressionRuntimeException("Problems calling '" + FUNCTION_FEATURES + "' function", ex);
+            }
+        }
+        
+    }
+
     private class LocalFeaturesFunction extends FeaturesFunction {
 
         public LocalFeaturesFunction() {
@@ -37,13 +103,13 @@
         protected DataStore getStore(String storeName) {
             DataManager dataManager = DALLocator.getDataManager();
             DataStore store = null;
-            if( feature!=null ) {
+            if (feature != null) {
                 store = feature.getStore();
-                store = store.getChild(storeName);
+                store = store.getChildren().get(storeName);
             }
-            if( store == null ) {
+            if (store == null) {
                 StoresRepository repository = dataManager.getStoresRepository();
-                if( repository.containsKey(storeName) ) {
+                if (repository.containsKey(storeName)) {
                     store = repository.get(storeName);
                 }
             }
@@ -90,7 +156,7 @@
 
         @Override
         public Object call(Interpreter interpreter, Object[] args) throws Exception {
-            if( feature==null ) {
+            if (feature == null) {
                 return null;
             }
             return feature.getStore();
@@ -115,7 +181,7 @@
 
         @Override
         public Object call(Interpreter interpreter, Object[] args) throws Exception {
-            if( feature==null ) {
+            if (feature == null) {
                 return false;
             }
             FeatureStore store = feature.getStore();
@@ -136,6 +202,7 @@
         this.addFunction(new FeatureStoreFunction());
         this.addFunction(new IsSelectedFunction());
         this.addFunction(new LocalFeaturesFunction());
+        this.addFunction(new ForeingValueFunction());
     }
 
     @SuppressWarnings("OverridableMethodCallInConstructor")
@@ -159,7 +226,7 @@
 
     @Override
     public boolean exists(String name) {
-        if (type!=null && type.get(name) != null) {
+        if (type != null && type.get(name) != null) {
             return true;
         }
         return false;
@@ -167,7 +234,7 @@
 
     @Override
     public Object value(String name) {
-        if( feature==null ) {
+        if (feature == null) {
             return null;
         }
         return this.feature.get(name);
@@ -175,14 +242,14 @@
 
     @Override
     public boolean isSQLCompatible(String name) {
-        if( this.type == null ) {
+        if (this.type == null) {
             return super.isSQLCompatible(name);
         }
         FeatureAttributeDescriptor attrdesc = this.type.getAttributeDescriptor(name);
-        if( attrdesc == null ) {
+        if (attrdesc == null) {
             return true;
         }
-        if( attrdesc.isComputed() ) {
+        if (attrdesc.isComputed()) {
             return false;
         }
         return true;
@@ -203,7 +270,6 @@
         return symbolTable;
     }
 
-    
     public static void selfRegister() {
         ExpressionEvaluatorManager manager = ExpressionEvaluatorLocator.getManager();
         manager.registerSymbolTable(new DefaultfeatureSymbolTableFactory());
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DefaultStoresRepository.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DefaultStoresRepository.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/DefaultStoresRepository.java	(revision 44259)
@@ -8,6 +8,8 @@
 import org.gvsig.fmap.dal.DataStoreParameters;
 import org.gvsig.fmap.dal.StoresRepository;
 import org.gvsig.tools.util.GetItemByKey;
+import org.gvsig.tools.util.UnmodifiableBasicSet;
+import org.gvsig.tools.util.UnmodifiableBasicSetAdapter;
 
 /**
  *
@@ -91,8 +93,25 @@
     }
 
     @Override
-    public Iterator<String> iterator() {
-        return this.repository.keySet().iterator();
+    public Iterator<DataStore> iterator() {
+        final Iterator<String> it = this.keySet().iterator();
+        return new Iterator<DataStore>() {
+            @Override
+            public boolean hasNext() {
+                return it.hasNext();
+            }
+
+            @Override
+            public DataStore next() {
+                String name = it.next();
+                return get(name);
+            }
+        };
     }
     
+    @Override
+    public UnmodifiableBasicSet<String> keySet() {
+        return new UnmodifiableBasicSetAdapter(this.repository.keySet());
+    }
+    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/dataprofile/SelectableForeingKey.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/dataprofile/SelectableForeingKey.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/dataprofile/SelectableForeingKey.java	(revision 44259)
@@ -4,12 +4,12 @@
 import org.gvsig.expressionevaluator.ExpressionUtils;
 import org.gvsig.fmap.dal.DALLocator;
 import org.gvsig.fmap.dal.DataManager;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_CODE;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_TABLE;
 import org.gvsig.fmap.dal.feature.AbstractDataProfile;
 import org.gvsig.fmap.dal.feature.Feature;
 import org.gvsig.fmap.dal.feature.FeatureQuery;
 import org.gvsig.fmap.dal.feature.FeatureStore;
-import static org.gvsig.fmap.dal.impl.dataprofile.ForeingKey.DAL_FOREING_CODE;
-import static org.gvsig.fmap.dal.impl.dataprofile.ForeingKey.DAL_FOREING_TABLE;
 import org.gvsig.tools.dynobject.Tags;
 
 /**
@@ -20,7 +20,7 @@
 public class SelectableForeingKey extends AbstractDataProfile {
     
     public SelectableForeingKey() {
-        super("DAL.SelectableForeingKey", "Selectable foreing key", Feature.class);
+        super(DataManager.DAL_SELECTABLE_FOREING_KEY, "Selectable foreing key", Feature.class);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/dataprofile/ForeingKey.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/dataprofile/ForeingKey.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/impl/dataprofile/ForeingKey.java	(revision 44259)
@@ -4,6 +4,8 @@
 import org.gvsig.expressionevaluator.ExpressionUtils;
 import org.gvsig.fmap.dal.DALLocator;
 import org.gvsig.fmap.dal.DataManager;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_CODE;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_TABLE;
 import org.gvsig.fmap.dal.feature.AbstractDataProfile;
 import org.gvsig.fmap.dal.feature.Feature;
 import org.gvsig.fmap.dal.feature.FeatureQuery;
@@ -17,12 +19,8 @@
 @SuppressWarnings("UseSpecificCatch")
 public class ForeingKey extends AbstractDataProfile {
     
-    public static final String DAL_FOREING_CODE = "DAL.foreingCode";
-    public static final String DAL_FOREING_TABLE = "DAL.foreingTable";
-    public static final String DAL_FOREING_LABEL = "DAL.foreingLabel";
-
     public ForeingKey() {
-        super("DAL.ForeingKey", "Foreing key", Feature.class);
+        super(DataManager.DAL_FOREING_KEY, "Foreing key", Feature.class);
     }
 
     @Override
@@ -31,8 +29,8 @@
             return null;
         }
         try {
-            String foreingTableName = (String) tags.get(DAL_FOREING_TABLE);
-            String foreingCodeName = (String) tags.get(DAL_FOREING_CODE);
+            String foreingTableName = tags.getString(DAL_FOREING_TABLE,null);
+            String foreingCodeName = tags.getString(DAL_FOREING_CODE, null);
             
             DataManager dataManager = DALLocator.getDataManager();
             FeatureStore store = (FeatureStore) dataManager.getStoresRepository().get(foreingTableName);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureAttributeDescriptor.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureAttributeDescriptor.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureAttributeDescriptor.java	(revision 44259)
@@ -260,7 +260,7 @@
                 hasStrongChanges = true;
             }
         }
-        this.name = name;
+        super.setName(name);
         if (!isComputed()) {
             hasStrongChanges = true;
         }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java	(revision 44259)
@@ -58,6 +58,7 @@
 import org.gvsig.fmap.dal.DataStoreNotification;
 import org.gvsig.fmap.dal.DataStoreParameters;
 import org.gvsig.fmap.dal.DataStoreProviderFactory;
+import org.gvsig.fmap.dal.StoresRepository;
 import org.gvsig.fmap.dal.exception.CloneException;
 import org.gvsig.fmap.dal.exception.CloseException;
 import org.gvsig.fmap.dal.exception.CreateException;
@@ -168,6 +169,9 @@
 import org.gvsig.tools.undo.command.Command;
 import org.gvsig.tools.util.HasAFile;
 import org.gvsig.tools.util.ResourcesStorage;
+import org.gvsig.tools.util.UnmodifiableBasicMap;
+import org.gvsig.tools.util.UnmodifiableBasicSet;
+import org.gvsig.tools.util.UnmodifiableBasicSetChained;
 import org.gvsig.tools.visitor.VisitCanceledException;
 import org.gvsig.tools.visitor.Visitor;
 
@@ -331,32 +335,11 @@
     }
 
     @Override
-    public Iterator<DataStore> getChildren() {
+    public UnmodifiableBasicMap<String,DataStore> getChildren() {
         return this.provider.getChildren();
     }
 
     @Override
-    public DataStore getChild(String name) {
-        return this.provider.getChild(name);
-    }
-
-    @Override
-    public List<String> getChildrenNames() {
-        List<String> names = new ArrayList<>();
-        Iterator<DataStore> it = this.getChildren();
-        while(it.hasNext()) {
-            DataStore store = it.next();
-            names.add(store.getName());
-        }
-        return names;
-    }
-
-    @Override
-    public boolean hasChildren() {
-        return this.provider.hasChildren();
-    }
-
-    @Override
     public FeatureStoreProvider getProvider() {
         return this.provider;
     }
@@ -2934,13 +2917,8 @@
 
     @Override
     public ExpressionBuilder createExpressionBuilder() {
-        ExpressionBuilder builder = null;
-//        if( this.provider instanceof FeatureStoreProvider_v2 ) {
-//            builder = ((FeatureStoreProvider_v2)this.provider).createExpression();
-//        }
-//        if( builder==null ) {
-            builder = ExpressionEvaluatorLocator.getManager().createExpressionBuilder();
-//        }
+        ExpressionBuilder builder;
+        builder = ExpressionEvaluatorLocator.getManager().createExpressionBuilder();
         return builder;
     }
 
@@ -3004,5 +2982,80 @@
     public ResourcesStorage getResourcesStorage() {
         return new DALResourcesStorage(this);
     }
+
+    @Override
+    public StoresRepository getStoresRepository() {
+        final StoresRepository mainRepository = this.dataManager.getStoresRepository();
+        StoresRepository repository = new StoresRepository() {
+            @Override
+            public void add(String name, DataStoreParameters parameters) {
+                mainRepository.add(name, parameters);
+            }
+
+            @Override
+            public void remove(String name) {
+                mainRepository.remove(name);
+            }
+
+            @Override
+            public DataStore get(String key) {
+                DataStore store = getChildren().get(key);
+                if( store != null ) {
+                    return store;
+                }
+                return mainRepository.get(key);
+            }
+
+            @Override
+            public boolean isEmpty() {
+                return getChildren().isEmpty() && mainRepository.isEmpty();
+            }
+
+            @Override
+            public boolean containsKey(String key) {
+                return getChildren().containsKey(key) || mainRepository.containsKey(key);
+            }
+
+            @Override
+            public Map<String, DataStore> toMap() {
+                return null;
+            }
+
+            @Override
+            public int size() {
+                return getChildren().size()+mainRepository.size();
+            }
+
+            @Override
+            public UnmodifiableBasicSet<String> keySet() {
+                UnmodifiableBasicMap<String, DataStore> children = getChildren();
+                if( children.isEmpty() ) {
+                    return mainRepository.keySet();
+                }
+                return new UnmodifiableBasicSetChained<>(
+                        children.keySet(), 
+                        mainRepository.keySet()
+                );
+            }
+
+            @Override
+            public Iterator<DataStore> iterator() {
+                final Iterator<String> it = this.keySet().iterator();
+                return new Iterator<DataStore>() {
+                    @Override
+                    public boolean hasNext() {
+                        return it.hasNext();
+                    }
+
+                    @Override
+                    public DataStore next() {
+                        String name = it.next();
+                        return get(name);
+                    }
+                };
+            }
+        };
+        return repository;
+    }
     
 }
\ No newline at end of file
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java	(revision 44259)
@@ -33,8 +33,19 @@
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.cresques.cts.IProjection;
+import org.gvsig.expressionevaluator.Expression;
+import org.gvsig.expressionevaluator.ExpressionUtils;
+import org.gvsig.expressionevaluator.SymbolTable;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_CODE;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_LABEL;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_TABLE;
 import org.gvsig.fmap.dal.DataStore;
 import org.gvsig.fmap.dal.DataTypes;
+import org.gvsig.fmap.dal.StoresRepository;
+import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable;
+import org.gvsig.fmap.dal.feature.Feature;
 import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
 import org.gvsig.fmap.dal.feature.FeatureAttributeEmulator;
 import org.gvsig.fmap.dal.feature.FeatureAttributeGetter;
@@ -74,6 +85,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@SuppressWarnings("UseSpecificCatch")
 public class DefaultFeatureAttributeDescriptor implements
         FeatureAttributeDescriptor, Persistent, DynField_v2, DynField_LabelAttribute {
 
@@ -128,6 +140,8 @@
     }
 
     protected DefaultFeatureAttributeDescriptor(FeatureType type) {
+        this();
+//        LOGGER.info(String.format("Created FeatureAttributeDescriptor [%08x].", this.hashCode()));
         setFeatureType(type);
         this.allowNull = true;
         this.dataType = null;
@@ -155,7 +169,9 @@
     protected DefaultFeatureAttributeDescriptor(
             DefaultFeatureAttributeDescriptor other
         ) {
+        this();
         copyFrom(other);
+//        LOGGER.info(String.format("Created FeatureAttributeDescriptor [%08x] [%s] (copy).", this.hashCode(), this.name));
     }
     
     @Override
@@ -230,6 +246,7 @@
             this.typeRef = null;
         } else {
             this.typeRef = new WeakReference(type);
+//            LOGGER.info(String.format("FeatureAttributeDescriptor[%08x] set FeatureType [%08x], ref [%08x].", this.hashCode(), type.hashCode(), typeRef.hashCode()));
         }
     }
     
@@ -346,6 +363,7 @@
     }
     
     public FeatureAttributeDescriptor setName(String name) {
+//        LOGGER.info(String.format("FeatureAttributeDescriptor[%08x] set name [%s].", this.hashCode(), name));
         this.name = name;
         return this;
     }
@@ -735,6 +753,60 @@
 
     @Override
     public DynObjectValueItem[] getAvailableValues() {
+        if( this.availableValues == null ) {
+            if( StringUtils.isBlank(this.getDataProfileName()) ) {
+                return null;
+            }
+            if( !StringUtils.equalsIgnoreCase(
+                    this.getDataProfileName(), 
+                    DataManager.DAL_SELECTABLE_FOREING_KEY) 
+                    ) {
+                return null;
+            }
+            Tags theTags = this.getTags();
+            if( theTags==null ) {
+                return null;
+            }
+            String foreingLabel = theTags.getString(DAL_FOREING_LABEL, null);
+            if( StringUtils.isBlank(foreingLabel) ) {
+                return null;
+            }
+            String foreingTableName = theTags.getString(DAL_FOREING_TABLE, null);
+            if( StringUtils.isBlank(foreingTableName) ) {
+                return null;
+            }
+            String foreingCodeName = theTags.getString(DAL_FOREING_CODE, null);
+            if( StringUtils.isBlank(foreingCodeName) ) {
+                return null;
+            }
+            try {
+                DataManager dataManager = DALLocator.getDataManager();
+                StoresRepository repository = this.getStore().getStoresRepository();
+                FeatureStore store = (FeatureStore) repository.get(foreingTableName);
+                if( store == null ) {
+                    LOGGER.warn("Can't locate store '"+foreingTableName+"' to get available values of field '"+this.getName()+"'.");
+                    return null;
+                }
+                        
+                Expression labelExpression = ExpressionUtils.createExpression(foreingLabel);
+                FeatureSymbolTable featureSymbolTable = dataManager.createFeatureSymbolTable();
+                SymbolTable symbolTable = featureSymbolTable.createParent();
+                
+                int count = (int) store.getFeatureCount();
+                DynObjectValueItem[] values = new DynObjectValueItem[count];
+                int n = 0;
+                for (Feature feature : store.getFeatureSet()) {
+                    featureSymbolTable.setFeature(feature);
+                    Object code = feature.get(foreingCodeName);
+                    Object label = labelExpression.execute(symbolTable);
+                    values[n++] = new DynObjectValueItem(code, Objects.toString(label, Objects.toString(code, "##ERROR##")));
+                }
+                this.availableValues = values;
+            } catch (Exception ex) {
+                LOGGER.warn("Can't get values from table '" + foreingTableName + "' for field '" + this.getName() + "'.", ex);
+                return null;
+            }
+        }
         return this.availableValues;
     }
 
@@ -1225,7 +1297,9 @@
         if( this.typeRef==null ) {
             return null;
         }
-        return (FeatureType) this.typeRef.get();
+        FeatureType ftype = (FeatureType) this.typeRef.get();
+//        LOGGER.info(String.format("FeatureAttributeDescriptor[%08x] get FeatureType [%08x], ref [%08x].", this.hashCode(), ftype.hashCode(), typeRef.hashCode()));
+        return ftype;
     }
 
     public FeatureAttributeDescriptor setInterval(Interval interval) {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureQuery.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureQuery.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureQuery.java	(revision 44259)
@@ -332,6 +332,10 @@
 
     @Override
     public void setFilter(Expression filter) {
+        if( filter == null ) {
+            this.clearFilter();
+            return;
+        }
         Evaluator x = new DefaultExpressionEvaluator(filter);
         this.setFilter(x);
     }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureType.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureType.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureType.java	(revision 44259)
@@ -150,7 +150,9 @@
         DefaultFeatureAttributeDescriptor attr;
         while (iter.hasNext()) {
             attr = (DefaultFeatureAttributeDescriptor) iter.next();
-            copy.add(new DefaultFeatureAttributeDescriptor(attr));
+            DefaultFeatureAttributeDescriptor newattr = new DefaultFeatureAttributeDescriptor(attr);
+            newattr.setFeatureType(copy);
+            copy.add(newattr);
         }
         return copy;
     }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/searchpanel/FeatureStoreSearchPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/searchpanel/FeatureStoreSearchPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/searchpanel/FeatureStoreSearchPanel.java	(revision 44259)
@@ -0,0 +1,12 @@
+package org.gvsig.fmap.dal.swing.searchpanel;
+
+import org.gvsig.tools.swing.api.ActionListenerSupport;
+import org.gvsig.tools.swing.api.Component;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public interface FeatureStoreSearchPanel extends  Component, ActionListenerSupport {
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/DataSwingManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/DataSwingManager.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.api/src/main/java/org/gvsig/fmap/dal/swing/DataSwingManager.java	(revision 44259)
@@ -43,6 +43,7 @@
 import org.gvsig.fmap.dal.swing.featuretype.FeatureTypeAttributePanel;
 import org.gvsig.fmap.dal.swing.featuretype.FeatureTypePanel;
 import org.gvsig.fmap.dal.swing.jdbc.JDBCConnectionPanel;
+import org.gvsig.fmap.dal.swing.searchpanel.FeatureStoreSearchPanel;
 import org.gvsig.tools.dynobject.DynStruct;
 import org.gvsig.tools.swing.api.pickercontroller.PickerController;
 
@@ -90,5 +91,7 @@
     
     public FeatureTypeAttributePanel createFeatureTypeAttributePanel();    
 
-    public FeatureStoreElement createFeatureStoreElement(ExpressionBuilderConfig configPanel);
+    public FeatureStoreElement createFeatureStoreElement();
+    
+    public FeatureStoreSearchPanel createFeatureStoreSearchPanel(FeatureStore store);
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/pom.xml	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/pom.xml	(revision 44259)
@@ -159,6 +159,12 @@
             <artifactId>org.gvsig.fmap.dal.file.shp</artifactId>
             <scope>runtime</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-collections4</artifactId>
+            <version>4.1</version>
+            <type>jar</type>
+        </dependency>
     </dependencies>
 
 </project>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/DefaultJFeaturesForm.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/DefaultJFeaturesForm.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/DefaultJFeaturesForm.java	(revision 44259)
@@ -103,12 +103,14 @@
             return store.getResourcesStorage();
         }
         
+        @Override
         public FeatureStore getFeatureStore(String storeName) {
             return (FeatureStore) this.getDataStore(storeName);
         }
 
+        @Override
         public DataStore getDataStore(String storeName) {
-            FeatureStore theStore = (FeatureStore) store.getChild(storeName);
+            FeatureStore theStore = (FeatureStore) store.getChildren().get(storeName);
             if (theStore == null) {
                 DataManager dataManager = DALLocator.getDataManager();
                 StoresRepository repository = dataManager.getStoresRepository();
@@ -518,10 +520,12 @@
             }
         }
 
+        @Override
         public void formBeforeNew(JDynFormSet dynformSet) throws AbortActionException {
             LOGGER.trace("formBeforeNew");
         }
 
+        @Override
         public void formBeforeDelete(JDynFormSet dynformSet) throws AbortActionException {
             LOGGER.trace("formBeforeDelete");
         }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/dynformfield/selectableforeingkey/JDynFormFieldSelectableForeingKeyFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/dynformfield/selectableforeingkey/JDynFormFieldSelectableForeingKeyFactory.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/dynformfield/selectableforeingkey/JDynFormFieldSelectableForeingKeyFactory.java	(revision 44259)
@@ -24,9 +24,9 @@
 package org.gvsig.featureform.swing.impl.dynformfield.selectableforeingkey;
 
 import org.apache.commons.lang3.StringUtils;
-import static org.gvsig.featureform.swing.impl.dynformfield.selectableforeingkey.JDynFormFieldSelectableForeingKey.DAL_FOREING_CODE;
-import static org.gvsig.featureform.swing.impl.dynformfield.selectableforeingkey.JDynFormFieldSelectableForeingKey.DAL_FOREING_LABEL;
-import static org.gvsig.featureform.swing.impl.dynformfield.selectableforeingkey.JDynFormFieldSelectableForeingKey.DAL_FOREING_TABLE;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_CODE;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_LABEL;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_TABLE;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dataTypes.DataTypes;
 import org.gvsig.tools.dynform.DynFormFieldDefinition;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/dynformfield/selectableforeingkey/JDynFormFieldSelectableForeingKey.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/dynformfield/selectableforeingkey/JDynFormFieldSelectableForeingKey.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/dynformfield/selectableforeingkey/JDynFormFieldSelectableForeingKey.java	(revision 44259)
@@ -26,12 +26,12 @@
 import org.gvsig.expressionevaluator.Expression;
 import org.gvsig.expressionevaluator.ExpressionUtils;
 import org.gvsig.expressionevaluator.SymbolTable;
-import org.gvsig.featureform.swing.JFeatureForm;
 import org.gvsig.featureform.swing.JFeaturesForm.FeaturesFormContext;
-import org.gvsig.featureform.swing.impl.DefaultJFeaturesForm;
-import org.gvsig.featureform.swing.impl.dynformfield.linkforeingkey.JDynFormFieldForeingKey;
 import org.gvsig.fmap.dal.DALLocator;
 import org.gvsig.fmap.dal.DataManager;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_CODE;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_LABEL;
+import static org.gvsig.fmap.dal.DataManager.DAL_FOREING_TABLE;
 import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable;
 import org.gvsig.fmap.dal.feature.Feature;
 import org.gvsig.fmap.dal.feature.FeatureStore;
@@ -46,10 +46,6 @@
 @SuppressWarnings("UseSpecificCatch")
 public class JDynFormFieldSelectableForeingKey extends AbstractJDynFormFieldWithValueList implements JDynFormField {
 
-    static final String DAL_FOREING_CODE = "DAL.foreingCode";
-    static final String DAL_FOREING_TABLE = "DAL.foreingTable";
-    static final String DAL_FOREING_LABEL = "DAL.foreingLabel";
-
     public JDynFormFieldSelectableForeingKey(
             DynFormSPIManager serviceManager,
             DynFormSPIManager.ComponentsFactory componentsFactory,
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView.java	(revision 44259)
@@ -0,0 +1,342 @@
+package org.gvsig.fmap.dal.swing.impl.searchpanel;
+
+import com.jeta.open.i18n.I18NUtils;
+import com.jgoodies.forms.layout.CellConstraints;
+import com.jgoodies.forms.layout.FormLayout;
+import java.awt.BorderLayout;
+import java.awt.ComponentOrientation;
+import java.awt.Container;
+import java.awt.Dimension;
+import javax.swing.Box;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.border.EmptyBorder;
+
+
+public class DefaultSearchPanelView extends JPanel
+{
+   JTabbedPane tabSearchMode = new JTabbedPane();
+   JComboBox cboValue1 = new JComboBox();
+   JComboBox cboValue2 = new JComboBox();
+   JComboBox cboValue3 = new JComboBox();
+   JComboBox cboValue4 = new JComboBox();
+   JLabel lblRelationalOperator1 = new JLabel();
+   JLabel lblRelationalOperator2 = new JLabel();
+   JLabel lblRelationalOperator3 = new JLabel();
+   JLabel lblRelationalOperator4 = new JLabel();
+   JLabel lblLogicalOperators1 = new JLabel();
+   JLabel lblLogicalOperators2 = new JLabel();
+   JLabel lblLogicalOperators3 = new JLabel();
+   JLabel lblField1 = new JLabel();
+   JLabel lblField2 = new JLabel();
+   JLabel lblField3 = new JLabel();
+   JLabel lblField4 = new JLabel();
+   JLabel lblExtraFields1 = new JLabel();
+   JLabel lblExtraFields2 = new JLabel();
+   JLabel lblExtraFields3 = new JLabel();
+   JLabel lblExtraFields4 = new JLabel();
+   JTextField txtAdvancedExpression = new JTextField();
+   JLabel lblExpressionDeBusqueda = new JLabel();
+   JButton btnAdvancedExpression = new JButton();
+   JButton btnSearch = new JButton();
+   JButton btnClear = new JButton();
+   JTable tblResults = new JTable();
+   JButton btnShowForm = new JButton();
+   JLabel lblMsg = new JLabel();
+
+   /**
+    * Default constructor
+    */
+   public DefaultSearchPanelView()
+   {
+      initializePanel();
+   }
+
+   /**
+    * Adds fill components to empty cells in the first row and first column of the grid.
+    * This ensures that the grid spacing will be the same as shown in the designer.
+    * @param cols an array of column indices in the first row where fill components should be added.
+    * @param rows an array of row indices in the first column where fill components should be added.
+    */
+   void addFillComponents( Container panel, int[] cols, int[] rows )
+   {
+      Dimension filler = new Dimension(10,10);
+
+      boolean filled_cell_11 = false;
+      CellConstraints cc = new CellConstraints();
+      if ( cols.length > 0 && rows.length > 0 )
+      {
+         if ( cols[0] == 1 && rows[0] == 1 )
+         {
+            /** add a rigid area  */
+            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
+            filled_cell_11 = true;
+         }
+      }
+
+      for( int index = 0; index < cols.length; index++ )
+      {
+         if ( cols[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
+      }
+
+      for( int index = 0; index < rows.length; index++ )
+      {
+         if ( rows[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
+      }
+
+   }
+
+   /**
+    * Helper method to load an image file from the CLASSPATH
+    * @param imageName the package and name of the file to load relative to the CLASSPATH
+    * @return an ImageIcon instance with the specified image file
+    * @throws IllegalArgumentException if the image resource cannot be loaded.
+    */
+   public ImageIcon loadImage( String imageName )
+   {
+      try
+      {
+         ClassLoader classloader = getClass().getClassLoader();
+         java.net.URL url = classloader.getResource( imageName );
+         if ( url != null )
+         {
+            ImageIcon icon = new ImageIcon( url );
+            return icon;
+         }
+      }
+      catch( Exception e )
+      {
+         e.printStackTrace();
+      }
+      throw new IllegalArgumentException( "Unable to load image: " + imageName );
+   }
+
+   /**
+    * Method for recalculating the component orientation for 
+    * right-to-left Locales.
+    * @param orientation the component orientation to be applied
+    */
+   public void applyComponentOrientation( ComponentOrientation orientation )
+   {
+      // Not yet implemented...
+      // I18NUtils.applyComponentOrientation(this, orientation);
+      super.applyComponentOrientation(orientation);
+   }
+
+   public JPanel createPanel()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      tabSearchMode.setName("tabSearchMode");
+      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
+      tabSearchMode.setBorder(emptyborder1);
+      tabSearchMode.setTabPlacement(JTabbedPane.BOTTOM);
+      tabSearchMode.addTab("Simplificada",null,createPanel1());
+      tabSearchMode.addTab("Avanzada",null,createPanel2());
+      jpanel1.add(tabSearchMode,cc.xy(2,2));
+
+      jpanel1.add(createPanel3(),cc.xy(2,3));
+      tblResults.setName("tblResults");
+      JScrollPane jscrollpane1 = new JScrollPane();
+      jscrollpane1.setViewportView(tblResults);
+      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+      jpanel1.add(jscrollpane1,cc.xy(2,5));
+
+      jpanel1.add(createPanel4(),cc.xy(2,7));
+      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8 });
+      return jpanel1;
+   }
+
+   public JPanel createPanel1()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      cboValue1.setEditable(true);
+      cboValue1.setName("cboValue1");
+      cboValue1.setRequestFocusEnabled(false);
+      jpanel1.add(cboValue1,cc.xywh(2,6,3,1));
+
+      cboValue2.setEditable(true);
+      cboValue2.setName("cboValue2");
+      cboValue2.setRequestFocusEnabled(false);
+      jpanel1.add(cboValue2,cc.xywh(8,6,3,1));
+
+      cboValue3.setEditable(true);
+      cboValue3.setName("cboValue3");
+      cboValue3.setRequestFocusEnabled(false);
+      jpanel1.add(cboValue3,cc.xywh(14,6,3,1));
+
+      cboValue4.setEditable(true);
+      cboValue4.setName("cboValue4");
+      cboValue4.setRequestFocusEnabled(false);
+      jpanel1.add(cboValue4,cc.xywh(20,6,2,1));
+
+      lblRelationalOperator1.setName("lblRelationalOperator1");
+      lblRelationalOperator1.setText("Igual");
+      lblRelationalOperator1.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblRelationalOperator1,cc.xy(2,4));
+
+      lblRelationalOperator2.setName("lblRelationalOperator2");
+      lblRelationalOperator2.setText("Igual");
+      lblRelationalOperator2.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblRelationalOperator2,cc.xy(8,4));
+
+      lblRelationalOperator3.setName("lblRelationalOperator3");
+      lblRelationalOperator3.setText("Igual");
+      lblRelationalOperator3.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblRelationalOperator3,cc.xy(14,4));
+
+      lblRelationalOperator4.setName("lblRelationalOperator4");
+      lblRelationalOperator4.setText("Igual");
+      lblRelationalOperator4.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblRelationalOperator4,cc.xy(20,4));
+
+      lblLogicalOperators1.setName("lblLogicalOperators1");
+      lblLogicalOperators1.setText("WWWWW");
+      lblLogicalOperators1.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblLogicalOperators1,cc.xy(6,2));
+
+      lblLogicalOperators2.setName("lblLogicalOperators2");
+      lblLogicalOperators2.setText("WWWWW");
+      lblLogicalOperators2.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblLogicalOperators2,cc.xy(12,2));
+
+      lblLogicalOperators3.setName("lblLogicalOperators3");
+      lblLogicalOperators3.setText("WWWWW");
+      lblLogicalOperators3.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblLogicalOperators3,cc.xy(18,2));
+
+      lblField1.setName("lblField1");
+      lblField1.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblField1,cc.xy(2,2));
+
+      lblField2.setName("lblField2");
+      lblField2.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblField2,cc.xy(8,2));
+
+      lblField3.setName("lblField3");
+      lblField3.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblField3,cc.xy(14,2));
+
+      lblField4.setName("lblField4");
+      lblField4.setHorizontalAlignment(JLabel.CENTER);
+      jpanel1.add(lblField4,cc.xy(20,2));
+
+      lblExtraFields1.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png"));
+      lblExtraFields1.setName("lblExtraFields1");
+      jpanel1.add(lblExtraFields1,cc.xy(4,2));
+
+      lblExtraFields2.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png"));
+      lblExtraFields2.setName("lblExtraFields2");
+      jpanel1.add(lblExtraFields2,cc.xy(10,2));
+
+      lblExtraFields3.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png"));
+      lblExtraFields3.setName("lblExtraFields3");
+      jpanel1.add(lblExtraFields3,cc.xy(16,2));
+
+      lblExtraFields4.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png"));
+      lblExtraFields4.setName("lblExtraFields4");
+      jpanel1.add(lblExtraFields4,cc.xy(21,2));
+
+      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 },new int[]{ 1,2,3,4,5,6,7 });
+      return jpanel1;
+   }
+
+   public JPanel createPanel2()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      txtAdvancedExpression.setName("txtAdvancedExpression");
+      jpanel1.add(txtAdvancedExpression,cc.xy(2,4));
+
+      lblExpressionDeBusqueda.setName("lblExpressionDeBusqueda");
+      lblExpressionDeBusqueda.setText("Introduzca una expresion de busqueda");
+      jpanel1.add(lblExpressionDeBusqueda,cc.xy(2,2));
+
+      btnAdvancedExpression.setActionCommand("...");
+      btnAdvancedExpression.setName("btnAdvancedExpression");
+      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
+      btnAdvancedExpression.setBorder(emptyborder1);
+      jpanel1.add(btnAdvancedExpression,cc.xy(4,4));
+
+      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5 });
+      return jpanel1;
+   }
+
+   public JPanel createPanel3()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      btnSearch.setActionCommand("Buscar");
+      btnSearch.setName("btnSearch");
+      btnSearch.setText("Buscar");
+      jpanel1.add(btnSearch,cc.xy(4,1));
+
+      btnClear.setActionCommand("Limpiar");
+      btnClear.setName("btnClear");
+      btnClear.setText("Limpiar");
+      jpanel1.add(btnClear,cc.xy(2,1));
+
+      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1 });
+      return jpanel1;
+   }
+
+   public JPanel createPanel4()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      btnShowForm.setActionCommand("Ver");
+      btnShowForm.setName("btnShowForm");
+      btnShowForm.setText("Mostrar formulario");
+      jpanel1.add(btnShowForm,cc.xy(6,1));
+
+      lblMsg.setName("lblMsg");
+      jpanel1.add(lblMsg,cc.xy(1,1));
+
+      addFillComponents(jpanel1,new int[]{ 2,3,4,5 },new int[0]);
+      return jpanel1;
+   }
+
+   /**
+    * Initializer
+    */
+   protected void initializePanel()
+   {
+      setLayout(new BorderLayout());
+      add(createPanel(), BorderLayout.CENTER);
+   }
+
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/SearchUtils.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/SearchUtils.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/SearchUtils.java	(revision 44259)
@@ -0,0 +1,166 @@
+package org.gvsig.fmap.dal.swing.impl.searchpanel;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Iterator;
+import java.util.function.Predicate;
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.tools.dataTypes.DataType;
+import org.gvsig.tools.dataTypes.DataTypes;
+import org.gvsig.tools.util.ChainedIterator;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class SearchUtils {
+
+    private SearchUtils() {
+
+    }
+
+    private static final RecentUsedsAttributesImpl RECENTS_USEDS = new RecentUsedsAttributesImpl();
+    
+    public static final Predicate<FeatureAttributeDescriptor> BASIC_TYPES_FILTER = new Predicate<FeatureAttributeDescriptor>() {
+        @Override
+        public boolean test(FeatureAttributeDescriptor attrdesc) {
+            DataType t = attrdesc.getDataType();
+            boolean r = !(t.isContainer() || t.isDynObject() || t.isObject());
+            return r;
+        }
+    };
+
+    public static Predicate<FeatureAttributeDescriptor> ALL_FILTER = new Predicate<FeatureAttributeDescriptor>() {
+        @Override
+        public boolean test(FeatureAttributeDescriptor t) {
+            return true;
+        }
+    };
+
+    public static final Comparator<FeatureAttributeDescriptor> LABEL_ORDER = new Comparator<FeatureAttributeDescriptor>() {
+        @Override
+        public int compare(FeatureAttributeDescriptor o1, FeatureAttributeDescriptor o2) {
+            return StringUtils.compareIgnoreCase(o1.getLabel(), o2.getLabel());
+        }
+    };
+
+    public static final Comparator<FeatureAttributeDescriptor> STR_INT_LONG_LABEL_ORDER = new Comparator<FeatureAttributeDescriptor>() {
+        @Override
+        public int compare(FeatureAttributeDescriptor o1, FeatureAttributeDescriptor o2) {
+            int t1 = o1.getType();
+            int t2 = o2.getType();
+            if( t1==DataTypes.STRING ) {
+                if( t2==DataTypes.STRING ) {
+                    return StringUtils.compareIgnoreCase(o1.getLabel(), o2.getLabel());
+                }
+                return -1;
+            } else if( t2==DataTypes.STRING ) {
+                return 1;
+            }
+            if( t1==DataTypes.INT || t1==DataTypes.LONG ) {
+                if( t2==DataTypes.INT || t2==DataTypes.LONG ) {
+                    return StringUtils.compareIgnoreCase(o1.getLabel(), o2.getLabel());
+                }
+                return -1;
+            } else if( t2==DataTypes.INT || t2==DataTypes.LONG ) {
+                return 1;
+            }
+            return StringUtils.compareIgnoreCase(o1.getLabel(), o2.getLabel());
+        }
+    };
+
+    public static List<FeatureAttributeDescriptor> getOrderedAttributes(
+            FeatureStore store,
+            Predicate<FeatureAttributeDescriptor> filter,
+            Comparator<FeatureAttributeDescriptor> comparator,
+            int max
+    ) {
+        try {
+            return getOrderedAttributes(store.getDefaultFeatureType(), filter, comparator, max);
+        } catch (DataException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+    public static List<FeatureAttributeDescriptor> getOrderedAttributes(
+            FeatureType featureType,
+            Predicate<FeatureAttributeDescriptor> filter,
+            Comparator<FeatureAttributeDescriptor> comparator,
+            int max
+    ) {
+        List<FeatureAttributeDescriptor> mostUsed = new ArrayList<>();
+        List<FeatureAttributeDescriptor> favorites = new ArrayList<>();
+        List<FeatureAttributeDescriptor> normal = new ArrayList<>();
+
+        for (FeatureAttributeDescriptor attribute : getRecentUseds().getAttributes(featureType)) {
+            if (filter.test(attribute)) {
+                mostUsed.add(attribute);
+            }
+        }
+        for (FeatureAttributeDescriptor attribute : getFavoritesAttributes(featureType)) {
+            if (contains(mostUsed, attribute.getName())) {
+                continue;
+            }
+            if (filter.test(attribute)) {
+                favorites.add(attribute);
+            }
+        }
+        for (FeatureAttributeDescriptor attribute : featureType) {
+            if (contains(mostUsed, attribute.getName())) {
+                continue;
+            }
+            if (contains(favorites, attribute.getName())) {
+                continue;
+            }
+            if (filter.test(attribute)) {
+                normal.add(attribute);
+            }
+        }
+        mostUsed.sort(comparator);
+        favorites.sort(comparator);
+        normal.sort(comparator);
+
+        if (max < 0) {
+            max = Integer.MAX_VALUE;
+        }
+        Iterator<FeatureAttributeDescriptor> it = new ChainedIterator<>(
+                mostUsed.iterator(),
+                favorites.iterator(),
+                normal.iterator()
+        );
+        List<FeatureAttributeDescriptor> r = new ArrayList<>();
+        int n = 0;
+        while (n < max && it.hasNext()) {
+            r.add(it.next());
+            n++;
+        }
+        return r;
+    }
+
+    private static boolean contains(List<FeatureAttributeDescriptor> attributes, String name) {
+        if (StringUtils.isBlank(name)) {
+            return false;
+        }
+        for (FeatureAttributeDescriptor attribute : attributes) {
+            if (StringUtils.equalsIgnoreCase(name, attribute.getName())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static RecentUsedsAttributesImpl getRecentUseds() {
+        return RECENTS_USEDS;
+    }
+    
+    public static Collection<FeatureAttributeDescriptor> getFavoritesAttributes(FeatureType featureType) {
+        return Collections.EMPTY_LIST;
+    }
+
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanel.java	(revision 44259)
@@ -0,0 +1,425 @@
+package org.gvsig.fmap.dal.swing.impl.searchpanel;
+
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.ImageIcon;
+import javax.swing.JComponent;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.table.AbstractTableModel;
+import org.apache.commons.io.FilenameUtils;
+import org.gvsig.expressionevaluator.Expression;
+import org.gvsig.expressionevaluator.ExpressionBuilder;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_AND;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_OR;
+import org.gvsig.expressionevaluator.ExpressionUtils;
+import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator;
+import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
+import org.gvsig.expressionevaluator.swing.ExpressionPickerController;
+import org.gvsig.featureform.swing.JFeaturesForm;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureQuery;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.dal.swing.DALSwingLocator;
+import org.gvsig.fmap.dal.swing.DataSwingManager;
+import org.gvsig.fmap.dal.swing.searchpanel.FeatureStoreSearchPanel;
+import org.gvsig.tools.dataTypes.DataType;
+import org.gvsig.tools.swing.api.ActionListenerSupport;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.windowmanager.WindowManager;
+import org.gvsig.tools.swing.icontheme.IconTheme;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+@SuppressWarnings("UseSpecificCatch")
+public class DefaultSearchPanel
+        extends DefaultSearchPanelView
+        implements FeatureStoreSearchPanel {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(DefaultSearchPanel.class);
+    private boolean showFormSingleElement;
+    private Expression currentSearch;
+
+    private class FeaturesTableModel extends AbstractTableModel {
+
+        private final List<Feature> features;
+        private final List<String> columnNames;
+        private final FeatureType featureType;
+
+        public FeaturesTableModel(FeatureType featureType, List<String> columnNames, List<Feature> features) {
+            this.features = features;
+            this.featureType = featureType;
+            if (columnNames == null || columnNames.isEmpty()) {
+                this.columnNames = new ArrayList<>();
+                List<FeatureAttributeDescriptor> attributos = SearchUtils.getOrderedAttributes(
+                        featureType,
+                        SearchUtils.BASIC_TYPES_FILTER,
+                        SearchUtils.STR_INT_LONG_LABEL_ORDER, 
+                        12
+                );
+                for (FeatureAttributeDescriptor attrdesc : attributos) {
+                    this.columnNames.add(attrdesc.getName());
+                }
+            } else {
+                this.columnNames = columnNames;
+            }
+        }
+
+        public List<Feature> getFeatures() {
+            return this.features;
+        }
+
+        @Override
+        public int getRowCount() {
+            if (this.features == null) {
+                return 0;
+            }
+            return this.features.size();
+        }
+
+        @Override
+        public int getColumnCount() {
+            return this.columnNames.size();
+        }
+
+        @Override
+        public String getColumnName(int columnIndex) {
+            String attrName = this.columnNames.get(columnIndex);
+            if (this.featureType == null) {
+                return attrName;
+            }
+            FeatureAttributeDescriptor attrdesc = this.featureType.getAttributeDescriptor(attrName);
+            if (attrdesc == null) {
+                return "C" + columnIndex;
+            }
+            return attrdesc.getLabel();
+        }
+
+        @Override
+        public Class<?> getColumnClass(int columnIndex) {
+            if (this.featureType == null) {
+                return String.class;
+            }
+            String attrName = this.columnNames.get(columnIndex);
+            FeatureAttributeDescriptor attrdesc = this.featureType.getAttributeDescriptor(attrName);
+            if (attrdesc == null) {
+                return String.class;
+            }
+            return attrdesc.getDataType().getDefaultClass();
+        }
+
+        @Override
+        public boolean isCellEditable(int rowIndex, int columnIndex) {
+            return false;
+        }
+
+        @Override
+        public Object getValueAt(int rowIndex, int columnIndex) {
+            if (this.features == null) {
+                return null;
+            }
+            Feature feature = this.features.get(rowIndex);
+            String attrName = this.columnNames.get(columnIndex);
+            try {
+                return feature.get(attrName);
+            } catch (Throwable th) {
+                return null;
+            }
+        }
+
+        @Override
+        public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
+
+        }
+    }
+
+    private final FeatureStore store;
+    private final ActionListenerSupport acctionListeners;
+    private final List<SearchFieldController> searchFields;
+    private ExpressionPickerController advancedExpression;
+
+    public DefaultSearchPanel(FeatureStore store) {
+        this.store = store;
+        this.acctionListeners = ToolsSwingLocator.getToolsSwingManager().createActionListenerSupport();
+        this.searchFields = new ArrayList<>();
+        this.initComponents();
+    }
+
+    @Override
+    public JComponent asJComponent() {
+        return this;
+    }
+
+    @Override
+    public void addActionListener(ActionListener listener) {
+        this.acctionListeners.addActionListener(listener);
+    }
+
+    @Override
+    public ActionListener[] getActionListeners() {
+        return this.acctionListeners.getActionListeners();
+    }
+
+    @Override
+    public void removeActionListener(ActionListener listener) {
+        this.acctionListeners.removeActionListener(listener);
+    }
+
+    @Override
+    public void removeAllActionListener() {
+        this.acctionListeners.removeAllActionListener();
+    }
+
+    @Override
+    public void fireActionEvent(ActionEvent event) {
+        this.acctionListeners.fireActionEvent(event);
+    }
+
+    @Override
+    public boolean hasActionListeners() {
+        return this.acctionListeners.hasActionListeners();
+    }
+
+    private void initComponents() {
+        SearchFieldController controller = new SearchFieldController(
+                store,
+                lblField1,
+                lblExtraFields1,
+                lblRelationalOperator1,
+                cboValue1,
+                lblLogicalOperators1
+        );
+        this.searchFields.add(controller);
+        controller = new SearchFieldController(
+                store,
+                lblField2,
+                lblExtraFields2,
+                lblRelationalOperator2,
+                cboValue2,
+                lblLogicalOperators2
+        );
+        this.searchFields.add(controller);
+        controller = new SearchFieldController(
+                store,
+                lblField3,
+                lblExtraFields3,
+                lblRelationalOperator3,
+                cboValue3,
+                lblLogicalOperators3
+        );
+        this.searchFields.add(controller);
+        controller = new SearchFieldController(
+                store,
+                lblField4,
+                lblExtraFields4,
+                lblRelationalOperator4,
+                cboValue4,
+                null
+        );
+        this.searchFields.add(controller);
+
+        List<FeatureAttributeDescriptor> orderedAttributes = SearchUtils.getOrderedAttributes(
+                this.store, 
+                SearchUtils.BASIC_TYPES_FILTER,
+                SearchUtils.STR_INT_LONG_LABEL_ORDER,
+                5
+        );
+        int n = 0;
+        for (SearchFieldController searchField : searchFields) {
+            searchField.setAttribute(orderedAttributes.get(n++).getName());
+        }
+
+        ExpressionEvaluatorSwingManager expressionSwingManager = ExpressionEvaluatorSwingLocator.getManager();
+        this.advancedExpression = expressionSwingManager.createExpressionPickerController(txtAdvancedExpression, btnAdvancedExpression);
+
+        this.btnSearch.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                doSearch();
+            }
+        });
+
+        this.btnShowForm.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                doShowForm();
+            }
+        });
+        try {
+            this.showFormSingleElement = true;
+            FeatureAttributeDescriptor[] pks = this.store.getDefaultFeatureType().getPrimaryKey();
+            if (pks == null || pks.length < 1) {
+                this.showFormSingleElement = false;
+            }
+        } catch (Exception ex) {
+        }
+        this.btnShowForm.setEnabled(true);
+        
+        this.tblResults.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
+            @Override
+            public void valueChanged(ListSelectionEvent e) {
+                if( e.getValueIsAdjusting() ) {
+                    return;
+                }
+                if( tblResults.getSelectedRowCount()==0 ) {
+                    btnShowForm.setEnabled(true);
+                    return;
+                }
+                btnShowForm.setEnabled(showFormSingleElement);
+            }
+        });
+        this.btnClear.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                clear();
+            }
+        });
+        this.setPreferredSize(new Dimension(700, 450));
+
+        doSearch(null);
+    }
+
+    public void clear() {
+        for (SearchFieldController searchField : searchFields) {
+            searchField.clear();
+        }        
+        this.advancedExpression.set(null);
+    }
+    
+    private void doSearch() {
+        int searchMode = this.tabSearchMode.getSelectedIndex();
+        if (searchMode == 1) { // Avanzada
+            Expression filter = this.advancedExpression.get();
+            if (ExpressionUtils.isPhraseEmpty(filter)) {
+                return;
+            }
+            doSearch(filter);
+            return;
+        }
+        
+        ExpressionBuilder builder = ExpressionUtils.createExpressionBuilder();
+        String relational = OPERATOR_OR;
+        for (SearchFieldController searchField : searchFields) {
+            if( searchField.getAttribute()!=null && searchField.getValue()!=null ) {
+                ExpressionBuilder.BinaryOperator cond = builder.binaryOperator(
+                        searchField.getRelationalOperator(),
+                        searchField.isAttributeAnExpression()?
+                                builder.custom(searchField.getAttribute()):
+                                builder.column(searchField.getAttribute()),
+                        builder.constant(searchField.getValue())                
+                );
+                if( relational.equals(OPERATOR_AND) ) {
+                    builder.and(cond);
+                } else {
+                    builder.or(cond);
+                }
+                relational = searchField.getLogicalOperator();
+            }
+        }
+        if( builder.isEmpty() ) {
+            doSearch(null);
+            return;
+        }
+        this.txtAdvancedExpression.setText(builder.toString());
+        doSearch(ExpressionUtils.createExpression(builder.toString()));
+    }
+
+    private void doSearch(Expression exp) {
+        FeaturesTableModel model;
+        try {
+            List<Feature> features;
+            if (exp == null) {
+                features = this.store.getFeatures();
+            } else {
+                features = this.store.getFeatures(exp);
+            }
+            this.currentSearch = exp;
+            model = new FeaturesTableModel(
+                    this.store.getDefaultFeatureType(),
+                    null,
+                    features
+            );
+            this.tblResults.setModel(model);
+            this.lblMsg.setText(String.format("%d elementos", features.size()));
+        } catch (DataException ex) {
+
+        }
+    }
+
+    private void doShowForm() {
+        try {
+            this.btnShowForm.setEnabled(false);
+            DataSwingManager dataSwingManager = DALSwingLocator.getSwingManager();
+
+            Expression filter;
+            int selectedRow = this.tblResults.getSelectedRow();
+            if( selectedRow<0 ) {
+                filter = this.currentSearch;
+            } else {
+                List<Feature> features = ((FeaturesTableModel) this.tblResults.getModel()).getFeatures();
+                Feature feature = features.get(selectedRow);
+
+                ExpressionBuilder builder = ExpressionUtils.createExpressionBuilder();
+                FeatureType ftype = this.store.getDefaultFeatureType();
+                for (FeatureAttributeDescriptor attrdesc : ftype.getPrimaryKey()) {
+                    builder.and(
+                            builder.eq(
+                                    builder.column(attrdesc.getName()),
+                                    builder.constant(feature.get(attrdesc.getName()))
+                            )
+                    );
+                }
+                filter = ExpressionUtils.createExpression(builder.toString());
+            }
+            FeatureQuery query = store.createFeatureQuery();
+            query.setFilter(filter);
+            query.retrievesAllAttributes();
+            JFeaturesForm form = dataSwingManager.createJFeaturesForm(store);
+            form.setQuery(query);
+            form.showForm(WindowManager.MODE.WINDOW);
+
+        } catch (Exception ex) {
+            LOGGER.warn("Can't show form", ex);
+        } finally {
+            this.btnShowForm.setEnabled(true);
+        }
+    }
+
+    @Override
+    public ImageIcon loadImage(String imageName) {
+        String name = FilenameUtils.getBaseName(imageName);
+        IconTheme theme = ToolsSwingLocator.getIconThemeManager().getDefault();
+        if (theme.exists(name)) {
+            return theme.get(name);
+        }
+        URL url = this.getClass().getResource(name + ".png");
+        if (url == null) {
+            return null;
+        }
+        return new ImageIcon(url);
+    }
+
+    public static void selfRegister() {
+        String[][] iconNames = new String[][] {
+            new String[] { "dalswing", "featurestore-search-attribute-selector" }
+        };
+        IconTheme theme = ToolsSwingLocator.getIconThemeManager().getCurrent();
+        for (String[] icon : iconNames) {
+            URL url = DefaultSearchPanel.class.getResource(icon[1]+".png");
+            theme.registerDefault("DALSwing", icon[0], icon[1], null, url);
+        }
+        
+        
+    }
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/RecentUsedsAttributesImpl.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/RecentUsedsAttributesImpl.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/RecentUsedsAttributesImpl.java	(revision 44259)
@@ -0,0 +1,65 @@
+package org.gvsig.fmap.dal.swing.impl.searchpanel;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.collections4.queue.CircularFifoQueue;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class RecentUsedsAttributesImpl {
+
+    private final Map<String,CircularFifoQueue<String>> recentsForStore;
+    
+    public RecentUsedsAttributesImpl() {
+        this.recentsForStore = new HashMap<>();
+    }
+    
+    public Collection<String> getNames(FeatureType featureType) {
+        FeatureStore store = featureType.getStore();
+        CircularFifoQueue<String> recents = this.recentsForStore.get(store.getFullName());
+        if( recents==null ) {
+            return Collections.EMPTY_LIST;
+        }
+        return recents;
+    }
+    
+    public Collection<FeatureAttributeDescriptor> getAttributes(FeatureType featureType) {
+        List<FeatureAttributeDescriptor> r = new ArrayList<>();
+        for (String name : this.getNames(featureType)) {
+            r.add(featureType.getAttributeDescriptor(name));
+        }
+        return r;
+    }
+
+    public void add(FeatureAttributeDescriptor attribute) {
+        this.add(attribute.getFeatureType(), attribute.getName());
+    }
+    
+    public void add(FeatureType featureType, FeatureAttributeDescriptor attribute) {
+        this.add(featureType, attribute.getName());
+    }
+    
+    public void add(FeatureType featureType, String name) {
+        String storeFullName = featureType.getStore().getFullName();
+        CircularFifoQueue<String> recents = this.recentsForStore.get(storeFullName);
+        if( recents==null ) {
+            recents = new CircularFifoQueue(this.getMaxSize());
+            this.recentsForStore.put(storeFullName, recents);
+        }
+        recents.remove(name);
+        recents.add(name);
+    }
+
+    public int getMaxSize() {
+        return 6;
+    }
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/SearchFieldController.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/SearchFieldController.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/SearchFieldController.java	(revision 44259)
@@ -0,0 +1,329 @@
+package org.gvsig.fmap.dal.swing.impl.searchpanel;
+
+import java.awt.Cursor;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import javax.swing.ComboBoxModel;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.expressionevaluator.ExpressionBuilder;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.tools.dataTypes.CoercionException;
+import org.gvsig.tools.dataTypes.DataTypesManager;
+import org.gvsig.tools.exception.BaseException;
+import org.gvsig.tools.swing.api.DropDown;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.ToolsSwingManager;
+import org.gvsig.tools.util.LabeledValue;
+import org.gvsig.tools.util.LabeledValueImpl;
+import org.gvsig.tools.visitor.VisitCanceledException;
+import org.gvsig.tools.visitor.Visitor;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+@SuppressWarnings("UseSpecificCatch")
+public class SearchFieldController {
+
+    private static class FeatureAttribute extends LabeledValueImpl<String> {
+
+        FeatureAttributeDescriptor attrdesc;
+
+        public FeatureAttribute(FeatureAttributeDescriptor attrdesc) {
+            this(attrdesc, null, null);
+        }
+        
+        public FeatureAttribute(FeatureAttributeDescriptor attrdesc, String label, String value) {
+            super(
+                    ObjectUtils.defaultIfNull(label, attrdesc.getLabel()), 
+                    ObjectUtils.defaultIfNull(value, attrdesc.getName())
+            );
+            this.attrdesc = attrdesc;
+        }
+        
+        public FeatureAttributeDescriptor getDescriptor() {
+            return this.attrdesc;
+        }
+        
+        public boolean isExpression() {
+            FeatureType type = this.attrdesc.getFeatureType();
+            if( type == null ) {
+                return false;
+            }
+            Object x = type.get(this.getValue());
+            return x==null;
+        }
+
+    }
+
+    private FeatureStore store;
+    private final JLabel lblFields;
+    private final JLabel lblExtraFields;
+    private final JLabel lblLogicalOperators;
+    private final JLabel lblRelationalOperators;
+    private final JComboBox cboValue;
+
+    private DropDown ddnFields;
+    private DropDown ddnLogicalOperators;
+    private DropDown ddnRelationalOperators;
+
+
+
+    private final LabeledValue[] relationalOperators = {
+        new LabeledValueImpl("Equals to", ExpressionBuilder.OPERATOR_EQ),
+        new LabeledValueImpl("Like to", ExpressionBuilder.OPERATOR_ILIKE),
+        new LabeledValueImpl("Not equals to", ExpressionBuilder.OPERATOR_NE),
+        new LabeledValueImpl("Greater than", ExpressionBuilder.OPERATOR_GT),
+        new LabeledValueImpl("Greater or equal to", ExpressionBuilder.OPERATOR_GE),
+        new LabeledValueImpl("Less than", ExpressionBuilder.OPERATOR_LT),
+        new LabeledValueImpl("Less or equal to", ExpressionBuilder.OPERATOR_LE)
+    };
+    private final LabeledValue[] logicalOperators = {
+        new LabeledValueImpl("Or", ExpressionBuilder.OPERATOR_OR),
+        new LabeledValueImpl("And", ExpressionBuilder.OPERATOR_AND)
+    };
+
+    public SearchFieldController(
+            FeatureStore store,
+            JLabel lblFields,
+            JLabel lblExtraFields,
+            JLabel lblRelationalOperators,
+            JComboBox cboValue,
+            JLabel lblLogicalOperators
+    ) {
+        this.store = store;
+        this.lblFields = lblFields;
+        this.lblExtraFields = lblExtraFields;
+        this.lblRelationalOperators = lblRelationalOperators;
+        this.cboValue = cboValue;
+        this.lblLogicalOperators = lblLogicalOperators;
+        this.initComponents();
+    }
+
+    private void initComponents() {
+        try {
+            ToolsSwingManager toolsSwingManager = ToolsSwingLocator.getToolsSwingManager();
+            this.lblExtraFields.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+
+            this.ddnFields = toolsSwingManager.createDropDown(lblFields);
+            this.ddnRelationalOperators = toolsSwingManager.createDropDown(lblRelationalOperators);
+            if( lblLogicalOperators!=null ) {
+                this.ddnLogicalOperators = toolsSwingManager.createDropDown(lblLogicalOperators);
+            }
+
+            DefaultComboBoxModel modelRelationalOperators = new DefaultComboBoxModel();
+            for (LabeledValue op : relationalOperators) {
+                modelRelationalOperators.addElement(op);
+            }
+            this.ddnRelationalOperators.setModel(modelRelationalOperators);
+
+            if( this.ddnLogicalOperators!=null ) {
+                DefaultComboBoxModel modelLogicalOperators = new DefaultComboBoxModel();
+                for (LabeledValue op : logicalOperators) {
+                    modelLogicalOperators.addElement(op);
+                }
+                this.ddnLogicalOperators.setModel(modelLogicalOperators);
+            }
+            
+            List<FeatureAttributeDescriptor> orderedAttributes = SearchUtils.getOrderedAttributes(
+                    this.store, 
+                    SearchUtils.BASIC_TYPES_FILTER,
+                    SearchUtils.STR_INT_LONG_LABEL_ORDER,
+                    20
+            );
+            DefaultComboBoxModel model = new DefaultComboBoxModel();
+            for (FeatureAttributeDescriptor attrdesc : orderedAttributes) {
+                model.addElement(new FeatureAttribute(attrdesc));
+            }
+
+            this.ddnFields.setModel(model);
+            this.ddnFields.addItemListener(new ItemListener() {
+                @Override
+                public void itemStateChanged(ItemEvent e) {
+                    if (e.getStateChange() == ItemEvent.SELECTED) {
+                        doUpdateValuesList();
+                    }
+
+                }
+            });
+            
+            this.lblExtraFields.addMouseListener(new MouseAdapter() {
+                @Override
+                public void mouseClicked(MouseEvent e) {
+                    doSelectExtraField();
+                }
+            });
+            clear();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    private void doSelectExtraField() {
+        
+    }
+    
+    public void clear() {
+        this.ddnRelationalOperators.setSelectedIndex(0);
+        if( this.ddnLogicalOperators!=null ) {
+            this.ddnLogicalOperators.setSelectedIndex(0);
+        }
+        this.cboValue.setSelectedIndex(-1);
+    }
+    
+    private void doUpdateValuesList() {
+        final FeatureAttribute attribute = (FeatureAttribute) this.ddnFields.getSelectedItem();
+        if( attribute==null ) {
+            return;
+        }        
+        final List<Object> values = new ArrayList<>();
+        final int limit = 60;
+        final long timeLimit = System.currentTimeMillis() + limit * 1000;
+        try {
+            FeatureSet set = this.store.getFeatureSet();
+            set.accept(new Visitor() {
+                @Override
+                public void visit(Object o) throws VisitCanceledException, BaseException {
+                    Object value = ((Feature) o).get(attribute.getDescriptor().getName());
+                    if (!values.contains(value)) {
+                        values.add(value);
+                    }
+                    if (System.currentTimeMillis() > timeLimit) {
+                        throw new VisitCanceledException();
+                    }
+                    if (values.size()>1000 ) {
+                        throw new VisitCanceledException();
+                    }
+                }
+            });
+        } catch (VisitCanceledException ex) {
+
+        } catch (Exception ex) {
+            // FIXME
+        }
+        List<LabeledValue> elements = new ArrayList<>();
+        if (!values.isEmpty()) {
+            LabeledValue[] availableValues = attribute.getDescriptor().getAvailableValues();
+            Map<String, String> availableValuesMap = new HashMap<>();
+            if (availableValues != null) {
+                for (LabeledValue availableValue : availableValues) {
+                    availableValuesMap.put(
+                            Objects.toString(availableValue.getValue()),
+                            availableValue.getLabel()
+                    );
+                }
+            }
+            elements.add(new LabeledValueImpl("", null));
+            for (Object value : values) {
+                String key = Objects.toString(value);
+                String label = availableValuesMap.getOrDefault(key, key);
+                elements.add(new LabeledValueImpl(label, value));
+            }
+        }
+        DefaultComboBoxModel model = new DefaultComboBoxModel();
+        for (LabeledValue element : elements) {
+            model.addElement(element);
+        }
+        this.cboValue.setModel(model);
+    }
+
+    public String getRelationalOperator() {
+        LabeledValue<String> op = (LabeledValue) this.ddnRelationalOperators.getSelectedItem();
+        if( op == null ) {
+            return null;
+        }
+        return op.getValue();
+    }
+    
+    public String getLogicalOperator() {
+        if( this.ddnLogicalOperators==null ) {
+            return null;
+        }
+        LabeledValue<String> rel = (LabeledValue) this.ddnLogicalOperators.getSelectedItem();
+        if( rel == null ) {
+            return null;
+        }
+        return rel.getValue();
+    }
+    
+    public Object getValue() {
+        final FeatureAttribute attribute = (FeatureAttribute) this.ddnFields.getSelectedItem();
+        if( attribute==null ) {
+            return null;
+        }
+        Object v = this.cboValue.getSelectedItem();
+        if( v == null ) {
+            return null;
+        }
+        if( v instanceof LabeledValue ) {
+            v = ((LabeledValue)v).getValue();
+            if( v == null ) {
+                return null;
+            }
+        }
+        if( v instanceof CharSequence ) {
+            if( StringUtils.isBlank((CharSequence) v)) {
+                return null;
+            }
+        }
+        DataTypesManager.Coercion coercion = attribute.getDescriptor().getDataType().getCoercion();
+        try {
+            return coercion.coerce(v);
+        } catch (CoercionException ex) {
+            return null;
+        }
+    }
+    
+    public boolean isAttributeAnExpression() {
+        final FeatureAttribute attribute = (FeatureAttribute) this.ddnFields.getSelectedItem();
+        if( attribute==null ) {
+            return false;
+        }
+        return attribute.isExpression();
+    }
+    
+    public String getAttribute() {
+        final FeatureAttribute attribute = (FeatureAttribute) this.ddnFields.getSelectedItem();
+        if( attribute==null ) {
+            return null;
+        }
+        SearchUtils.getRecentUseds().add(attribute.getDescriptor());
+        return attribute.getValue();
+    }
+    
+    public void setAttribute(String name) {
+        ComboBoxModel<FeatureAttribute> model = this.ddnFields.getModel();
+        for (int i = 0; i < model.getSize(); i++) {
+            FeatureAttribute x = model.getElementAt(i);
+            if( StringUtils.equalsIgnoreCase(name, x.getLabel())) {
+                this.ddnFields.setSelectedIndex(i);
+                return;
+            }
+        }
+        this.ddnFields.setSelectedIndex(-1);
+    }
+    
+    public void setAttribute(int index) {
+        try {
+            this.ddnFields.setSelectedIndex(index);
+        } catch(Exception ex) {
+            this.ddnFields.setSelectedIndex(-1);
+        }
+    }
+    
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView.xml	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView.xml	(revision 44259)
@@ -0,0 +1,2345 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<object classname="com.jeta.forms.store.memento.FormPackage">
+ <at name="fileversion">
+  <object classname="com.jeta.forms.store.memento.FormsVersion2">
+   <at name="major">2</at>
+   <at name="minor">0</at>
+   <at name="sub">0</at>
+  </object>
+ </at>
+ <at name="form">
+  <object classname="com.jeta.forms.store.memento.FormMemento">
+   <super classname="com.jeta.forms.store.memento.ComponentMemento">
+    <at name="cellconstraints">
+     <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+      <at name="column">1</at>
+      <at name="row">1</at>
+      <at name="colspan">1</at>
+      <at name="rowspan">1</at>
+      <at name="halign">default</at>
+      <at name="valign">default</at>
+      <at name="insets" object="insets">0,0,0,0</at>
+     </object>
+    </at>
+    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+   </super>
+   <at name="id">/home/jjdelcerro/datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView.xml</at>
+   <at name="path">datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView.xml</at>
+   <at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
+   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at>
+   <at name="components">
+    <object classname="java.util.LinkedList">
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">2</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.FormContainerComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JTabbedPane</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JTabbedPane</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="top">2</at>
+                   <at name="left">2</at>
+                   <at name="bottom">2</at>
+                   <at name="right">2</at>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="componentCount">2</at>
+            <at name="tabPlacement">3</at>
+            <at name="name">tabSearchMode</at>
+            <at name="tabs">
+             <object classname="com.jeta.forms.store.properties.TabbedPaneProperties">
+              <at name="name">tabs</at>
+              <at name="items">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.TabProperty">
+                   <at name="name">tab</at>
+                   <at name="title">Simplificada</at>
+                   <at name="icon">
+                    <object classname="com.jeta.forms.store.properties.IconProperty">
+                     <at name="embedded">false</at>
+                     <at name="width">0</at>
+                     <at name="height">0</at>
+                    </object>
+                   </at>
+                   <at name="form">
+                    <object classname="com.jeta.forms.store.memento.FormMemento">
+                     <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                      <at name="cellconstraints">
+                       <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                        <at name="column">1</at>
+                        <at name="row">1</at>
+                        <at name="colspan">1</at>
+                        <at name="rowspan">1</at>
+                        <at name="halign">default</at>
+                        <at name="valign">default</at>
+                        <at name="insets" object="insets">0,0,0,0</at>
+                       </object>
+                      </at>
+                      <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+                     </super>
+                     <at name="id">embedded.989595039</at>
+                     <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
+                     <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE</at>
+                     <at name="components">
+                      <object classname="java.util.LinkedList">
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">2</at>
+                             <at name="row">6</at>
+                             <at name="colspan">3</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">javax.swing.JComboBox</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">javax.swing.JComboBox</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="componentCount">3</at>
+                              <at name="editable">true</at>
+                              <at name="requestFocusEnabled">false</at>
+                              <at name="name">cboValue1</at>
+                              <at name="width">172</at>
+                              <at name="items">
+                               <object classname="com.jeta.forms.store.properties.ItemsProperty">
+                                <at name="name">items</at>
+                               </object>
+                              </at>
+                              <at name="height">20</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">8</at>
+                             <at name="row">6</at>
+                             <at name="colspan">3</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">javax.swing.JComboBox</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">javax.swing.JComboBox</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="componentCount">3</at>
+                              <at name="editable">true</at>
+                              <at name="requestFocusEnabled">false</at>
+                              <at name="name">cboValue2</at>
+                              <at name="width">171</at>
+                              <at name="items">
+                               <object classname="com.jeta.forms.store.properties.ItemsProperty">
+                                <at name="name">items</at>
+                               </object>
+                              </at>
+                              <at name="height">20</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">14</at>
+                             <at name="row">6</at>
+                             <at name="colspan">3</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">javax.swing.JComboBox</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">javax.swing.JComboBox</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="componentCount">3</at>
+                              <at name="editable">true</at>
+                              <at name="requestFocusEnabled">false</at>
+                              <at name="name">cboValue3</at>
+                              <at name="width">172</at>
+                              <at name="items">
+                               <object classname="com.jeta.forms.store.properties.ItemsProperty">
+                                <at name="name">items</at>
+                               </object>
+                              </at>
+                              <at name="height">20</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">20</at>
+                             <at name="row">6</at>
+                             <at name="colspan">2</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">javax.swing.JComboBox</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">javax.swing.JComboBox</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="componentCount">3</at>
+                              <at name="editable">true</at>
+                              <at name="requestFocusEnabled">false</at>
+                              <at name="name">cboValue4</at>
+                              <at name="width">164</at>
+                              <at name="items">
+                               <object classname="com.jeta.forms.store.properties.ItemsProperty">
+                                <at name="name">items</at>
+                               </object>
+                              </at>
+                              <at name="height">20</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">2</at>
+                             <at name="row">4</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblRelationalOperator1</at>
+                              <at name="width">145</at>
+                              <at name="text">Igual</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">14</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">8</at>
+                             <at name="row">4</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblRelationalOperator2</at>
+                              <at name="width">144</at>
+                              <at name="text">Igual</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">14</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">14</at>
+                             <at name="row">4</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblRelationalOperator3</at>
+                              <at name="width">145</at>
+                              <at name="text">Igual</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">14</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">20</at>
+                             <at name="row">4</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblRelationalOperator4</at>
+                              <at name="width">144</at>
+                              <at name="text">Igual</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">14</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">6</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblLogicalOperators1</at>
+                              <at name="width">45</at>
+                              <at name="text">WWWWW</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">14</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">12</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblLogicalOperators2</at>
+                              <at name="width">45</at>
+                              <at name="text">WWWWW</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">14</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">18</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblLogicalOperators3</at>
+                              <at name="width">45</at>
+                              <at name="text">WWWWW</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">14</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">2</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblField1</at>
+                              <at name="width">145</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">12</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">8</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblField2</at>
+                              <at name="width">144</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">12</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">14</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblField3</at>
+                              <at name="width">145</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">12</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">20</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="horizontalAlignment">0</at>
+                              <at name="name">lblField4</at>
+                              <at name="width">144</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">12</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">4</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="icon">
+                               <object classname="com.jeta.forms.store.properties.IconProperty">
+                                <at name="embedded">false</at>
+                                <at name="path">datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png</at>
+                                <at name="description">featurestore-search-attribute-selector.png</at>
+                                <at name="width">16</at>
+                                <at name="height">16</at>
+                               </object>
+                              </at>
+                              <at name="name">lblExtraFields1</at>
+                              <at name="width">16</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">16</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">10</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="icon">
+                               <object classname="com.jeta.forms.store.properties.IconProperty">
+                                <at name="embedded">false</at>
+                                <at name="path">datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png</at>
+                                <at name="description">featurestore-search-attribute-selector.png</at>
+                                <at name="width">16</at>
+                                <at name="height">16</at>
+                               </object>
+                              </at>
+                              <at name="name">lblExtraFields2</at>
+                              <at name="width">16</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">16</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">16</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="icon">
+                               <object classname="com.jeta.forms.store.properties.IconProperty">
+                                <at name="embedded">false</at>
+                                <at name="path">datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png</at>
+                                <at name="description">featurestore-search-attribute-selector.png</at>
+                                <at name="width">16</at>
+                                <at name="height">16</at>
+                               </object>
+                              </at>
+                              <at name="name">lblExtraFields3</at>
+                              <at name="width">16</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">16</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">21</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="icon">
+                               <object classname="com.jeta.forms.store.properties.IconProperty">
+                                <at name="embedded">false</at>
+                                <at name="path">datos/devel/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-search-attribute-selector.png</at>
+                                <at name="description">featurestore-search-attribute-selector.png</at>
+                                <at name="width">16</at>
+                                <at name="height">16</at>
+                               </object>
+                              </at>
+                              <at name="name">lblExtraFields4</at>
+                              <at name="width">16</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">16</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                      </object>
+                     </at>
+                     <at name="properties">
+                      <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                       <at name="classname">com.jeta.forms.gui.form.GridView</at>
+                       <at name="properties">
+                        <object classname="com.jeta.forms.store.support.PropertyMap">
+                         <at name="border">
+                          <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                           <super classname="com.jeta.forms.store.properties.BorderProperty">
+                            <at name="name">border</at>
+                           </super>
+                           <at name="borders">
+                            <object classname="java.util.LinkedList"/>
+                           </at>
+                          </object>
+                         </at>
+                         <at name="name"/>
+                         <at name="fill">
+                          <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                           <at name="name">fill</at>
+                          </object>
+                         </at>
+                         <at name="scollBars">
+                          <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+                           <at name="name">scollBars</at>
+                           <at name="verticalpolicy">21</at>
+                           <at name="horizontalpolicy">31</at>
+                           <at name="border">
+                            <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                             <super classname="com.jeta.forms.store.properties.BorderProperty">
+                              <at name="name">border</at>
+                             </super>
+                             <at name="borders">
+                              <object classname="java.util.LinkedList">
+                               <item >
+                                <at name="value">
+                                 <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                  <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                   <at name="name">border</at>
+                                  </super>
+                                 </object>
+                                </at>
+                               </item>
+                              </object>
+                             </at>
+                            </object>
+                           </at>
+                          </object>
+                         </at>
+                        </object>
+                       </at>
+                      </object>
+                     </at>
+                     <at name="cellpainters">
+                      <object classname="com.jeta.forms.store.support.Matrix">
+                       <at name="rows">
+                        <object classname="[Ljava.lang.Object;" size="7">
+                         <at name="item" index="0">
+                          <object classname="[Ljava.lang.Object;" size="22"/>
+                         </at>
+                         <at name="item" index="1">
+                          <object classname="[Ljava.lang.Object;" size="22"/>
+                         </at>
+                         <at name="item" index="2">
+                          <object classname="[Ljava.lang.Object;" size="22"/>
+                         </at>
+                         <at name="item" index="3">
+                          <object classname="[Ljava.lang.Object;" size="22"/>
+                         </at>
+                         <at name="item" index="4">
+                          <object classname="[Ljava.lang.Object;" size="22"/>
+                         </at>
+                         <at name="item" index="5">
+                          <object classname="[Ljava.lang.Object;" size="22"/>
+                         </at>
+                         <at name="item" index="6">
+                          <object classname="[Ljava.lang.Object;" size="22"/>
+                         </at>
+                        </object>
+                       </at>
+                      </object>
+                     </at>
+                     <at name="rowgroups">
+                      <object classname="com.jeta.forms.store.memento.FormGroupSet">
+                       <at name="groups">
+                        <object classname="java.util.HashMap"/>
+                       </at>
+                      </object>
+                     </at>
+                     <at name="colgroups">
+                      <object classname="com.jeta.forms.store.memento.FormGroupSet">
+                       <at name="groups">
+                        <object classname="java.util.HashMap"/>
+                       </at>
+                      </object>
+                     </at>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                </item>
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.TabProperty">
+                   <at name="name">tab</at>
+                   <at name="title">Avanzada</at>
+                   <at name="icon">
+                    <object classname="com.jeta.forms.store.properties.IconProperty">
+                     <at name="embedded">false</at>
+                     <at name="width">0</at>
+                     <at name="height">0</at>
+                    </object>
+                   </at>
+                   <at name="form">
+                    <object classname="com.jeta.forms.store.memento.FormMemento">
+                     <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                      <at name="cellconstraints">
+                       <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                        <at name="column">1</at>
+                        <at name="row">1</at>
+                        <at name="colspan">1</at>
+                        <at name="rowspan">1</at>
+                        <at name="halign">default</at>
+                        <at name="valign">default</at>
+                        <at name="insets" object="insets">0,0,0,0</at>
+                       </object>
+                      </at>
+                      <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+                     </super>
+                     <at name="id">embedded.1548750249</at>
+                     <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
+                     <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at>
+                     <at name="components">
+                      <object classname="java.util.LinkedList">
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">2</at>
+                             <at name="row">4</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">javax.swing.JTextField</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">javax.swing.JTextField</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="name">txtAdvancedExpression</at>
+                              <at name="width">857</at>
+                              <at name="height">20</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">2</at>
+                             <at name="row">2</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="name">lblExpressionDeBusqueda</at>
+                              <at name="width">857</at>
+                              <at name="text">Introduzca una expresion de busqueda</at>
+                              <at name="fill">
+                               <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                                <at name="name">fill</at>
+                               </object>
+                              </at>
+                              <at name="height">14</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                       <item >
+                        <at name="value">
+                         <object classname="com.jeta.forms.store.memento.BeanMemento">
+                          <super classname="com.jeta.forms.store.memento.ComponentMemento">
+                           <at name="cellconstraints">
+                            <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                             <at name="column">4</at>
+                             <at name="row">4</at>
+                             <at name="colspan">1</at>
+                             <at name="rowspan">1</at>
+                             <at name="halign">default</at>
+                             <at name="valign">default</at>
+                             <at name="insets" object="insets">0,0,0,0</at>
+                            </object>
+                           </at>
+                           <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+                          </super>
+                          <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+                          <at name="beanclass">javax.swing.JButton</at>
+                          <at name="beanproperties">
+                           <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                            <at name="classname">javax.swing.JButton</at>
+                            <at name="properties">
+                             <object classname="com.jeta.forms.store.support.PropertyMap">
+                              <at name="border">
+                               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                 <at name="name">border</at>
+                                </super>
+                                <at name="borders">
+                                 <object classname="java.util.LinkedList">
+                                  <item >
+                                   <at name="value">
+                                    <object classname="com.jeta.forms.store.properties.EmptyBorderProperty">
+                                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                      <at name="name">border</at>
+                                     </super>
+                                     <at name="top">2</at>
+                                     <at name="left">2</at>
+                                     <at name="bottom">2</at>
+                                     <at name="right">2</at>
+                                    </object>
+                                   </at>
+                                  </item>
+                                 </object>
+                                </at>
+                               </object>
+                              </at>
+                              <at name="actionCommand">...</at>
+                              <at name="name">btnAdvancedExpression</at>
+                              <at name="width">12</at>
+                              <at name="height">12</at>
+                             </object>
+                            </at>
+                           </object>
+                          </at>
+                         </object>
+                        </at>
+                       </item>
+                      </object>
+                     </at>
+                     <at name="properties">
+                      <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+                       <at name="classname">com.jeta.forms.gui.form.GridView</at>
+                       <at name="properties">
+                        <object classname="com.jeta.forms.store.support.PropertyMap">
+                         <at name="border">
+                          <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                           <super classname="com.jeta.forms.store.properties.BorderProperty">
+                            <at name="name">border</at>
+                           </super>
+                           <at name="borders">
+                            <object classname="java.util.LinkedList"/>
+                           </at>
+                          </object>
+                         </at>
+                         <at name="name"/>
+                         <at name="fill">
+                          <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                           <at name="name">fill</at>
+                          </object>
+                         </at>
+                         <at name="scollBars">
+                          <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+                           <at name="name">scollBars</at>
+                           <at name="verticalpolicy">21</at>
+                           <at name="horizontalpolicy">31</at>
+                           <at name="border">
+                            <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                             <super classname="com.jeta.forms.store.properties.BorderProperty">
+                              <at name="name">border</at>
+                             </super>
+                             <at name="borders">
+                              <object classname="java.util.LinkedList">
+                               <item >
+                                <at name="value">
+                                 <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                                  <super classname="com.jeta.forms.store.properties.BorderProperty">
+                                   <at name="name">border</at>
+                                  </super>
+                                 </object>
+                                </at>
+                               </item>
+                              </object>
+                             </at>
+                            </object>
+                           </at>
+                          </object>
+                         </at>
+                        </object>
+                       </at>
+                      </object>
+                     </at>
+                     <at name="cellpainters">
+                      <object classname="com.jeta.forms.store.support.Matrix">
+                       <at name="rows">
+                        <object classname="[Ljava.lang.Object;" size="5">
+                         <at name="item" index="0">
+                          <object classname="[Ljava.lang.Object;" size="5"/>
+                         </at>
+                         <at name="item" index="1">
+                          <object classname="[Ljava.lang.Object;" size="5"/>
+                         </at>
+                         <at name="item" index="2">
+                          <object classname="[Ljava.lang.Object;" size="5"/>
+                         </at>
+                         <at name="item" index="3">
+                          <object classname="[Ljava.lang.Object;" size="5"/>
+                         </at>
+                         <at name="item" index="4">
+                          <object classname="[Ljava.lang.Object;" size="5"/>
+                         </at>
+                        </object>
+                       </at>
+                      </object>
+                     </at>
+                     <at name="rowgroups">
+                      <object classname="com.jeta.forms.store.memento.FormGroupSet">
+                       <at name="groups">
+                        <object classname="java.util.HashMap"/>
+                       </at>
+                      </object>
+                     </at>
+                     <at name="colgroups">
+                      <object classname="com.jeta.forms.store.memento.FormGroupSet">
+                       <at name="groups">
+                        <object classname="java.util.HashMap"/>
+                       </at>
+                      </object>
+                     </at>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="width">929</at>
+            <at name="tabCount">2</at>
+            <at name="height">154</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.FormMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">3</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+        </super>
+        <at name="id">embedded.2139527583</at>
+        <at name="rowspecs">CENTER:DEFAULT:NONE</at>
+        <at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at>
+        <at name="components">
+         <object classname="java.util.LinkedList">
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">4</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JButton</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JButton</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="actionCommand">Buscar</at>
+                 <at name="name">btnSearch</at>
+                 <at name="width">72</at>
+                 <at name="text">Buscar</at>
+                 <at name="height">22</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">2</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JButton</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JButton</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="actionCommand">Limpiar</at>
+                 <at name="name">btnClear</at>
+                 <at name="width">74</at>
+                 <at name="text">Limpiar</at>
+                 <at name="height">22</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+         </object>
+        </at>
+        <at name="properties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">com.jeta.forms.gui.form.GridView</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList"/>
+              </at>
+             </object>
+            </at>
+            <at name="name"/>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="scollBars">
+             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+              <at name="name">scollBars</at>
+              <at name="verticalpolicy">21</at>
+              <at name="horizontalpolicy">31</at>
+              <at name="border">
+               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+                <at name="borders">
+                 <object classname="java.util.LinkedList">
+                  <item >
+                   <at name="value">
+                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                    </object>
+                   </at>
+                  </item>
+                 </object>
+                </at>
+               </object>
+              </at>
+             </object>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="cellpainters">
+         <object classname="com.jeta.forms.store.support.Matrix">
+          <at name="rows">
+           <object classname="[Ljava.lang.Object;" size="1">
+            <at name="item" index="0">
+             <object classname="[Ljava.lang.Object;" size="4"/>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="rowgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+        <at name="colgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">5</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JTable</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JTable</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">tblResults</at>
+            <at name="width">927</at>
+            <at name="scollBars">
+             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+              <at name="name">scollBars</at>
+              <at name="verticalpolicy">20</at>
+              <at name="horizontalpolicy">30</at>
+              <at name="border">
+               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+                <at name="borders">
+                 <object classname="java.util.LinkedList">
+                  <item >
+                   <at name="value">
+                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                    </object>
+                   </at>
+                  </item>
+                 </object>
+                </at>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="height">32</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.FormMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">7</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+        </super>
+        <at name="id">embedded.1245678644</at>
+        <at name="rowspecs">CENTER:DEFAULT:NONE</at>
+        <at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE</at>
+        <at name="components">
+         <object classname="java.util.LinkedList">
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">6</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JButton</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JButton</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="actionCommand">Ver</at>
+                 <at name="name">btnShowForm</at>
+                 <at name="width">139</at>
+                 <at name="text">Mostrar formulario</at>
+                 <at name="height">22</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">1</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">lblMsg</at>
+                 <at name="width">717</at>
+                 <at name="fill">
+                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                   <at name="name">fill</at>
+                  </object>
+                 </at>
+                 <at name="height">12</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+         </object>
+        </at>
+        <at name="properties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">com.jeta.forms.gui.form.GridView</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList"/>
+              </at>
+             </object>
+            </at>
+            <at name="name"/>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="scollBars">
+             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+              <at name="name">scollBars</at>
+              <at name="verticalpolicy">21</at>
+              <at name="horizontalpolicy">31</at>
+              <at name="border">
+               <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+                <at name="borders">
+                 <object classname="java.util.LinkedList">
+                  <item >
+                   <at name="value">
+                    <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                     <super classname="com.jeta.forms.store.properties.BorderProperty">
+                      <at name="name">border</at>
+                     </super>
+                    </object>
+                   </at>
+                  </item>
+                 </object>
+                </at>
+               </object>
+              </at>
+             </object>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="cellpainters">
+         <object classname="com.jeta.forms.store.support.Matrix">
+          <at name="rows">
+           <object classname="[Ljava.lang.Object;" size="1">
+            <at name="item" index="0">
+             <object classname="[Ljava.lang.Object;" size="6"/>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="rowgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+        <at name="colgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+    </object>
+   </at>
+   <at name="properties">
+    <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+     <at name="classname">com.jeta.forms.gui.form.GridView</at>
+     <at name="properties">
+      <object classname="com.jeta.forms.store.support.PropertyMap">
+       <at name="border">
+        <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+         <super classname="com.jeta.forms.store.properties.BorderProperty">
+          <at name="name">border</at>
+         </super>
+         <at name="borders">
+          <object classname="java.util.LinkedList"/>
+         </at>
+        </object>
+       </at>
+       <at name="name"/>
+       <at name="fill">
+        <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+         <at name="name">fill</at>
+        </object>
+       </at>
+       <at name="scollBars">
+        <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+         <at name="name">scollBars</at>
+         <at name="verticalpolicy">21</at>
+         <at name="horizontalpolicy">31</at>
+         <at name="border">
+          <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+           <super classname="com.jeta.forms.store.properties.BorderProperty">
+            <at name="name">border</at>
+           </super>
+           <at name="borders">
+            <object classname="java.util.LinkedList">
+             <item >
+              <at name="value">
+               <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                <super classname="com.jeta.forms.store.properties.BorderProperty">
+                 <at name="name">border</at>
+                </super>
+               </object>
+              </at>
+             </item>
+            </object>
+           </at>
+          </object>
+         </at>
+        </object>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="cellpainters">
+    <object classname="com.jeta.forms.store.support.Matrix">
+     <at name="rows">
+      <object classname="[Ljava.lang.Object;" size="8">
+       <at name="item" index="0">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="1">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="2">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="3">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="4">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="5">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="6">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="7">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="rowgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+   <at name="colgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+  </object>
+ </at>
+</object>
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureTypeAttributePanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureTypeAttributePanel.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretype/DefaultFeatureTypeAttributePanel.java	(revision 44259)
@@ -414,11 +414,9 @@
         this.txtMaxValue.setEnabled(false);
         
         this.btnVirtualField.setText("");
+        this.featureStoreElement = dataSwingManager.createFeatureStoreElement();
         this.pickerVirtualField = ExpressionEvaluatorSwingLocator.getManager()
                 .createExpressionPickerController(txtVirtualField, btnVirtualField);
-        this.featureStoreElement = dataSwingManager.createFeatureStoreElement(
-                this.pickerVirtualField
-        );
         this.pickerVirtualField.addElement(this.featureStoreElement);
         this.chkVirtualField.addChangeListener(new ChangeListener() {
             @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/DefaultDataSwingManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/DefaultDataSwingManager.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/DefaultDataSwingManager.java	(revision 44259)
@@ -64,7 +64,9 @@
 import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureTypeAttributePanel;
 import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureTypePanel;
 import org.gvsig.fmap.dal.swing.impl.jdbc.DefaultJDBCConnectionPanel;
+import org.gvsig.fmap.dal.swing.impl.searchpanel.DefaultSearchPanel;
 import org.gvsig.fmap.dal.swing.jdbc.JDBCConnectionPanel;
+import org.gvsig.fmap.dal.swing.searchpanel.FeatureStoreSearchPanel;
 import org.gvsig.tools.dynform.DynFormLocator;
 import org.gvsig.tools.dynobject.DynClass;
 import org.gvsig.tools.dynobject.DynStruct;
@@ -130,10 +132,10 @@
             builder.setPreviewSymbolTable(featureSymbolTable.createParent());
         }
         builder.addSymbolTable(featureSymbolTable);
-        DefaultFeatureStoreElement storeElement = new DefaultFeatureStoreElement(builder, store);
+        DefaultFeatureStoreElement storeElement = new DefaultFeatureStoreElement(store);
         builder.addElement(storeElement);
         if( store.getProviderFactory().hasSQLSupport()==DataStoreProviderFactory.YES ) {
-            builder.setSQLCompatible(true);
+            builder.getPreferences().setSQLCompatible(true);
         }
         builder.expandElement(storeElement);
         return builder;
@@ -233,8 +235,16 @@
     }
 
     @Override
-    public FeatureStoreElement createFeatureStoreElement(ExpressionBuilderConfig configPanel) {
-        FeatureStoreElement e = new DefaultFeatureStoreElement(configPanel, null);
+    public FeatureStoreElement createFeatureStoreElement() {
+        FeatureStoreElement e = new DefaultFeatureStoreElement(null);
         return e;
     }
+
+    @Override
+    public FeatureStoreSearchPanel createFeatureStoreSearchPanel(FeatureStore store) {
+        DefaultSearchPanel e = new DefaultSearchPanel(store);
+        return e;
+    }
+
+    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/DefaultDALSwingLibrary.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/DefaultDALSwingLibrary.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/DefaultDALSwingLibrary.java	(revision 44259)
@@ -39,6 +39,7 @@
 import org.gvsig.fmap.dal.swing.impl.dataStoreParameters.DefaultDataStoreParametersPanelManager;
 import org.gvsig.fmap.dal.swing.impl.dynobjectutils.CreateComboModelFromTable;
 import org.gvsig.fmap.dal.swing.impl.expressionevaluator.FeatureStoreElementFactory;
+import org.gvsig.fmap.dal.swing.impl.searchpanel.DefaultSearchPanel;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dynobject.DynObjectManager;
 import org.gvsig.tools.library.AbstractLibrary;
@@ -75,12 +76,15 @@
         try {
             JDynFormFieldFeatureLinkFactory.selfRegister();
             JDynFormFieldFeaturesTableLinkFactory.selfRegister();
+            
             JDynFormFieldImageByteArrayFactory.selfRegister();
             JDynFormFieldImageFileFactory.selfRegister();
             JDynFormFieldImageURLFactory.selfRegister();
             JDynFormFieldForeingKeyFactory.selfRegister();
             JDynFormFieldSelectableForeingKeyFactory.selfRegister();
             JDynFormFieldFeaturesFactory.selfRegister();
+            
+            DefaultSearchPanel.selfRegister();
 
             DynObjectManager dynObjectmanager = ToolsLocator.getDynObjectManager();
             dynObjectmanager.registerDynMethod(new CreateComboModelFromTable("DAL.createComboModelFromTable", "XXXXXXXXXXXXXXXXXXXX."));
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/expressionevaluator/DefaultFeatureStoreElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/expressionevaluator/DefaultFeatureStoreElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/expressionevaluator/DefaultFeatureStoreElement.java	(revision 44259)
@@ -2,6 +2,7 @@
 
 import org.gvsig.fmap.dal.swing.expressionevaluator.FeatureStoreElement;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Iterator;
@@ -16,31 +17,27 @@
 import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
 import org.gvsig.fmap.dal.feature.FeatureStore;
 import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.dal.swing.impl.searchpanel.SearchUtils;
 
 /**
  *
  * @author jjdelcerro
  */
-public class DefaultFeatureStoreElement 
+@SuppressWarnings("UseSpecificCatch")
+public class DefaultFeatureStoreElement
         extends AbstractElement
-        implements FeatureStoreElement , SimpleElement
-{
+        implements FeatureStoreElement, SimpleElement {
 
     private FeatureStore store;
     private FeatureType type;
     private List<Element> elements;
-    private final ExpressionBuilderConfig config;
     private String myName;
 
-    @SuppressWarnings("OverridableMethodCallInConstructor")
-    public DefaultFeatureStoreElement(ExpressionBuilderConfig config, FeatureStore store) {
-        super("store", "expressionbuilder-element-table");
-        this.config = config;
-        if( store!=null ) {
-            this.setFeatureStore(store);
-        }
+    public DefaultFeatureStoreElement(FeatureStore store) {
+        super("store", "store", "expressionbuilder-element-table");
+        this.setFeatureStore(store);
     }
-    
+
     @Override
     public Element get(int index) {
         return this.elements.get(index);
@@ -50,10 +47,10 @@
     public void setName(String name) {
         this.myName = name;
     }
-    
+
     @Override
     public String getName() {
-        if( !StringUtils.isBlank(this.myName) ) {
+        if (!StringUtils.isBlank(this.myName)) {
             return this.myName;
         }
         if (this.store == null) {
@@ -82,7 +79,7 @@
 
     @Override
     public List<Element> getElements() {
-        if( this.elements == null ) {
+        if (this.elements == null) {
             return Collections.EMPTY_LIST;
         }
         return Collections.unmodifiableList(this.elements);
@@ -100,32 +97,12 @@
 
     @Override
     public void setFeatureStore(FeatureStore store) {
-          if (store==null) {
-              this.elements = Collections.EMPTY_LIST;
-              return;
-          }
-          try {
-            
-            this.store = store;
-            this.type = this.store.getDefaultFeatureType();
-            this.elements = new ArrayList<>();
-            for (FeatureAttributeDescriptor attrdesc : type) {
-                this.elements.add(new FeatureAttributeElement(
-                                this.config,
-                                this.store,
-                                attrdesc
-                        )
-                );
-            }
-            Collections.sort(elements, new Comparator<Element>() {
-                @Override
-                public int compare(Element o1, Element o2) {
-                    return o1.getName().compareTo(o2.getName());
-                }
-            });
-        } catch (DataException ex) {
-            throw new RuntimeException(ex);
+        if (store == null) {
+            this.elements = Collections.EMPTY_LIST;
+            return;
         }
+        this.store = store;
+        this.buildElements();
     }
 
     @Override
@@ -133,5 +110,34 @@
         return this.store;
     }
 
-    
+    @Override
+    public Element setConfig(ExpressionBuilderConfig config) {
+        super.setConfig(config);
+        this.buildElements();
+        return this;
+    }
+
+    private void buildElements() {
+        if( this.store == null || this.getConfig()==null ) {
+            return;
+        }
+        try {
+            this.type = this.store.getDefaultFeatureType();
+            
+            this.elements = new ArrayList<>();
+            Collection<FeatureAttributeDescriptor> attributes = SearchUtils.getOrderedAttributes(
+                    type, 
+                    SearchUtils.ALL_FILTER, 
+                    SearchUtils.LABEL_ORDER, 
+                    -1
+            );
+            for (FeatureAttributeDescriptor attrdesc : attributes) {
+                Element element = new FeatureAttributeElement(this.store,attrdesc);
+                element.setConfig(this.getConfig());
+                this.elements.add(element);
+            }
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/expressionevaluator/FeatureAttributeElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/expressionevaluator/FeatureAttributeElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/expressionevaluator/FeatureAttributeElement.java	(revision 44259)
@@ -1,16 +1,16 @@
 package org.gvsig.fmap.dal.swing.impl.expressionevaluator;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 import org.apache.commons.lang3.StringUtils;
 import org.gvsig.expressionevaluator.Function;
-import org.gvsig.expressionevaluator.SymbolTable;
 import org.gvsig.expressionevaluator.swing.Element;
 import org.gvsig.expressionevaluator.swing.Element.GroupElement;
 import org.gvsig.expressionevaluator.swing.Element.SimpleElement;
-import org.gvsig.expressionevaluator.swing.Element.VariableElement;
-import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
 import org.gvsig.expressionevaluator.swing.spi.AbstractElement;
 import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator;
 import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
@@ -18,9 +18,11 @@
 import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
 import org.gvsig.fmap.dal.feature.FeatureSet;
 import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.swing.impl.searchpanel.SearchUtils;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.exception.BaseException;
 import org.gvsig.tools.i18n.I18nManager;
+import org.gvsig.tools.util.LabeledValue;
 import org.gvsig.tools.visitor.VisitCanceledException;
 import org.gvsig.tools.visitor.Visitor;
 
@@ -28,23 +30,20 @@
  *
  * @author jjdelcerro
  */
-public class FeatureAttributeElement        
+public class FeatureAttributeElement
         extends AbstractElement
-        implements 
-            GroupElement,
-            SimpleElement,
-            VariableElement
-{
+        implements
+        GroupElement,
+        SimpleElement
+    {
 
     final FeatureStore store;
     final FeatureAttributeDescriptor attrdesc;
     List<Element> elements;
-    final ExpressionBuilderConfig config;
-    boolean hasMoreElements; 
-    
-    FeatureAttributeElement(ExpressionBuilderConfig configPanel, FeatureStore store, FeatureAttributeDescriptor attrdesc) {
-        super(attrdesc.getName(), "expressionbuilder-element-table-field");
-        this.config = configPanel;
+    boolean hasMoreElements;
+
+    FeatureAttributeElement(FeatureStore store, FeatureAttributeDescriptor attrdesc) {
+        super(attrdesc.getName(), attrdesc.getName(), "expressionbuilder-element-table-field");
         this.store = store;
         this.attrdesc = attrdesc;
         this.elements = null;
@@ -52,19 +51,14 @@
     }
 
     @Override
-    public String getTypeName() {
-        return this.attrdesc.getDataTypeName();
-    }
-
-    @Override
     public Element get(int index) {
         return this.getElements().get(index);
     }
-    
+
     @Override
     public boolean isEnabled() {
-        if( this.config.isSQLCompatible() ) {
-            if( this.attrdesc.isComputed() ) {
+        if (this.getConfig().getPreferences().isSQLCompatible()) {
+            if (this.attrdesc.isComputed()) {
                 return false;
             }
         }
@@ -93,41 +87,59 @@
 
     @Override
     public void reload() {
-        this.elements=null; 
+        this.elements = null;
         hasMoreElements = false;
     }
 
     @Override
     public List<Element> getElements() {
-        if( this.elements==null ) {
+        if (this.elements == null) {
             hasMoreElements = false;
             ExpressionEvaluatorSwingManager manager = ExpressionEvaluatorSwingLocator.getManager();
             final List<Object> values = new ArrayList<>();
-            final int limit = this.config==null? 60 : this.config.getSimpleElementsLimit();
-            final long timeLimit = System.currentTimeMillis() + limit*1000;
+            final int limit = this.getConfig() == null ? 60 : this.getConfig().getPreferences().getSimpleElementsLimit();
+            final long timeLimit = System.currentTimeMillis() + limit * 1000;
             try {
                 FeatureSet set = this.store.getFeatureSet();
                 set.accept(new Visitor() {
                     @Override
                     public void visit(Object o) throws VisitCanceledException, BaseException {
-                        Object value = ((Feature)o).get(attrdesc.getName());
-                        if( !values.contains(value ) ) {
+                        Object value = ((Feature) o).get(attrdesc.getName());
+                        if (!values.contains(value)) {
                             values.add(value);
                         }
-                        if( System.currentTimeMillis() > timeLimit ) {
+                        if (System.currentTimeMillis() > timeLimit) {
                             hasMoreElements = true;
                             throw new VisitCanceledException();
                         }
                     }
                 });
-            } catch(VisitCanceledException ex) {
-                
+            } catch (VisitCanceledException ex) {
+
             } catch (Exception ex) {
                 // FIXME
             }
             this.elements = new ArrayList<>();
-            for (Object value : values) {
-                this.elements.add(manager.createConstantElement(this.config, value));
+            if (!values.isEmpty()) {
+                LabeledValue[] availableValues = this.attrdesc.getAvailableValues();
+                Map<String, String> availableValuesMap = new HashMap<>();
+                if( availableValues!=null ) {
+                    for (LabeledValue availableValue : availableValues) {
+                        availableValuesMap.put(
+                                Objects.toString(availableValue.getValue()),
+                                availableValue.getLabel()
+                        );
+                    }
+                }
+                for (Object value : values) {
+                    String key = Objects.toString(value);
+                    String label = availableValuesMap.getOrDefault(key, null);
+                    this.elements.add(manager.createConstantElement(
+                            value,
+                            label
+                        )
+                    );
+                }
             }
         }
         return this.elements;
@@ -139,18 +151,28 @@
     }
 
     @Override
-    public String getSource() {
-        return this.store.getName();
+    public boolean hasMoreElements() {
+        return this.hasMoreElements;
     }
 
     @Override
+    public String getName() {
+        return attrdesc.getName();
+    }
+    
+    @Override
     public String getLabel() {
-        return "Field";
+        if (getConfig().getPreferences().getShowLabelsOfElements()) {
+            if (!StringUtils.equals(attrdesc.getName(), attrdesc.getLabel())) {
+                return "<html>" + attrdesc.getLabel() + "<br><font size=\"2\"><i>(" + attrdesc.getName() + ")</i></font></html>";
+            }
+        }
+        return "<html>" + attrdesc.getName() + "</html>";
     }
 
     @Override
-    public boolean hasMoreElements() {
-        return this.hasMoreElements;
+    public String getRenderedValue() {
+        return " "+attrdesc.getName()+" ";
     }
 
     @Override
@@ -161,17 +183,21 @@
         html.append("<html>\n");
 
         html.append("<b>").append(this.getLabel()).append("</b><br>\n<br>\n");
-        html.append("<b>").append(i18n.getTranslation("_Source")).append("</b> ").append(this.getSource()).append("<br>\n");
+        html.append("<b>").append(i18n.getTranslation("_Source")).append("</b> ").append(this.store.getName()).append("<br>\n");
         html.append("<b>").append(i18n.getTranslation("_Name")).append("</b> ").append(this.getName()).append("<br>\n");
-        html.append("<b>").append(i18n.getTranslation("_Type")).append("</b> ").append(this.getTypeName()).append("<br>\n");
-        if( !StringUtils.isBlank(this.attrdesc.getDescription()) &&
-                StringUtils.equalsAnyIgnoreCase(this.getName(), this.attrdesc.getDescription()) ) {
+        html.append("<b>").append(i18n.getTranslation("_Type")).append("</b> ").append(this.attrdesc.getDataTypeName()).append("<br>\n");
+        if (!StringUtils.isBlank(this.attrdesc.getDescription())
+                && StringUtils.equalsAnyIgnoreCase(this.getName(), this.attrdesc.getDescription())) {
             html.append("<b>").append(i18n.getTranslation("_Description")).append("</b><br>\n");
             html.append(this.attrdesc.getDescription().replace("\n", "<br>")).append("<br>\n");
         }
         html.append("</html>\n");
         return html.toString();
     }
-    
-    
+
+    @Override
+    @SuppressWarnings("empty-statement")
+    public void used() {
+        SearchUtils.getRecentUseds().add(attrdesc);
+    }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/expressionevaluator/FeatureStoreElementFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/expressionevaluator/FeatureStoreElementFactory.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/expressionevaluator/FeatureStoreElementFactory.java	(revision 44259)
@@ -23,9 +23,8 @@
 
     @Override
     public Element createElement(Object... parameters) {
-        ExpressionBuilderConfig config = (ExpressionBuilderConfig) parameters[0];
-        FeatureStore store = (FeatureStore) parameters[1];
-        Element e = new DefaultFeatureStoreElement(config, store);
+        FeatureStore store = (FeatureStore) parameters[0];
+        Element e = new DefaultFeatureStoreElement(store);
         return e;
     }
     
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFetureStore.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFetureStore.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFetureStore.java	(revision 44259)
@@ -2,7 +2,6 @@
 package org.gvsig.fmap.dal.feature;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
@@ -17,6 +16,7 @@
 import org.gvsig.fmap.dal.DataStore;
 import org.gvsig.fmap.dal.DataStoreParameters;
 import org.gvsig.fmap.dal.DataStoreProviderFactory;
+import org.gvsig.fmap.dal.StoresRepository;
 import org.gvsig.fmap.dal.exception.DataException;
 import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
 import org.gvsig.fmap.dal.feature.exception.NeedEditingModeException;
@@ -36,6 +36,7 @@
 import org.gvsig.tools.undo.UndoException;
 import org.gvsig.tools.util.ResourcesStorage;
 import org.gvsig.tools.util.ResourcesStorageEmpty;
+import org.gvsig.tools.util.UnmodifiableBasicMap;
 import org.gvsig.tools.visitor.Visitor;
 
 /**
@@ -403,11 +404,6 @@
     }
 
     @Override
-    public Iterator getChildren() {
-        return null;
-    }
-
-    @Override
     public DataServerExplorer getExplorer() throws DataException, ValidateDataParametersException {
         return null;
     }
@@ -753,18 +749,13 @@
     }
 
     @Override
-    public DataStore getChild(String name) {
+    public StoresRepository getStoresRepository() {
         return null;
     }
 
     @Override
-    public List<String> getChildrenNames() {
-        return Collections.EMPTY_LIST;
+    public UnmodifiableBasicMap<String, DataStore> getChildren() {
+        return UnmodifiableBasicMap.EMPTY_UNMODIFIABLEBASICMAP;
     }
 
-    @Override
-    public boolean hasChildren() {
-        return false;
-    }
-
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataManager.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataManager.java	(revision 44259)
@@ -71,6 +71,13 @@
     public static final String  DAL_SYMBOL_TABLE = "DAL.SymbolTable";
     public static final String  FEATURE_SYMBOL_TABLE = "DAL.FeatureSymbolTable";
 
+    public static final String DAL_FOREING_CODE = "DAL.foreingCode";
+    public static final String DAL_FOREING_TABLE = "DAL.foreingTable";
+    public static final String DAL_FOREING_LABEL = "DAL.foreingLabel";
+
+    public static final String DAL_FOREING_KEY = "DAL.ForeingKey";
+    public static final String DAL_SELECTABLE_FOREING_KEY = "DAL.SelectableForeingKey";
+    
     /**
      * Returns the default DAL's temporary directory
      *
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureStore.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureStore.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureStore.java	(revision 44259)
@@ -33,6 +33,7 @@
 import org.gvsig.fmap.dal.DataServerExplorer;
 import org.gvsig.fmap.dal.DataStore;
 import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.StoresRepository;
 import org.gvsig.fmap.dal.exception.DataException;
 import org.gvsig.fmap.dal.exception.ReadException;
 import org.gvsig.fmap.dal.feature.exception.FeatureIndexException;
@@ -933,4 +934,6 @@
     
     public ResourcesStorage getResourcesStorage();
     
+    public StoresRepository getStoresRepository();
+    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataStore.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataStore.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataStore.java	(revision 44259)
@@ -40,6 +40,8 @@
 import org.gvsig.tools.observer.Observer;
 import org.gvsig.tools.persistence.Persistent;
 import org.gvsig.tools.service.spi.Services;
+import org.gvsig.tools.util.UnmodifiableBasicList;
+import org.gvsig.tools.util.UnmodifiableBasicMap;
 import org.gvsig.tools.visitor.Visitable;
 import org.gvsig.tools.visitor.Visitor;
 
@@ -268,16 +270,14 @@
 	public DataSet createSelection() throws DataException;
 
 	/**
-	 * Returns an iterator over this store children
+	 * Returns an UnmodifiableBasicMap with this store children.
+         * If do not have children, return an empty map.
+         * Never returns null.
 	 *
-	 * @return Iterator over this DataStore children
+	 * @return an UnmodifiableBasicMap with this DataStore children
 	 */
-	public Iterator<DataStore> getChildren();
+	public UnmodifiableBasicMap<String,DataStore> getChildren();
         
-        public DataStore getChild(String name);
-        
-        public List<String> getChildrenNames();
-        
 
 	/**
 	 * Returns the DataServerExplorer to which this DataStore belongs, if there
@@ -342,7 +342,5 @@
      */
     public DataCache getCache();
 
-    public boolean hasChildren();
-
 }
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/AbstractFeatureStoreProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/AbstractFeatureStoreProvider.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/AbstractFeatureStoreProvider.java	(revision 44259)
@@ -69,6 +69,7 @@
 import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException;
 import org.gvsig.tools.dynobject.exception.DynMethodException;
 import org.gvsig.tools.exception.BaseException;
+import org.gvsig.tools.util.UnmodifiableBasicMap;
 
 /**
  * Abstract implementation of {@link FeatureStoreProvider}
@@ -480,30 +481,24 @@
 	 *
 	 * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#supportsAppendMode()
 	 */
+        @Override
 	public boolean supportsAppendMode() {
 		return false;
 	}
 
         @Override
-	public Iterator<DataStore> getChildren() {
-		return Collections.EMPTY_LIST.iterator();
+	public UnmodifiableBasicMap<String,DataStore> getChildren() {
+		return UnmodifiableBasicMap.EMPTY_UNMODIFIABLEBASICMAP;
 	}
 
-        @Override
-        public DataStore getChild(String name) {
-            return null;
-        }
-
-        @Override
-        public boolean hasChildren() {
-            return false;
-        }
-
 	/**
 	 * unsupported by default (return null), override this otherwise
 	 *
+         * @throws org.gvsig.fmap.dal.exception.ReadException
+         * @throws org.gvsig.fmap.dal.exception.ValidateDataParametersException
 	 * @see org.gvsig.fmap.dal.spi.DataStoreProvider#getExplorer()
 	 */
+        @Override
 	public DataServerExplorer getExplorer() throws ReadException,
 			ValidateDataParametersException {
 		return null;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/spi/DataStoreProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/spi/DataStoreProvider.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/spi/DataStoreProvider.java	(revision 44259)
@@ -24,7 +24,6 @@
 package org.gvsig.fmap.dal.spi;
 
 import java.util.Collection;
-import java.util.Iterator;
 
 import org.gvsig.fmap.dal.DataServerExplorer;
 import org.gvsig.fmap.dal.DataStore;
@@ -39,6 +38,7 @@
 import org.gvsig.timesupport.Time;
 import org.gvsig.tools.dispose.Disposable;
 import org.gvsig.tools.dynobject.DynObject_v2;
+import org.gvsig.tools.util.UnmodifiableBasicMap;
 
 /**
  * Base interface for all data providers
@@ -49,16 +49,14 @@
 public interface DataStoreProvider extends org.gvsig.fmap.dal.DataStoreProvider, DynObject_v2, Disposable {
 
 	/**
-	 * Retruns an {@link java.util.Iterator} of SubStores from this store. it
-	 * this hasn't SubStores returns <code>null</code>.
+	 * Returns an UnmodifiableBasicMap with subStores from this store.
+         * If do not have children, return an empty UnmodifiableBasicMap.
+         * Never returns null.
 	 *
-	 * @return SubStores iterator
+	 * @return SubStores UnmodifiableBasicMap
 	 */
-	public Iterator<DataStore> getChildren();
+	public UnmodifiableBasicMap<String,DataStore> getChildren();
 
-        public DataStore getChild(String name);
-
-        public boolean hasChildren();
 	/**
 	 * Create a {@link DataServerExplorer} from the same source that this store.
 	 *
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.lib/src/main/java/org/gvsig/fmap/dal/serverexplorer/filesystem/impl/DefaultFilesystemServerExplorer.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.lib/src/main/java/org/gvsig/fmap/dal/serverexplorer/filesystem/impl/DefaultFilesystemServerExplorer.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.lib/src/main/java/org/gvsig/fmap/dal/serverexplorer/filesystem/impl/DefaultFilesystemServerExplorer.java	(revision 44259)
@@ -576,7 +576,7 @@
         if (rootPathName == null) {
             return null;
         }
-        if( dataStore.hasChildren() ) {
+        if( !dataStore.getChildren().isEmpty() ) {
             FileMultiResource res = new FileMultiResource(
                     new File(rootPathName),
                     dataStore.getName(), 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.lib/src/main/java/org/gvsig/fmap/dal/feature/spi/simpleprovider/SimpleSequentialReaderStoreProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.lib/src/main/java/org/gvsig/fmap/dal/feature/spi/simpleprovider/SimpleSequentialReaderStoreProvider.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.lib/src/main/java/org/gvsig/fmap/dal/feature/spi/simpleprovider/SimpleSequentialReaderStoreProvider.java	(revision 44259)
@@ -26,13 +26,11 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import org.apache.commons.io.FilenameUtils;
 
 import org.apache.commons.lang3.StringUtils;
 import org.cresques.cts.IProjection;
@@ -87,6 +85,9 @@
 import org.gvsig.tools.exception.BaseException;
 import org.gvsig.tools.task.SimpleTaskStatus;
 import org.gvsig.tools.task.TaskStatusManager;
+import org.gvsig.tools.util.UnmodifiableBasicMap;
+import org.gvsig.tools.util.UnmodifiableBasicMapToMapAdapter;
+import org.gvsig.tools.util.UnmodifiableBasicSet;
 import org.gvsig.tools.visitor.VisitCanceledException;
 import org.gvsig.tools.visitor.Visitor;
 import org.slf4j.Logger;
@@ -101,7 +102,7 @@
     private class ReaderData {
         private FeatureType defaultFeatureType;
         private List<FeatureType> featureTypes;
-        private List<FeatureProvider> features;
+        private final List<FeatureProvider> features;
         private boolean needCalculateEnvelope;
         private String name;
         private long OIDcounter;
@@ -172,7 +173,103 @@
             return this.store;
         }
     }
+    
+    class Children implements UnmodifiableBasicMap<String, DataStore> {
+        // Con esta clase se pospone la creacion de los stores hasta que se 
+        // pide cada uno de ellos, y no cuando se pide el Map de estos, ya
+        // que el map se puede pedir solo para saber si hay o cuantos hay.
 
+        @Override
+        public DataStore get(String key) {
+            for (ReaderData child : childrenData) {
+                if( StringUtils.equalsIgnoreCase(child.getName(), key) ) {
+                    try {
+                        return child.getStore();
+                    } catch (Exception ex) {
+                        throw new RuntimeException(ex);
+                    }
+                }
+            }
+            return null;
+        }
+
+        @Override
+        public boolean isEmpty() {
+            return childrenData.isEmpty();
+        }
+
+        @Override
+        public boolean containsKey(String key) {
+            for (ReaderData child : childrenData) {
+                if( StringUtils.equalsIgnoreCase(child.getName(), key) ) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        @Override
+        public Map<String, DataStore> toMap() {
+            return new UnmodifiableBasicMapToMapAdapter<>(this);
+        }
+
+        @Override
+        public int size() {
+            return childrenData.size();
+        }
+
+        @Override
+        public UnmodifiableBasicSet<String> keySet() {
+            return new UnmodifiableBasicSet<String>() {
+
+                @Override
+                public boolean isEmpty() {
+                    return childrenData.isEmpty();
+                }
+
+                @Override
+                public int size() {
+                    return childrenData.size();
+                }
+
+                @Override
+                public Iterator<String> iterator() {
+                    final Iterator<ReaderData> it = childrenData.iterator();
+                    return new Iterator<String>() {
+                        @Override
+                        public boolean hasNext() {
+                            return it.hasNext();
+                        }
+
+                        @Override
+                        public String next() {
+                            ReaderData theReaderData = it.next();
+                            return theReaderData.getName();
+                        }
+                    };
+                }
+            };
+        }
+
+        @Override
+        public Iterator<DataStore> iterator() {
+            final Iterator<String> it = this.keySet().iterator();
+            return new Iterator<DataStore>() {
+                @Override
+                public boolean hasNext() {
+                    return it.hasNext();
+                }
+
+                @Override
+                public DataStore next() {
+                    String name = it.next();
+                    return get(name);
+                }
+            };
+        }
+        
+    }
+
     private final ResourceProvider resource;
 
     private Envelope envelope;
@@ -180,7 +277,7 @@
     private final SimpleTaskStatus taskStatus;
     private String name = "";
     private final SimpleSequentialReaderFactory readerFactory;
-    private final List<ReaderData> childrenData;
+    private List<ReaderData> childrenData;
     private ReaderData readerData;
 
     public SimpleSequentialReaderStoreProvider(
@@ -217,6 +314,9 @@
         );
 
         resource.addConsumer(this);
+        if( this.readerData!=null ) {
+            this.name = this.readerData.getName();            
+        }
         if( storeServices != null ) {
             initializeFeatureTypes();
         }
@@ -547,7 +647,7 @@
                             break;
                         }
                     default:
-                        LOGGER.warn("Illegal argumente '"+option+"' in '"+getProviderName()+"' file '" + getFullFileName() + "'.");
+                        LOGGER.warn("Illegal argumente '"+option+"' for field '"+this.name+"' in '"+getProviderName()+"' file '" + getFullFileName() + "' ("+value+").");
                 }
             }
             return true;
@@ -820,7 +920,7 @@
             SimpleSequentialReader reader = this.readerFactory.createReader(this.getParameters());
             try {
                 loadFeatures(reader, theReaderData);
-
+                this.childrenData = new ArrayList<>();
                 for(SimpleSequentialReader childReader : reader.getChildren() ) {
                     ReaderData childData = new ReaderData();
                     loadFeatures(childReader, childData);
@@ -832,8 +932,8 @@
             }
         }
         this.name = theReaderData.getName();
-        FeatureStoreProviderServices store = this.getStoreServices();
-        store.setFeatureTypes(theReaderData.getFeatureTypes(), theReaderData.getDefaultFeatureType());
+        FeatureStoreProviderServices theStore = this.getStoreServices();
+        theStore.setFeatureTypes(theReaderData.getFeatureTypes(), theReaderData.getDefaultFeatureType());
         this.need_calculate_envelope = theReaderData.getNeedCalculateEnvelope();
         this.data = theReaderData.getFeatures();
 
@@ -1001,38 +1101,8 @@
     }
 
     @Override
-    public DataStore getChild(String name) {
-        for (ReaderData childData : this.childrenData) {
-            if( StringUtils.equalsIgnoreCase(name, childData.getName()) ) {
-                try {
-                    return childData.getStore();
-                } catch (InitializeException ex) {
-                    throw new RuntimeException("Can't acces to child '"+name+"'", ex);
-                }
-            }
-        }        
-        return null;
+    public UnmodifiableBasicMap<String, DataStore> getChildren() {
+        return new Children();
     }
-    
-    @Override
-    public Iterator<DataStore> getChildren() {
-        if( this.childrenData==null || this.childrenData.isEmpty() ) {
-            return Collections.EMPTY_LIST.iterator();
-        }
-        try {
-            List<DataStore> children = new ArrayList<>();
-            for (ReaderData childData : this.childrenData) {
-                    children.add(childData.getStore());
-            }
-            return children.iterator();
-        } catch (InitializeException ex) {
-            throw new RuntimeException("Can't access to children", ex);
-        }
-    }
 
-    @Override
-    public boolean hasChildren() {
-        return this.childrenData!=null && !this.childrenData.isEmpty();
-    }
-    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/symboltables/functionPanels/firstlayerfeature/FirstLayerFeatureAditionalPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/symboltables/functionPanels/firstlayerfeature/FirstLayerFeatureAditionalPanel.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/symboltables/functionPanels/firstlayerfeature/FirstLayerFeatureAditionalPanel.java	(revision 44259)
@@ -23,7 +23,6 @@
 import org.gvsig.app.project.symboltables.ProjectSymbolTable;
 import org.gvsig.expressionevaluator.Expression;
 import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator;
-import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
 import org.gvsig.expressionevaluator.swing.ExpressionPickerController;
 import org.gvsig.expressionevaluator.swing.JExpressionBuilder;
 import org.gvsig.fmap.dal.DALLocator;
@@ -136,7 +135,7 @@
 
 
         this.featureSymbolTable = dataManager.createFeatureSymbolTable();
-        this.storeElement = dataSwingManager.createFeatureStoreElement(this.picketFilter);
+        this.storeElement = dataSwingManager.createFeatureStoreElement();
         this.picketFilter.addElement(this.storeElement);
     }
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/expressionevaluator/viewcapturepoint/ViewCapturePointElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/expressionevaluator/viewcapturepoint/ViewCapturePointElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/expressionevaluator/viewcapturepoint/ViewCapturePointElement.java	(revision 44259)
@@ -27,6 +27,7 @@
     public ViewCapturePointElement() {
         super(
                 ToolsLocator.getI18nManager().getTranslation("_Capture_point"),
+                null, 
                 "expressionbuilder-element-view-capture-point"
         );
     }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/expressionevaluator/savedpoints/SavedPointsElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/expressionevaluator/savedpoints/SavedPointsElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/expressionevaluator/savedpoints/SavedPointsElement.java	(revision 44259)
@@ -29,23 +29,16 @@
             extends AbstractElement
             implements ConstantElement {
 
-        private final Object value;
-
         public PointEntryElement(Object value, String name) {
-            super(name, "expressionbuilder-element-constant");
-            this.value = value;
+            super(name, value, "expressionbuilder-element-constant");
         }
 
-        @Override
-        public Object getValue() {
-            return value;
-        }
     }
 
     private final List<Element> childs;
 
     public SavedPointsElement() {
-        super(ToolsLocator.getI18nManager().getTranslation("Saved points"), "view-query-coordinate-capture");
+        super(ToolsLocator.getI18nManager().getTranslation("Saved points"), null, "view-query-coordinate-capture");
 
         ExpressionEvaluatorSwingManager evManager = ExpressionEvaluatorSwingLocator.getManager();
         TemporaryStorageManager manager = TemporaryStorageLocator.getTemporaryStorageManager();
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/expressionevaluator/ViewLayersElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/expressionevaluator/ViewLayersElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/expressionevaluator/ViewLayersElement.java	(revision 44259)
@@ -31,7 +31,7 @@
         private final FLayer layer;
         
         public LayerEntryElement(ViewDocument view, FLayer layer) {
-            super(layer.getName(), "expressionbuilder-element-constant");
+            super(layer.getName(), layer.getName(), "expressionbuilder-element-constant");
             this.layer = layer;
         }
 
@@ -54,7 +54,7 @@
             FLayer layer = it.next();
             if( layer instanceof SingleLayer ) {
                 if( layer instanceof FLyrVect ) {
-                    FeatureStoreElement e = dalSwingManager.createFeatureStoreElement(null);
+                    FeatureStoreElement e = dalSwingManager.createFeatureStoreElement();
                     e.setFeatureStore(((FLyrVect) layer).getFeatureStore());
                     e.setName(layer.getName());
                     this.childs.add(e);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/SearchByAttributesExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/SearchByAttributesExtension.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/SearchByAttributesExtension.java	(revision 44259)
@@ -0,0 +1,72 @@
+package org.gvsig.app.extension;
+
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.ApplicationManager;
+import org.gvsig.app.project.documents.view.ViewDocument;
+import org.gvsig.app.project.documents.view.gui.IView;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.swing.DALSwingLocator;
+import org.gvsig.fmap.dal.swing.DataSwingManager;
+import org.gvsig.fmap.dal.swing.searchpanel.FeatureStoreSearchPanel;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.windowmanager.WindowManager;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class SearchByAttributesExtension extends Extension {
+
+    @Override
+    public void initialize() {
+    }
+
+    @Override
+    public void execute(String actionCommand) {
+        ApplicationManager application = ApplicationLocator.getManager();
+
+        IView view = (IView) application.getActiveComponent(ViewDocument.class);
+        if (view == null) {
+            return;
+        }
+        if ("search-by-attributes-layer".equals(actionCommand)) {
+            DataSwingManager dataSwingManager = DALSwingLocator.getSwingManager();
+            WindowManager winManager = ToolsSwingLocator.getWindowManager();
+            
+            ViewDocument document = view.getViewDocument();
+
+            FLayer layer = document.getMapContext().getLayers().getActives()[0];
+            String title = "Search: " + layer.getName();
+            FeatureStore featureStore = ((FLyrVect) layer).getFeatureStore();
+            
+            FeatureStoreSearchPanel panel = dataSwingManager.createFeatureStoreSearchPanel(featureStore);
+            winManager.showWindow(
+                    panel.asJComponent(), 
+                    title, 
+                    WindowManager.MODE.WINDOW
+            );
+            
+        }
+    }
+
+    @Override
+    public boolean isEnabled() {
+        return true;
+    }
+
+    @Override
+    public boolean isVisible() {
+        ApplicationManager application = ApplicationLocator.getManager();
+
+        IView view = (IView) application.getActiveComponent(ViewDocument.class);
+        if (view == null) {
+            return false;
+        }
+        ViewDocument document = view.getViewDocument();
+        return document.getMapContext().hasActiveVectorLayers();
+    }
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/config.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/config.xml	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/config.xml	(revision 44259)
@@ -850,6 +850,31 @@
 
     </extension>
 
+    <extension class-name="org.gvsig.app.extension.SearchByAttributesExtension"
+      description=""
+      active="true">
+
+      <action
+        name="search-by-attributes-layer"
+        label="_Search_by_attributes"
+        position="200700000"
+        icon="search-by-attributes-layer"
+        tooltip="_Search_by_attributes"
+        action-command="search-by-attributes-layer"
+        accelerator=""
+        />
+
+      <menu
+        name="search-by-attributes-layer"
+        text="Edit/_Search_by_attributes"
+        />
+
+      <tool-bar name="edit">
+        <action-tool name="search-by-attributes-layer" />
+      </tool-bar>
+
+    </extension>
+
     <extension class-name="org.gvsig.app.extension.dispose.DisposableManagementExtension"
       description="Extensión con información sobre disposables."
       active="true"
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/java/org/gvsig/app/extension/SelectByAttributesInTableExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/java/org/gvsig/app/extension/SelectByAttributesInTableExtension.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/java/org/gvsig/app/extension/SelectByAttributesInTableExtension.java	(revision 44259)
@@ -79,18 +79,19 @@
         if ("selection-by-attributes-table".equals(actionCommand)) {
             table = (FeatureTableDocumentPanel) v;
 
-            featureStore = table.getModel().getStore();
-            filterTitle = table.getModel().getName();
-            table.getModel().setModified(true);
+            
+            featureStore = table.getFeatureStore();
+            filterTitle = featureStore.getName();
+//            table.getModel().setModified(true);
             SelectByAttributes selector = new SelectByAttributes();
             selector.showWindow(filterTitle, featureStore, WindowManager.MODE.TOOL);
             
         } else if ("selection-by-attributes-table-old".equals(actionCommand)) {
             table = (FeatureTableDocumentPanel) v;
 
-            featureStore = table.getModel().getStore();
-            filterTitle = table.getModel().getName();
-            table.getModel().setModified(true);
+            featureStore = table.getFeatureStore();
+            filterTitle = featureStore.getName();
+//            table.getModel().setModified(true);
 
             doExecute();
         }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/dal/feature/swing/FeatureTypesTablePanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/dal/feature/swing/FeatureTypesTablePanel.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/dal/feature/swing/FeatureTypesTablePanel.java	(revision 44259)
@@ -25,7 +25,6 @@
 
 import java.awt.BorderLayout;
 import java.awt.Dimension;
-import java.util.List;
 import javax.swing.DefaultListModel;
 import javax.swing.JComponent;
 
@@ -34,6 +33,7 @@
 import javax.swing.JList;
 import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
+import org.gvsig.fmap.dal.DataStore;
 
 import org.gvsig.fmap.dal.exception.DataException;
 import org.gvsig.fmap.dal.feature.Feature;
@@ -46,6 +46,7 @@
 import org.gvsig.fmap.mapcontrol.dal.feature.swing.table.SelectedFeatureTypeChangeListener;
 import org.gvsig.tools.exception.BaseException;
 import org.gvsig.tools.swing.api.ListElement;
+import org.gvsig.tools.util.UnmodifiableBasicMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -134,8 +135,8 @@
     }
 
     private boolean hasManyFeatureTypes() throws DataException {
-        List<String> childNames = this.model.getFeatureStore().getChildrenNames();
-        if( childNames!=null && !childNames.isEmpty() ) {
+        UnmodifiableBasicMap<String, DataStore> children = this.model.getFeatureStore().getChildren();
+        if( !children.isEmpty() ) {
             return true;
         }
         return typesControl.getFeatureTypesSize() > 1;
@@ -241,8 +242,8 @@
         DefaultListModel model = new DefaultListModel();
         FeatureStore store = this.model.getFeatureStore();
         model.addElement(new ListElement<>(store.getName(),store));
-        for (String childName : store.getChildrenNames()) {
-            model.addElement(new ListElement<>(childName,store.getChild(childName)));
+        for (String childName : store.getChildren().keySet() ) {
+            model.addElement(new ListElement<>(childName,store.getChildren().get(childName)));
         }
         l.setModel(model);
         l.addListSelectionListener(new ListSelectionListener() {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.main/src/main/java/org/gvsig/expressionevaluator/main/MainDialog.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.main/src/main/java/org/gvsig/expressionevaluator/main/MainDialog.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.main/src/main/java/org/gvsig/expressionevaluator/main/MainDialog.java	(revision 44259)
@@ -49,7 +49,7 @@
                 openStore()
         );
         if( element != null ) {
-            panel.getElements().add(element);
+            panel.addElement(element);
         }
         Dialog dialog = windowManager.createDialog(
                 panel.asJComponent(),
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultExpressionBuilder.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultExpressionBuilder.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultExpressionBuilder.java	(revision 44259)
@@ -743,6 +743,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return value == null;
+    }
+    
+    @Override
     public ExpressionBuilder createExpressionBuilder() {
         return new DefaultExpressionBuilder();
     }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/ExpressionBuilder.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/ExpressionBuilder.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/ExpressionBuilder.java	(revision 44259)
@@ -536,4 +536,5 @@
 
     public Function toStr(Value object);
 
+    public boolean isEmpty();
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionEvaluatorSwingManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionEvaluatorSwingManager.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionEvaluatorSwingManager.java	(revision 44259)
@@ -3,22 +3,21 @@
 
 import java.util.Collection;
 import java.util.List;
+import javax.lang.model.element.VariableElement;
 import javax.swing.JButton;
-import javax.swing.JPanel;
 import javax.swing.text.JTextComponent;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.SymbolTable;
 import org.gvsig.expressionevaluator.swing.Element.ConstantElement;
 import org.gvsig.expressionevaluator.swing.Element.FunctionElement;
 import org.gvsig.expressionevaluator.swing.Element.GroupElement;
-import org.gvsig.expressionevaluator.swing.Element.VariableElement;
 
 public interface ExpressionEvaluatorSwingManager {
 
     
 //    public List<Element> createElements(Collection<SymbolTable> symbolTables);
     
-    public List<Element> createElements(ExpressionBuilderConfig config, Collection<SymbolTable> symbolTables);
+    public List<Element> createElements(Collection<SymbolTable> symbolTables);
     
     public JExpressionBuilder createJExpressionBuilder();
     
@@ -48,18 +47,16 @@
 //
 //    public VariableElement createVariableElement(String label, String source, String name, String typeName, String description);
 
-    public GroupElement createGroupElement(ExpressionBuilderConfig config, String name);
+    public GroupElement createGroupElement(String name);
     
-    public GroupElement createGroupElement(ExpressionBuilderConfig config, String name, List<Element> elements);
+    public GroupElement createGroupElement(String name, List<Element> elements);
 
-    public FunctionElement createFunctionElement(ExpressionBuilderConfig config, Function function);
+    public FunctionElement createFunctionElement(Function function);
 
-    public ConstantElement createConstantElement(ExpressionBuilderConfig config, Object value);
+    public ConstantElement createConstantElement(Object value, String label);
 
-    public ConstantElement createConstantElement(ExpressionBuilderConfig config, Object value, String description);
+    public ConstantElement createConstantElement(Object value, String label, String description);
 
-    public VariableElement createVariableElement(ExpressionBuilderConfig config, String label, String source, String name, String typeName, String description);
-
     public ExpressionPickerController createExpressionPickerController(JTextComponent text, JButton button);
 
     public CalculatorController createCalculatorController(JTextComponent text, int dataType);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/Element.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/Element.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/Element.java	(revision 44259)
@@ -5,12 +5,13 @@
 import javax.swing.ImageIcon;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.tools.swing.api.Component;
+import org.gvsig.tools.util.LabeledValue;
 
 /**
  *
  * @author jjdelcerro
  */
-public interface Element {
+public interface Element extends LabeledValue, Comparable {
 
     public interface SimpleElement extends Element {
 
@@ -43,25 +44,16 @@
 
     public interface ConstantElement extends SimpleElement {
 
-        public Object getValue();
     }
 
     public interface CalculatedElement extends SimpleElement {
 
-        public Object getValue();
     }
 
-    public interface VariableElement extends SimpleElement {
-
-        public String getSource();
-
-        public String getLabel();
-
-        public String getTypeName();
-    }
-
     public String getName();
-
+    
+    public String getRenderedValue();
+    
     public String getDescription();
 
     public String getIconName();
@@ -73,4 +65,10 @@
     public boolean isEnabled();
 
     public void reload();
+    
+    public void used();
+    
+    public Element setConfig(ExpressionBuilderConfig config);
+    
+    public ExpressionBuilderConfig getConfig();
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/spi/AbstractElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/spi/AbstractElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/spi/AbstractElement.java	(revision 44259)
@@ -1,5 +1,6 @@
 package org.gvsig.expressionevaluator.swing.spi;
 
+import java.util.Objects;
 import javax.swing.ImageIcon;
 import org.gvsig.expressionevaluator.swing.Element;
 import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
@@ -18,16 +19,31 @@
 
     protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractElement.class);
     
-    final String name;
+    final Object value;
     final String iconName;
     final ImageIcon icon;
+    private final String name;
+    private ExpressionBuilderConfig config;
 
     protected AbstractElement(String name) {
-        this(name,null);
+        this(name, name, null);
     }
     
-    protected AbstractElement(String name, String iconName) {
-        this.name = name;
+    protected AbstractElement(String name, Object value) {
+        this(name, value, null);
+    }
+    
+    protected AbstractElement(String name, Object value, String iconName) {
+        if( name == null ) {
+            this.name = Objects.toString(value);
+        } else {
+            this.name = name;
+        }
+        if( value == null ) {
+            this.value = name;
+        } else {
+            this.value = value;
+        }
         this.iconName = iconName;
         IconTheme theme = ToolsSwingLocator.getIconThemeManager().getCurrent();
         if( theme.exists(iconName) ) {
@@ -38,18 +54,62 @@
             this.icon = theme.get("expressionbuilder-element");
         }
     }
+
+    @Override
+    public Element setConfig(ExpressionBuilderConfig config) {
+        this.config = config;
+        return this;
+    }
     
     @Override
+    public ExpressionBuilderConfig getConfig() {
+        return this.config;
+    }
+    
+    @Override
     public String getName() {
         return this.name;
     }
+    
+    @Override
+    public Object getValue() {
+        return this.value;
+    }
 
     @Override
+    public String getRenderedValue() {
+        return Objects.toString(this.value);
+    }
+
+    @Override
     public String getDescription() {
         return null;
     }
 
     @Override
+    public String getLabel() {
+        return Objects.toString(this.value, "");
+    }
+
+    @Override
+    @SuppressWarnings("StringEquality")
+    public int compareTo(Object other) {
+        String otherLabel = null;
+        if( other!=null ) {
+            otherLabel = other.toString();
+        }
+        String thisLabel = this.getLabel();
+        if (thisLabel== otherLabel) {
+            return 0;
+        } else if (thisLabel== null) {
+            return -1;
+        } else if (otherLabel == null) {
+            return 1;
+        }
+        return thisLabel.compareTo(otherLabel);        
+    }
+    
+    @Override
     public String getIconName() {
         return iconName;
     }
@@ -58,6 +118,10 @@
     public ImageIcon getIcon() {
         return this.icon;
     }
+
+    @Override
+    public void used() {
+    }
     
     @Override
     public Component getAditionalPanel(JExpressionBuilder expressionBuilder) {
@@ -66,7 +130,7 @@
 
     @Override
     public String toString() {
-        return this.getName();
+        return this.getLabel();
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionBuilderConfig.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionBuilderConfig.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.api/src/main/java/org/gvsig/expressionevaluator/swing/ExpressionBuilderConfig.java	(revision 44259)
@@ -9,25 +9,43 @@
  *
  * @author jjdelcerro
  */
-public interface ExpressionBuilderConfig extends PropertiesSupport {
+public interface ExpressionBuilderConfig  {
 
+    public interface Preferences extends PropertiesSupport {
+        /**
+         * Time in secons to use when obtains the list of elements.
+         * 
+         * @return time in secons
+         */
+        public int getSimpleElementsLimit();
+
+        /**
+         * Set the time in secons to use to obtain the list of elements.
+         * 
+         * @param limit 
+         */
+        public void setSimpleElementsLimit(int limit);
+
+        public void setScriptsEnabled(boolean enabled);
+
+        public boolean getScriptsEnabled();
+
+        public void setSQLCompatible(boolean sqlCompatible);
+
+        public boolean isSQLCompatible();
+        
+        public boolean getShowLabelsOfElements();
+        
+        public void setShowLabelsOfElements(boolean showLabels);
+        
+    }
+    
+    public Preferences getPreferences();
+    
     public List<Element> getElements();
 
     public void addElement(Element element);
-    /**
-     * Time in secons to use when obtains the list of elements.
-     * 
-     * @return time in secons
-     */
-    public int getSimpleElementsLimit();
 
-    /**
-     * Set the time in secons to use to obtain the list of elements.
-     * 
-     * @param limit 
-     */
-    public void setSimpleElementsLimit(int limit);
-
     public Collection<SymbolTable> getSymbolTables();
 
     public void addSymbolTable(SymbolTable symbolTable);
@@ -38,15 +56,8 @@
 
     public void removeAllSymbolTables();
     
-    public void setScriptsEnabled(boolean enabled);
-    
-    public boolean getScriptsEnabled();
-    
     public SymbolTable getPreviewSymbolTable();
     
     public void setPreviewSymbolTable(SymbolTable symbolTable);
     
-    public void setSQLCompatible(boolean sqlCompatible);
-    
-    public boolean isSQLCompatible();
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-bookmarks.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-bookmarks.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-history.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-history.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/AbstractAutomaticExpressionChecker.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/AbstractAutomaticExpressionChecker.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/AbstractAutomaticExpressionChecker.java	(revision 44259)
@@ -51,7 +51,7 @@
     private static final Color COLOR_ERROR = new Color(255,225,232);
 
     private final JTextComponent text;
-    private final ExpressionBuilderConfig config;
+    private final ExpressionBuilderConfig builderConfig;
 
     private Color color_ok;
     private Timer timerExpression;
@@ -69,7 +69,7 @@
 
     public AbstractAutomaticExpressionChecker(ExpressionBuilderConfig config, JTextComponent theText) {
         this.text = theText;
-        this.config = config;
+        this.builderConfig = config;
         this.initComponents();
     }
 
@@ -162,7 +162,7 @@
     }
     
     private void doCheckExpression() {
-        if( this.text == null || this.config == null ) {
+        if( this.text == null || this.builderConfig == null ) {
             return;
         }
         Expression expression = this.getExpression();
@@ -184,7 +184,7 @@
         }
         final Mutable<String> theTip = new MutableObject<>(null);
         expression.setSQLCompatible(false);
-        if (this.config.getPreviewSymbolTable() == null) {
+        if (this.builderConfig.getPreviewSymbolTable() == null) {
             try {
                 ExpressionEvaluatorManager theManager = ExpressionEvaluatorLocator.getManager();
                 MutableSymbolTable symbolTable = theManager.createSymbolTable();
@@ -195,7 +195,7 @@
             }
         } else {
             try {
-                Object theValue = expression.execute(this.config.getPreviewSymbolTable());
+                Object theValue = expression.execute(this.builderConfig.getPreviewSymbolTable());
                 this.setPreview(theValue);
             } catch (ExpressionRuntimeException ex) {
                 theTip.setValue(ex.getTip());
@@ -204,7 +204,7 @@
                 this.setMessage(JOptionPane.ERROR_MESSAGE, "Runtime error. " + ex.getMessage());
             }
         }
-        if( this.config.isSQLCompatible() ) {
+        if( this.builderConfig.getPreferences().isSQLCompatible() ) {
             Code code = expression.getCode();
             try {
                 code.accept(new Visitor() {
@@ -219,8 +219,8 @@
                                 }
                                 break;
                             case Code.IDENTIFIER:
-                                if( config.getPreviewSymbolTable()!=null && 
-                                        !config.getPreviewSymbolTable().isSQLCompatible(((Identifier)code).name()) ) {
+                                if( builderConfig.getPreviewSymbolTable()!=null && 
+                                        !builderConfig.getPreviewSymbolTable().isSQLCompatible(((Identifier)code).name()) ) {
                                     theTip.setValue(I18N.Avoid_the_use_of_functions_not_compatible_with_SQL_in_this_data_source(((Identifier)code).name()));
                                 }
                                 break;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/Utils.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/Utils.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/Utils.java	(revision 44259)
@@ -25,24 +25,40 @@
         return new Comparator() {
             @Override
             public int compare(Object o1, Object o2) {
-                if (o1 instanceof Double) {
-                    return Double.compare((Double) o1, (Double) o2);
-                } else if (o1 instanceof Float) {
-                    return Double.compare((Float) o1, (Float) o2);
-                } else if (o1 instanceof Number) {
-                    return Double.compare( getLong((Number) o1), getLong((Number) o2));
+                if (o1 instanceof Integer && o2 instanceof Number ) {
+                    return Long.compare((Integer) o1, ((Number)o2).intValue());
+                    
+                } else if (o1 instanceof Long && o2 instanceof Number ) {
+                    return Long.compare((Long) o1, ((Number)o2).longValue());
+                    
+                } else if (o1 instanceof Double && o2 instanceof Number ) {
+                    return Double.compare((Double) o1, ((Number)o2).doubleValue());
+                    
+                } else if (o1 instanceof Float && o2 instanceof Number) {
+                    return Double.compare((Float) o1, ((Number)o2).floatValue());
+                    
+                } else if (o1 instanceof Number && o2 instanceof Number) {
+                    return Double.compare( getDouble((Number) o1), getDouble((Number) o2));
+                    
+                } else if (o1 instanceof String && o2 instanceof String) {
+                    return ((String) o1).compareToIgnoreCase((String)o2);
+                    
                 } else {
-                    return Objects.toString(o1, "").compareTo(Objects.toString(o2, ""));
+                    try {
+                        return ((Comparable) o1).compareTo((Comparable)o2);
+                    } catch(Exception ex) {
+                        return Objects.toString(o1, "").compareTo(Objects.toString(o2, ""));
+                    }
                 }
             }
         };
     }
     
-    private static long getLong(Number n) {
+    private static double getDouble(Number n) {
         if( n==null ) {
             return 0;
         }
-        return n.longValue();
+        return n.doubleValue();
     }
 
     public static String repr(Object value)  {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionBuilderConfig.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionBuilderConfig.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionBuilderConfig.java	(revision 44259)
@@ -20,7 +20,7 @@
  * @author jjdelcerro
  */
 public class DefaultExpressionBuilderConfig
-        implements ExpressionBuilderConfig {
+        implements ExpressionBuilderConfig, ExpressionBuilderConfig.Preferences {
 
     private List<Element> elements;
     private int limit;
@@ -29,16 +29,23 @@
     private boolean scriptsEnabled = true;
     private SymbolTable previewSymbolTable;
     private boolean SQLCompatible;
-    private PropertiesSupportHelper propertiesSupportHelper;
+    private final PropertiesSupportHelper propertiesSupportHelper;
+    private boolean showLabelsOfAttributes;
     
     public DefaultExpressionBuilderConfig(ExpressionEvaluatorSwingManager manager) {
         this.manager = manager;
         this.limit = 6;
         this.SQLCompatible = false;
         this.propertiesSupportHelper = new PropertiesSupportHelper();
+        this.showLabelsOfAttributes = true;
         initSymbolTables();
     }
 
+    @Override
+    public Preferences getPreferences() {
+        return this;
+    }
+
     private void initSymbolTables() {
         ExpressionEvaluatorManager theManager = ExpressionEvaluatorLocator.getManager();
         for (SymbolTableFactory factory : theManager.getSymbolTableFactories()) {
@@ -51,11 +58,12 @@
     @Override
     public List<Element> getElements() {
         if (this.elements == null) {
-            this.elements = manager.createElements(this, this.getSymbolTables());
+            this.elements = manager.createElements(this.getSymbolTables());
             for (ElementFactory factory : manager.getElementFactories()) {
                 if (factory.isAutoload()) {
                     Element e = factory.createElement();
                     this.elements.add(e);
+                    e.setConfig(this);
                 }
             }
         }
@@ -74,6 +82,7 @@
             }
         }
         this.elements.add(element);
+        element.setConfig(this);
     }
 
     @Override
@@ -169,5 +178,16 @@
     public Map<String, Object> getProperties() {
         return this.propertiesSupportHelper.getProperties();
     }
+
+    @Override
+    public boolean getShowLabelsOfElements() {
+        return this.showLabelsOfAttributes;
+    }
+
+    @Override
+    public void setShowLabelsOfElements(boolean showLabels) {
+        this.showLabelsOfAttributes = showLabels;
+    }
+
     
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/ExpressionEvaluatorSwingLibraryImpl.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/ExpressionEvaluatorSwingLibraryImpl.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/ExpressionEvaluatorSwingLibraryImpl.java	(revision 44259)
@@ -41,6 +41,8 @@
             new String[] { "action", "expressionbuilder-insert-text" },
             new String[] { "action", "expressionbuilder-sortdown" },
             new String[] { "action", "expressionbuilder-sortup" },
+            new String[] { "action", "expressionbuilder-history" },
+            new String[] { "action", "expressionbuilder-bookmarks" },
             new String[] { "action", "expressionbuilder-time-limit" }
         };
         IconTheme theme = ToolsSwingLocator.getIconThemeManager().getCurrent();
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilderView2.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilderView2.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilderView2.java	(revision 44259)
@@ -0,0 +1,402 @@
+package org.gvsig.expressionevaluator.swing.impl;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.JTree;
+import javax.swing.border.EmptyBorder;
+
+public class DefaultJExpressionBuilderView2 extends JPanel {
+
+    private static class GridBagConstraintsBuilder {
+
+        private GridBagConstraints gbc;
+
+        public GridBagConstraintsBuilder() {
+            this.gbc = new GridBagConstraints();
+            this.gbc.insets = new Insets(1, 1, 1, 1);
+        }
+
+        public GridBagConstraintsBuilder clear() {
+            this.gbc = new GridBagConstraints();
+            this.gbc.insets = new Insets(1, 1, 1, 1);
+            return this;
+        }
+
+        public GridBagConstraints get() {
+            return this.gbc;
+        }
+
+        public GridBagConstraintsBuilder insets(int top, int left, int bottom, int right) {
+            this.gbc.insets = new Insets(top, left, bottom, right);
+            return this;
+        }
+
+        public GridBagConstraintsBuilder anchor(int anchor) {
+            this.gbc.anchor = anchor;
+            return this;
+        }
+
+        public GridBagConstraintsBuilder fill(int fill) {
+            this.gbc.fill = fill;
+            return this;
+        }
+
+        public GridBagConstraintsBuilder growx(float growx) {
+            this.gbc.weightx = growx;
+            return this;
+        }
+
+        public GridBagConstraintsBuilder growy(float growy) {
+            this.gbc.weighty = growy;
+            return this;
+        }
+
+        public GridBagConstraintsBuilder grow(float growx, float growy) {
+            this.gbc.weightx = growx;
+            this.gbc.weighty = growy;
+            return this;
+        }
+
+        public GridBagConstraintsBuilder nogrow() {
+            this.gbc.weightx = 0;
+            this.gbc.weighty = 0;
+            return this;
+        }
+
+        public GridBagConstraintsBuilder xy(int x, int y) {
+            this.gbc.gridx = x;
+            this.gbc.gridy = y;
+            return this;
+        }
+
+        private GridBagConstraintsBuilder colspan(int n) {
+            this.gbc.gridwidth = n;
+            return this;
+        }
+
+        private GridBagConstraintsBuilder rowspan(int n) {
+            this.gbc.gridheight = n;
+            return this;
+        }
+
+        private GridBagConstraintsBuilder span(int cols, int rows) {
+            this.gbc.gridwidth = cols;
+            this.gbc.gridheight = rows;
+            return this;
+        }
+
+        private GridBagConstraintsBuilder nospan() {
+            this.gbc.gridwidth = 1;
+            this.gbc.gridheight = 1;
+            return this;
+        }
+
+    }
+
+    JTabbedPane tabExpressionBuilder = new JTabbedPane();
+
+    JList lstSimpleElement = new JList();
+    JScrollPane scrSimpleElement = new JScrollPane();
+
+    JTree treeElements = new JTree();
+    JScrollPane scrElements = new JScrollPane();
+
+    JTextArea txtExpression = new JTextArea();
+    JScrollPane scrExpression = new JScrollPane();
+
+    JButton btnHistory = new JButton();
+    JButton btnBookmarks = new JButton();
+    JButton btnEq = new JButton();
+    JButton btnNeq = new JButton();
+    JButton btnAdd = new JButton();
+    JButton btnSubst = new JButton();
+    JButton btnMult = new JButton();
+    JButton btnDiv = new JButton();
+    JButton btnParentOpen = new JButton();
+    JButton btnParentClose = new JButton();
+    JLabel lblMsg = new JLabel();
+    JButton btnTip = new JButton();
+    JLabel lblColumn = new JLabel();
+    JTextField txtGroupElement = new JTextField();
+    JButton btnGroupElementInsert = new JButton();
+    JButton btnSimpleElementInsert = new JButton();
+    JButton btnSimpleElementSortDown = new JButton();
+    JButton btnSimpleElementSortUp = new JButton();
+    JLabel lblSimpleElementsMsg = new JLabel();
+    JButton btnSimpleElementTimeLimit = new JButton();
+    JTextField txtSimpleElementFilter = new JTextField();
+    JButton btnSimpleElementFilter = new JButton();
+    JPanel pnlDescription = new JPanel();
+    JPanel pnlScriptEditorContainer = new JPanel();
+    JComboBox cboPickerScripts = new JComboBox();
+    JButton btnPickerRemove = new JButton();
+    JButton btnPickerSelectScript = new JButton();
+
+    JSplitPane spnlExpression = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
+    JSplitPane spnlBottom = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
+    JSplitPane spnlItem = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
+
+    JPanel pnlTop;
+    JPanel pnlElement;
+
+    /**
+     * Default constructor
+     */
+    public DefaultJExpressionBuilderView2() {
+        initComponents();
+    }
+
+    private void initComponents() {
+        EmptyBorder emptyborder2x2 = new EmptyBorder(2, 2, 2, 2);
+
+        lstSimpleElement.setName("lstSimpleElement");
+
+        treeElements.setName("treeElements");
+        pnlDescription.setName("pnlDescription");
+        txtExpression.setLineWrap(true);
+        txtExpression.setName("txtExpression");
+        txtExpression.setRows(2);
+
+
+        btnHistory.setActionCommand("+");
+        btnHistory.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-history.png"));
+        btnHistory.setName("btnHistory");
+        btnHistory.setText("");
+        btnHistory.setBorder(emptyborder2x2);
+
+        btnBookmarks.setActionCommand("+");
+        btnBookmarks.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-bookmarks.png"));
+        btnBookmarks.setName("btnBookmarks");
+        btnBookmarks.setText("");
+        btnBookmarks.setBorder(emptyborder2x2);
+
+        btnEq.setActionCommand("+");
+        btnEq.setName("btnEq");
+        btnEq.setText("=");
+        btnEq.setBorder(emptyborder2x2);
+
+        btnNeq.setActionCommand("+");
+        btnNeq.setName("btnNeq");
+        btnNeq.setText("<>");
+        btnNeq.setBorder(emptyborder2x2);
+
+        btnAdd.setActionCommand("+");
+        btnAdd.setName("btnAdd");
+        btnAdd.setText("+");
+        btnAdd.setBorder(emptyborder2x2);
+
+        btnSubst.setActionCommand("+");
+        btnSubst.setName("btnSubst");
+        btnSubst.setText("-");
+        btnSubst.setBorder(emptyborder2x2);
+
+        btnMult.setActionCommand("+");
+        btnMult.setName("btnMult");
+        btnMult.setText("*");
+        btnMult.setBorder(emptyborder2x2);
+
+        btnDiv.setActionCommand("+");
+        btnDiv.setName("btnDiv");
+        btnDiv.setText("/");
+        btnDiv.setBorder(emptyborder2x2);
+
+        btnParentOpen.setActionCommand("+");
+        btnParentOpen.setName("btnParentOpen");
+        btnParentOpen.setText("(");
+        btnParentOpen.setBorder(emptyborder2x2);
+
+        btnParentClose.setActionCommand("+");
+        btnParentClose.setName("btnParentClose");
+        btnParentClose.setText(")");
+        btnParentClose.setBorder(emptyborder2x2);
+
+        lblMsg.setName("lblMsg");
+
+        btnTip.setActionCommand("+");
+        btnTip.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-tip.png.png"));
+        btnTip.setName("btnTip");
+        btnTip.setBorder(emptyborder2x2);
+
+        lblColumn.setName("lblColumn");
+        lblColumn.setText("0");
+
+        txtGroupElement.setBackground(new Color(236, 233, 216));
+        txtGroupElement.setEditable(false);
+        txtGroupElement.setName("txtGroupElement");
+
+        btnGroupElementInsert.setActionCommand("+");
+        btnGroupElementInsert.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-insert-text.png"));
+        btnGroupElementInsert.setName("btnGroupElementInsert");
+        btnGroupElementInsert.setBorder(emptyborder2x2);
+
+        btnSimpleElementInsert.setActionCommand("+");
+        btnSimpleElementInsert.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-insert-text.png"));
+        btnSimpleElementInsert.setName("btnSimpleElementInsert");
+        btnSimpleElementInsert.setBorder(emptyborder2x2);
+
+        btnSimpleElementSortDown.setActionCommand("+");
+        btnSimpleElementSortDown.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-sortdown.png"));
+        btnSimpleElementSortDown.setName("btnSimpleElementSortDown");
+        btnSimpleElementSortDown.setBorder(emptyborder2x2);
+
+        btnSimpleElementSortUp.setActionCommand("+");
+        btnSimpleElementSortUp.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-sortup.png"));
+        btnSimpleElementSortUp.setName("btnSimpleElementSortUp");
+        btnSimpleElementSortUp.setBorder(emptyborder2x2);
+
+        lblSimpleElementsMsg.setName("lblSimpleElementsMsg");
+
+        btnSimpleElementTimeLimit.setActionCommand("+");
+        btnSimpleElementTimeLimit.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-time-limit.png"));
+        btnSimpleElementTimeLimit.setName("btnSimpleElementTimeLimit");
+        btnSimpleElementTimeLimit.setBorder(emptyborder2x2);
+
+        txtSimpleElementFilter.setName("txtSimpleElementFilter");
+
+        btnSimpleElementFilter.setActionCommand("+");
+        btnSimpleElementFilter.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-filter-values.png"));
+        btnSimpleElementFilter.setName("btnSimpleElementFilter");
+        btnSimpleElementFilter.setBorder(emptyborder2x2);
+
+        pnlScriptEditorContainer.setName("pnlScriptEditorContainer");
+
+        cboPickerScripts.setName("cboPickerScripts");
+
+        btnPickerRemove.setActionCommand("+");
+        btnPickerRemove.setName("btnPickerRemove");
+        btnPickerRemove.setText("R");
+        btnPickerRemove.setBorder(emptyborder2x2);
+
+        btnPickerSelectScript.setActionCommand("+");
+        btnPickerSelectScript.setName("btnPickerSelectScript");
+        btnPickerSelectScript.setText("S");
+        btnPickerSelectScript.setBorder(emptyborder2x2);
+
+        this.scrExpression = new JScrollPane();
+        this.scrExpression.setViewportView(txtExpression);
+        this.scrExpression.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+        this.scrExpression.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+
+        this.scrElements = new JScrollPane();
+        this.scrElements.setViewportView(treeElements);
+        this.scrElements.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+        this.scrElements.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+
+        this.scrSimpleElement = new JScrollPane();
+        this.scrSimpleElement.setViewportView(lstSimpleElement);
+        this.scrSimpleElement.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+        this.scrSimpleElement.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+
+        this.spnlExpression.setTopComponent(this.getPanelTop());
+        this.spnlExpression.setBottomComponent(this.spnlBottom);
+        this.spnlExpression.setBorder(emptyborder2x2);
+        this.spnlExpression.setOneTouchExpandable(true);
+
+        this.spnlBottom.setLeftComponent(this.scrElements);
+        this.spnlBottom.setRightComponent(this.spnlItem);
+        this.spnlBottom.setBorder(emptyborder2x2);
+        this.spnlBottom.setOneTouchExpandable(true);
+
+        this.spnlItem.setLeftComponent(this.getPanelElement());
+        this.spnlItem.setRightComponent(this.pnlDescription);
+        this.spnlItem.setBorder(emptyborder2x2);
+        this.spnlItem.setOneTouchExpandable(true);
+
+        this.tabExpressionBuilder.setName("tabExpressionBuilder");
+        this.tabExpressionBuilder.addTab("_Expression", null, this.spnlExpression);
+        this.tabExpressionBuilder.addTab("_Scripts", null, this.pnlScriptEditorContainer);
+        
+        this.setLayout(new BorderLayout());
+        this.add(tabExpressionBuilder, BorderLayout.CENTER);
+
+    }
+
+    private JPanel getPanelTop() {
+        if (this.pnlTop == null) {
+            GridBagConstraintsBuilder cs = new GridBagConstraintsBuilder();
+            cs.anchor(GridBagConstraints.CENTER);
+            cs.fill(GridBagConstraints.BOTH);
+
+            JPanel pnlRight = new JPanel();
+            pnlRight.setLayout(new GridBagLayout());
+            pnlRight.add(this.btnHistory,     cs.xy(0, 0).get());
+            pnlRight.add(this.btnBookmarks,   cs.xy(1, 0).get());
+            pnlRight.add(this.btnEq,          cs.xy(0, 1).get());
+            pnlRight.add(this.btnNeq,         cs.xy(1, 1).get());
+            pnlRight.add(this.btnAdd,         cs.xy(2, 1).get());
+            pnlRight.add(this.btnSubst,       cs.xy(3, 1).get());
+            pnlRight.add(this.btnMult,        cs.xy(0, 2).get());
+            pnlRight.add(this.btnDiv,         cs.xy(1, 2).get());
+            pnlRight.add(this.btnParentOpen,  cs.xy(2, 2).get());
+            pnlRight.add(this.btnParentClose, cs.xy(3, 2).get());
+            pnlRight.add(new JLabel(),        cs.xy(0, 3).span(4,0).grow(1, 1).get());
+
+            JPanel pnlLeft = new JPanel();
+            pnlLeft.setLayout(new GridBagLayout());
+            pnlLeft.add(this.scrExpression, cs.xy(0, 0).span(3, 1).grow(1, 1).get());
+            pnlLeft.add(this.lblMsg, cs.xy(0, 1).nospan().grow(1, 0).get());
+            pnlLeft.add(this.btnTip, cs.xy(1, 1).nospan().nogrow().get());
+            pnlLeft.add(this.lblColumn, cs.xy(2, 1).nospan().nogrow().get());
+
+            JPanel panel = new JPanel();
+            panel.setLayout(new GridBagLayout());
+            panel.add(pnlLeft, cs.xy(0, 0).nospan().grow(1, 1).get());
+            panel.add(pnlRight, cs.xy(1, 0).nospan().nogrow().anchor(GridBagConstraints.NORTH).get());
+
+            this.pnlTop = panel;
+        }
+        return this.pnlTop;
+    }
+
+    private JPanel getPanelElement() {
+        if (this.pnlElement == null) {
+            GridBagConstraintsBuilder cs = new GridBagConstraintsBuilder();
+            cs.anchor(GridBagConstraints.CENTER);
+            cs.fill(GridBagConstraints.BOTH);
+
+            JPanel panel = new JPanel();
+            panel.setLayout(new GridBagLayout());
+            panel.add(this.txtGroupElement, cs.xy(0, 0).span(4, 1).grow(1,0).get());
+            panel.add(this.btnGroupElementInsert, cs.xy(4, 0).nospan().nogrow().get());
+            panel.add(this.txtSimpleElementFilter, cs.xy(0, 1).span(4, 1).grow(1,0).get());
+            panel.add(this.btnSimpleElementInsert, cs.xy(4, 1).nospan().nogrow().get());
+            panel.add(this.scrSimpleElement, cs.xy(0, 2).span(5, 1).grow(1, 1).get());
+            panel.add(new JLabel(), cs.xy(0, 3).nospan().grow(1,0).get());
+            panel.add(this.btnSimpleElementTimeLimit, cs.xy(1, 3).nospan().nogrow().get());
+            panel.add(this.btnSimpleElementSortUp, cs.xy(2, 3).nospan().nogrow().get());
+            panel.add(this.btnSimpleElementSortDown, cs.xy(3, 3).nospan().nogrow().get());
+            panel.add(this.btnSimpleElementInsert, cs.xy(4, 3).nospan().nogrow().get());
+
+            this.pnlElement = panel;
+        }
+        return this.pnlElement;
+    }
+
+    public ImageIcon loadImage(String imageName) {
+        try {
+            ClassLoader classloader = getClass().getClassLoader();
+            java.net.URL url = classloader.getResource(imageName);
+            if (url != null) {
+                ImageIcon icon = new ImageIcon(url);
+                return icon;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        throw new IllegalArgumentException("Unable to load image: " + imageName);
+    }
+}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilder.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilder.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilder.java	(revision 44259)
@@ -18,7 +18,6 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
-import java.util.Map;
 import java.util.Objects;
 import javax.swing.DefaultListCellRenderer;
 import javax.swing.ImageIcon;
@@ -50,12 +49,8 @@
 import org.apache.commons.lang3.StringUtils;
 import org.gvsig.expressionevaluator.Expression;
 import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator;
-import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.SymbolTable;
 import org.gvsig.expressionevaluator.swing.Element;
-import org.gvsig.expressionevaluator.swing.Element.CalculatedElement;
-import org.gvsig.expressionevaluator.swing.Element.ConstantElement;
-import org.gvsig.expressionevaluator.swing.Element.FunctionElement;
 import org.gvsig.expressionevaluator.swing.Element.GroupElement;
 import org.gvsig.expressionevaluator.swing.Element.SimpleElement;
 import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
@@ -65,7 +60,6 @@
 import org.gvsig.tools.i18n.I18nManager;
 import org.gvsig.tools.script.Script;
 import org.gvsig.tools.swing.api.Component;
-import org.gvsig.tools.swing.api.ListElement;
 import org.gvsig.tools.swing.api.ToolsSwingLocator;
 import org.gvsig.tools.swing.api.ToolsSwingManager;
 import org.gvsig.tools.swing.api.pickercontroller.PickerController;
@@ -79,7 +73,7 @@
  */
 @SuppressWarnings("UseSpecificCatch")
 public class DefaultJExpressionBuilder
-        extends DefaultJExpressionBuilderView
+        extends DefaultJExpressionBuilderView2
         implements JExpressionBuilder {
 
     private final ExpressionEvaluatorSwingManager manager;
@@ -87,7 +81,7 @@
     private PickerController<List<Script>> scriptPicker;
     private ScriptSwingManager.ScriptEditor scriptEditor;
     
-    private final ExpressionBuilderConfig config;
+    private final ExpressionBuilderConfig bulderConfig;
     private ElementsTreeModel treeModel;
     private ImageIcon defaultIconGroup;
     private ImageIcon defaultIconElement;
@@ -277,9 +271,9 @@
     public DefaultJExpressionBuilder(ExpressionEvaluatorSwingManager manager, ExpressionBuilderConfig config) {
         this.manager = manager;
         if( config == null ) {
-            this.config = new DefaultExpressionBuilderConfig(manager);
+            this.bulderConfig = new DefaultExpressionBuilderConfig(manager);
         } else {
-            this.config = config;
+            this.bulderConfig = config;
         }
         this.initComponents();
     }
@@ -304,7 +298,7 @@
         final I18nManager i18n = ToolsLocator.getI18nManager();
         
         this.automaticExpressionChecker = new AbstractAutomaticExpressionChecker(
-                config, txtExpression
+                bulderConfig, txtExpression
             ) {
             @Override
             protected Expression getExpression() {
@@ -390,29 +384,47 @@
                 lblColumn.setText(Integer.toString(e.getDot()));
             }
         });
+        this.treeElements.setRowHeight(0);
         this.treeElements.setCellRenderer(new DefaultTreeCellRenderer() {
             @Override
             public java.awt.Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
-                JLabel label = (JLabel) super.getTreeCellRendererComponent(tree,value, selected, expanded, leaf, row, hasFocus);
+                JLabel component = (JLabel) super.getTreeCellRendererComponent(tree,value, selected, expanded, leaf, row, hasFocus);
+                JLabel text = component;
+                JLabel icon = component;
+
+//                JPanel component = new JPanel();
+//                JLabel text = new JLabel();
+//                JLabel icon = new JLabel();
+//                component.setLayout(new FlowLayout());
+//                component.add(icon);
+//                component.add(text);
+//                component.setLayout(new GridBagLayout());
+//                component.add(icon, new GridBagConstraints(0,0,0,0,0,0,GridBagConstraints.NORTH,GridBagConstraints.BOTH,new Insets(1,1,1,1),1,1));
+//                component.add(text, new GridBagConstraints(1,0,0,0,0,0,GridBagConstraints.NORTH,GridBagConstraints.BOTH,new Insets(1,1,1,1),1,1));
+                
                 if( value instanceof Element ) {
                     Element element = (Element) value;
                     if( element.getIconName()==null ) {
                         if( element instanceof GroupElement ) {
-                            label.setIcon(defaultIconGroup);
+                            icon.setIcon(defaultIconGroup);
                         } else {
-                            label.setIcon(defaultIconElement);
+                            icon.setIcon(defaultIconElement);
                         }
                     } else {
-                        label.setIcon(element.getIcon());
+                        icon.setIcon(element.getIcon());
                     }
-                    label.setText(element.getName());
-                    label.setEnabled(element.isEnabled());
+                    text.setText(element.getLabel());
+                    text.setEnabled(element.isEnabled());
                 } else {
-                    label.setIcon(null);
-                    label.setText(Objects.toString(value, ""));
+                    icon.setIcon(null);
+                    text.setText(Objects.toString(value, ""));
                 }
-                return label;
+                return component;
             }
+
+            private JLabel JPanel() {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+            }
         });
         
         this.treeElements.addTreeSelectionListener(new TreeSelectionListener() {
@@ -448,9 +460,9 @@
         this.btnSimpleElementInsert.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
-                ListElement<SimpleElement> element = (ListElement<SimpleElement>) lstSimpleElement.getSelectedValue();
+                Element element = (Element) lstSimpleElement.getSelectedValue();
                 if (element != null) {
-                    doInsert(element.getValue());
+                    doInsert(element);
                 }
             }
         });
@@ -466,13 +478,8 @@
             @Override
             public java.awt.Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                 JLabel label = (JLabel)super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
-                Element element = null;
-                if( value instanceof ListElement ) {
-                    if( ((ListElement) value).getValue() instanceof Element ) {
-                        element = (Element) ((ListElement) value).getValue();
-                    }
-                }
-                if( element !=null ) {
+                if( value instanceof Element ) {
+                    Element element = (Element) value;
                     if( element.getIconName()==null ) {
                         if( element instanceof GroupElement ) {
                             label.setIcon(defaultIconGroup);
@@ -482,7 +489,7 @@
                     } else {
                         label.setIcon(element.getIcon());
                     }
-                    label.setText(element.getName());
+                    label.setText(element.getLabel());
                     label.setEnabled(element.isEnabled());
                 } else {
                     label.setIcon(null);
@@ -494,9 +501,9 @@
         this.lstSimpleElement.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
             @Override
             public void valueChanged(ListSelectionEvent e) {
-                ListElement<SimpleElement> element = (ListElement<SimpleElement>) lstSimpleElement.getSelectedValue();
+                Element element = (Element) lstSimpleElement.getSelectedValue();
                 if (element != null) {
-                    doSelectElement(element.getValue());
+                    doSelectElement(element);
                 }
             }
         });
@@ -504,10 +511,10 @@
             @Override
             public void mouseClicked(MouseEvent e) {
                 if( e.getButton()==MouseEvent.BUTTON1 && e.getClickCount()==2 ) {
-                    ListElement<SimpleElement> element = (ListElement<SimpleElement>) lstSimpleElement.getSelectedValue();
+                    Element element = (Element) lstSimpleElement.getSelectedValue();
                     if (element != null) {
-                        doSelectElement(element.getValue());
-                        doInsert(element.getValue());
+                        doSelectElement(element);
+                        doInsert(element);
                     }
                 }
             }
@@ -516,10 +523,10 @@
             @Override
             public void keyReleased(KeyEvent e) {
                 if( e.getKeyCode()==KeyEvent.VK_ENTER ) {
-                    ListElement<SimpleElement> element = (ListElement<SimpleElement>) lstSimpleElement.getSelectedValue();
+                    Element element = (Element) lstSimpleElement.getSelectedValue();
                     if (element != null) {
-                        doSelectElement(element.getValue());
-                        doInsert(element.getValue());
+                        doSelectElement(element);
+                        doInsert(element);
                     }
                 }
             }
@@ -611,11 +618,17 @@
         this.pnlScriptEditorContainer.setLayout(new BorderLayout());
         this.pnlScriptEditorContainer.add(this.scriptEditor.asJComponent(), BorderLayout.CENTER);
     
-        this.tabExpressionBuilder.setEnabledAt(0, this.config.getScriptsEnabled());
+        this.tabExpressionBuilder.setEnabledAt(0, this.bulderConfig.getPreferences().getScriptsEnabled());
         
         this.infoPanel.repaint();
         
         this.setPreferredSize(new Dimension(650, 350));
+        
+
+        Dimension dim = this.getPreferredSize();
+        this.spnlExpression.setDividerLocation(dim.height/5);
+        this.spnlBottom.setDividerLocation(dim.width/3);
+        this.spnlItem.setDividerLocation(dim.width/3);
     }
 
     private String removeCursorMark(String s) {
@@ -655,25 +668,9 @@
         this.txtExpression.requestFocusInWindow();
     }
 
-    private void doInsert(SimpleElement element) {
-        if( element instanceof FunctionElement ) {
-            Function function = ((FunctionElement)element).getFunction();
-            if (function == null) {
-                doInsert(element.getName());
-            } else {
-                doInsert(function.template() == null ? function.name() + "({{}})" : function.template());
-            }
-        } else if( element instanceof CalculatedElement) {
-            Object value = ((CalculatedElement) element).getValue();
-            if( value != null ) {
-                doInsert(" "+value.toString()+" ");
-            }
-        } else if( element instanceof ConstantElement) {
-            Object value = ((ConstantElement) element).getValue();
-            doInsert(" "+Utils.repr(value)+" ");
-        } else {
-            doInsert(" "+element.getName()+" ");
-        }
+    private void doInsert(Element element) {
+        doInsert(element.getRenderedValue());
+        element.used();
     }
 
     private void doFilter() {
@@ -681,7 +678,7 @@
         model.setFilter(this.txtSimpleElementFilter.getText());
     }
 
-    private void doSelectElement(SimpleElement element) {
+    private void doSelectElement(Element element) {
 //        if( !element.isEnabled() ) {
 //            this.infoPanel.clean();
 //        } else {
@@ -724,13 +721,7 @@
                 return;
             }
             if (child instanceof SimpleElement) {
-                String label = child.getName();
-                Function function = child instanceof FunctionElement?  ((FunctionElement)child).getFunction(): null;
-                if (function != null && !StringUtils.isEmpty(function.returnType())) {
-                    label = "<html><b>" + label + "</b> return " + function.returnType() + "</html>";
-//                    label = label + " return " + function.returnType();
-                }
-                model.addElement(new ListElement<>(label, child));
+                model.addElement(child);
             }
         }
         model.sort(true);
@@ -784,97 +775,56 @@
             }
         }
     }
-    
-    @Override
-    public int getSimpleElementsLimit() {
-        return this.config.getSimpleElementsLimit();
-    }
 
     @Override
-    public void setSimpleElementsLimit(int limit) {
-        this.config.setSimpleElementsLimit(limit);
+    public Preferences getPreferences() {
+        return this.bulderConfig.getPreferences();
     }
     
     @Override
     public List<Element> getElements() {
-        return this.config.getElements();
+        return this.bulderConfig.getElements();
     }
     
     @Override
     public void addElement(Element element) {
-        this.config.addElement(element);
+        this.bulderConfig.addElement(element);
     }
     
     @Override
     public Collection<SymbolTable> getSymbolTables() {
-        return this.config.getSymbolTables();
+        return this.bulderConfig.getSymbolTables();
     }
     
     @Override
     public void addSymbolTable(String name) {
-        this.config.addSymbolTable(name);
+        this.bulderConfig.addSymbolTable(name);
     }
     
     @Override
     public void addSymbolTable(SymbolTable symbolTable) {
-        this.config.addSymbolTable(symbolTable);
+        this.bulderConfig.addSymbolTable(symbolTable);
     }
 
     @Override
     public void removeAllSymbolTables() {
-        this.config.removeAllSymbolTables();
+        this.bulderConfig.removeAllSymbolTables();
     }
 
     @Override
     public void removeSymbolTable(String name) {
-        this.config.removeSymbolTable(name);
+        this.bulderConfig.removeSymbolTable(name);
     }
 
     @Override
     public SymbolTable getPreviewSymbolTable() {
-        return this.config.getPreviewSymbolTable();
+        return this.bulderConfig.getPreviewSymbolTable();
     }
 
     @Override
     public void setPreviewSymbolTable(SymbolTable symbolTable) {
-        this.config.setPreviewSymbolTable(symbolTable);
+        this.bulderConfig.setPreviewSymbolTable(symbolTable);
     }
-
-    @Override
-    public void setScriptsEnabled(boolean enabled) {
-        this.config.setScriptsEnabled(enabled);
-        this.tabExpressionBuilder.setEnabledAt(0, this.config.getScriptsEnabled());
-    }
-
-    @Override
-    public boolean getScriptsEnabled() {
-        return this.config.getScriptsEnabled();
-    }
-
-    @Override
-    public void setSQLCompatible(boolean sqlCompatible) {
-        this.config.setSQLCompatible(sqlCompatible);
-    }
-
-    @Override
-    public boolean isSQLCompatible() {
-        return this.config.isSQLCompatible();
-    }
-
-    @Override
-    public Object getProperty(String string) {
-        return this.config.getProperty(string);
-    }
-
-    @Override
-    public void setProperty(String string, Object o) {
-        this.config.setProperty(string, o);
-    }
-
-    @Override
-    public Map<String, Object> getProperties() {
-        return this.config.getProperties();
-    }
     
     @Override
     public JComponent asJComponent() {
@@ -885,13 +835,11 @@
     private void initializeTree() {
         if( this.treeModel == null ) {
             I18nManager i18n = ToolsLocator.getI18nManager();
-            this.treeModel = new ElementsTreeModel(
+            this.treeModel = new ElementsTreeModel( (GroupElement)
                     this.manager.createGroupElement(
-                            this.config,
                             i18n.getTranslation("_Elements"),
                             this.getElements()
-                    )
-            );
+                    ).setConfig(this));
             this.treeElements.setModel(this.treeModel);
         }
     }
@@ -902,14 +850,14 @@
                 "Indicate the time limit in seconds for calculating the elements", 
                 "Time limit", 
                 JOptionPane.QUESTION_MESSAGE, 
-                String.valueOf(this.config.getSimpleElementsLimit())
+                String.valueOf(this.bulderConfig.getPreferences().getSimpleElementsLimit())
         );
         if( StringUtils.isBlank(s) ) {
             return;
         }
         try {
             int n = Integer.parseInt(s);
-            this.config.setSimpleElementsLimit(n);
+            this.bulderConfig.getPreferences().setSimpleElementsLimit(n);
             this.treeModel.reload();
         } catch(Exception ex) {
             dialogs.messageDialog(
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionPickerController.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionPickerController.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionPickerController.java	(revision 44259)
@@ -5,7 +5,6 @@
 import java.net.URL;
 import java.util.Collection;
 import java.util.List;
-import java.util.Map;
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
 import javax.swing.JMenuItem;
@@ -18,6 +17,7 @@
 import org.gvsig.expressionevaluator.ExpressionUtils;
 import org.gvsig.expressionevaluator.SymbolTable;
 import org.gvsig.expressionevaluator.swing.Element;
+import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dataTypes.CoercionException;
 import org.gvsig.tools.dataTypes.DataTypesManager;
@@ -25,7 +25,6 @@
 import org.gvsig.tools.swing.api.pickercontroller.AbstractPickerController;
 import org.gvsig.tools.swing.icontheme.IconTheme;
 import org.gvsig.tools.swing.icontheme.IconThemeManager;
-import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
 import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
 import org.gvsig.expressionevaluator.swing.ExpressionPickerController;
 import org.gvsig.tools.i18n.I18nManager;
@@ -180,14 +179,9 @@
     }
 
     @Override
-    public int getSimpleElementsLimit() {
-        return this.config.getSimpleElementsLimit();
+    public Preferences getPreferences() {
+        return this.config.getPreferences();
     }
-
-    @Override
-    public void setSimpleElementsLimit(int limit) {
-        this.config.setSimpleElementsLimit(limit);
-    }
     
     @Override
     public List<Element> getElements() {
@@ -225,16 +219,6 @@
     }
 
     @Override
-    public void setScriptsEnabled(boolean enabled) {
-        this.config.setScriptsEnabled(enabled);
-    }
-
-    @Override
-    public boolean getScriptsEnabled() {
-        return this.config.getScriptsEnabled();
-    }
-
-    @Override
     public SymbolTable getPreviewSymbolTable() {
         return this.config.getPreviewSymbolTable();
     }
@@ -243,29 +227,4 @@
     public void setPreviewSymbolTable(SymbolTable symbolTable) {
         this.config.setPreviewSymbolTable(symbolTable);
     }
-
-    @Override
-    public void setSQLCompatible(boolean sqlCompatible) {
-        this.config.setSQLCompatible(sqlCompatible);
-    }
-
-    @Override
-    public boolean isSQLCompatible() {
-        return this.config.isSQLCompatible();
-    }
-
-    @Override
-    public Object getProperty(String string) {
-        return this.config.getProperty(string);
-    }
-
-    @Override
-    public void setProperty(String string, Object o) {
-        this.config.setProperty(string, o);
-    }
-
-    @Override
-    public Map<String, Object> getProperties() {
-        return this.config.getProperties();
-    }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionEvaluatorSwingManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionEvaluatorSwingManager.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultExpressionEvaluatorSwingManager.java	(revision 44259)
@@ -19,7 +19,6 @@
 import org.gvsig.expressionevaluator.swing.Element.ConstantElement;
 import org.gvsig.expressionevaluator.swing.Element.FunctionElement;
 import org.gvsig.expressionevaluator.swing.Element.GroupElement;
-import org.gvsig.expressionevaluator.swing.Element.VariableElement;
 import org.gvsig.expressionevaluator.swing.ElementFactory;
 import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
 import org.gvsig.expressionevaluator.swing.ExpressionPickerController;
@@ -28,7 +27,6 @@
 import org.gvsig.expressionevaluator.swing.impl.elements.DefaultConstantValueElement;
 import org.gvsig.expressionevaluator.swing.impl.elements.DefaultFunctionElement;
 import org.gvsig.expressionevaluator.swing.impl.elements.DefaultGroupElement;
-import org.gvsig.expressionevaluator.swing.impl.elements.DefaultVariableElement;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.i18n.I18nManager;
 
@@ -44,7 +42,7 @@
     }
 
     @Override
-    public List<Element> createElements(ExpressionBuilderConfig config, Collection<SymbolTable> symbolTables) {
+    public List<Element> createElements(Collection<SymbolTable> symbolTables) {
         I18nManager i18n = ToolsLocator.getI18nManager();
         Map<String, Function> functions = new HashMap<>();
         
@@ -61,25 +59,25 @@
                 String groupName = function.group();
                 GroupElement group = operatorGroups.get(groupName);
                 if (group == null) {
-                    group = new DefaultGroupElement(config, groupName);
+                    group = new DefaultGroupElement(groupName);
                     operatorGroups.put(groupName, group);
                 }
-                group.addElement(new DefaultFunctionElement(config, function));
+                group.addElement(new DefaultFunctionElement(function));
             } else {
                 String groupName = function.group();
                 GroupElement group = functionGroups.get(groupName);
                 if (group == null) {
-                    group = new DefaultGroupElement(config, groupName);
+                    group = new DefaultGroupElement(groupName);
                     functionGroups.put(groupName, group);
                 }
-                group.addElement(new DefaultFunctionElement(config, function));
+                group.addElement(new DefaultFunctionElement(function));
             }
         }
-        GroupElement builtinFunctions = this.createGroupElement(config, i18n.getTranslation("_Functions"));
+        GroupElement builtinFunctions = this.createGroupElement(i18n.getTranslation("_Functions"));
         for (GroupElement group : functionGroups.values()) {
             builtinFunctions.addElement(group);
         }
-        GroupElement operatorFunctions = this.createGroupElement(config, i18n.getTranslation("_Operators"));
+        GroupElement operatorFunctions = this.createGroupElement(i18n.getTranslation("_Operators"));
         for (GroupElement group : operatorGroups.values()) {
             operatorFunctions.addElement(group);
         }
@@ -126,42 +124,50 @@
     }
     
     @Override
-    public GroupElement createGroupElement(ExpressionBuilderConfig config, String name) {
-        GroupElement e = new DefaultGroupElement(config, name);
+    public GroupElement createGroupElement(String name) {
+        GroupElement e = new DefaultGroupElement(name);
         return e;
     }
 
     @Override
-    public GroupElement createGroupElement(ExpressionBuilderConfig config, String name, List<Element> elements) {
-        GroupElement e = new DefaultGroupElement(this, config, name, elements);
+    public GroupElement createGroupElement(String name, List<Element> elements) {
+        GroupElement e = new DefaultGroupElement(this, name, elements);
         return e;
     }
 
     @Override
-    public FunctionElement createFunctionElement(ExpressionBuilderConfig config, Function function) {
-        FunctionElement e = new DefaultFunctionElement(config, function);
+    public FunctionElement createFunctionElement(Function function) {
+        FunctionElement e = new DefaultFunctionElement(function);
         return e;
     }
 
     @Override
-    public ConstantElement createConstantElement(ExpressionBuilderConfig config, Object value) {
-        ConstantElement e = new DefaultConstantValueElement(config, value, null);
+    public ConstantElement createConstantElement(Object value, String label) {
+        ConstantElement e = new DefaultConstantValueElement(
+                value, 
+                label, 
+                null
+        );
         return e;
     }
 
     @Override
-    public ConstantElement createConstantElement(ExpressionBuilderConfig config, Object value, String description) {
-        ConstantElement e = new DefaultConstantValueElement(config, value, description);
+    public ConstantElement createConstantElement(Object value, String label, String description) {
+        ConstantElement e = new DefaultConstantValueElement(
+                value, 
+                StringUtils.defaultIfEmpty(label, ""), 
+                description
+        );
         return e;
     }
+//
+//    @Override
+//    public VariableElement createVariableElement(ExpressionBuilderConfig config, String label, String source, String name, String typeName, String description) {
+//        VariableElement e = new DefaultVariableElement(config, label, source, name, typeName, description);
+//        return e;
+//    }
 
     @Override
-    public VariableElement createVariableElement(ExpressionBuilderConfig config, String label, String source, String name, String typeName, String description) {
-        VariableElement e = new DefaultVariableElement(config, label, source, name, typeName, description);
-        return e;
-    }
-
-    @Override
     public ExpressionPickerController createExpressionPickerController(JTextComponent text, JButton button) {
         ExpressionPickerController c = new DefaultExpressionPickerController(this, text, button);
         return c;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/FilteredListModel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/FilteredListModel.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/FilteredListModel.java	(revision 44259)
@@ -8,12 +8,14 @@
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
+import java.util.Objects;
 import javax.swing.AbstractListModel;
 import javax.swing.SwingUtilities;
 import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.gvsig.expressionevaluator.swing.Element.ConstantElement;
-import org.gvsig.tools.swing.api.ListElement;
+import org.gvsig.tools.util.LabeledValue;
+import org.gvsig.tools.util.LabeledValueImpl;
 
 /**
  *
@@ -21,8 +23,8 @@
  */
 class FilteredListModel extends AbstractListModel {
 
-    private List<ListElement> elements;
-    private List<ListElement> filteredElements;
+    private List<LabeledValue> elements;
+    private List<LabeledValue> filteredElements;
     private String filter;
 
     public FilteredListModel() {
@@ -37,17 +39,21 @@
     }
 
     @Override
-    public Object getElementAt(int index) {
+    public LabeledValue getElementAt(int index) {
         return this.filteredElements.get(index);
     }
 
-    void addElement(ListElement element) {
+    void addElement(LabeledValue element) {
         this.elements.add(element);
         if (this.elements != this.filteredElements) {
             this.filteredElements.add(element);
         }
     }
 
+    void addElement(Object element) {
+        this.addElement(new LabeledValueImpl<>(Objects.toString(element, ""), element));
+    }
+
     public void setFilter(String filter) {
         if (StringUtils.isEmpty(filter)) {
             this.filter = null;
@@ -55,7 +61,7 @@
         } else {
             this.filter = filter;
             this.filteredElements = new ArrayList<>();
-            for (ListElement element : elements) {
+            for (LabeledValue element : elements) {
                 if (FilenameUtils.wildcardMatch(element.getValue().toString().toLowerCase(), this.filter.toLowerCase())) {
                     this.filteredElements.add(element);
                 }
@@ -97,29 +103,11 @@
     }
 
     private void sortForeground(final boolean ascending) {
-        final List<ListElement> items = new ArrayList<>(elements);
-        final Comparator comparator = Utils.naturalComparator();
-        items.sort(new Comparator<ListElement>() {
+        final List items = new ArrayList<>(elements);
+        items.sort(new Comparator<Comparable>() {
             @Override
-            public int compare(ListElement o1, ListElement o2) {
-                int r;
-                if (o1 == null && o2 == null) {
-                    r = 0;
-                } else if (o1 == null && o2 != null) {
-                    r = -1;
-                } else if (o1 != null && o2 == null) {
-                    r = 1;
-                } else {
-                    if( o1.getValue() instanceof ConstantElement &&
-                        o2.getValue() instanceof ConstantElement ) {
-                        r = comparator.compare(
-                            ((ConstantElement)o1.getValue()).getValue(),
-                            ((ConstantElement)o2.getValue()).getValue()
-                        );
-                    } else {
-                        r = comparator.compare(o1.getValue(),o2.getValue());
-                    }
-                }
+            public int compare(Comparable o1, Comparable o2) {
+                int r = ObjectUtils.compare(o1, o2);
                 if (ascending) {
                     return r;
                 }
@@ -135,8 +123,4 @@
         }
     }
 
-    void addElement(Object data) {
-        ListElement e = new ListElement(data.toString(), data);
-        this.addElement(e);
-    }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionPicker.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionPicker.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionPicker.java	(revision 44259)
@@ -3,7 +3,6 @@
 import java.awt.BorderLayout;
 import java.util.Collection;
 import java.util.List;
-import java.util.Map;
 import javax.swing.JButton;
 import javax.swing.JComponent;
 import javax.swing.JPanel;
@@ -41,6 +40,11 @@
         this.add(text, BorderLayout.CENTER);
         this.add(button, BorderLayout.LINE_END);
     }
+
+    @Override
+    public Preferences getPreferences() {
+        return this.controller.getPreferences();
+    }
     
     @Override
     public ExpressionPickerController getController() {
@@ -62,18 +66,7 @@
         return this;
     }
 
-
     @Override
-    public int getSimpleElementsLimit() {
-        return this.controller.getSimpleElementsLimit();
-    }
-
-    @Override
-    public void setSimpleElementsLimit(int limit) {
-        this.controller.setSimpleElementsLimit(limit);
-    }
-    
-    @Override
     public List<Element> getElements() {
         return this.controller.getElements();
     }
@@ -109,16 +102,6 @@
     }
 
     @Override
-    public void setScriptsEnabled(boolean enabled) {
-        this.controller.setScriptsEnabled(enabled);
-    }
-
-    @Override
-    public boolean getScriptsEnabled() {
-        return this.controller.getScriptsEnabled();
-    }
-
-    @Override
     public SymbolTable getPreviewSymbolTable() {
         return this.controller.getPreviewSymbolTable();
     }
@@ -128,28 +111,4 @@
         this.controller.setPreviewSymbolTable(symbolTable);
     }
 
-    @Override
-    public void setSQLCompatible(boolean sqlCompatible) {
-        this.controller.setSQLCompatible(sqlCompatible);
-    }
-
-    @Override
-    public boolean isSQLCompatible() {
-        return this.controller.isSQLCompatible();
-    }
-
-    @Override
-    public Object getProperty(String string) {
-        return this.controller.getProperty(string);
-    }
-
-    @Override
-    public void setProperty(String string, Object o) {
-        this.controller.setProperty(string, o);
-    }
-
-    @Override
-    public Map<String, Object> getProperties() {
-        return this.controller.getProperties();
-    }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultFunctionElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultFunctionElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultFunctionElement.java	(revision 44259)
@@ -28,17 +28,16 @@
         implements FunctionElement {
 
     private final Function function;
-    private final ExpressionBuilderConfig config;
 
-    public DefaultFunctionElement(ExpressionBuilderConfig config, Function function) {
+    public DefaultFunctionElement(Function function) {
         super(
                 function.name(),
+                function.name(),
                 function.isSQLCompatible()
                 ? "expressionbuilder-element-function-sql"
                 : "expressionbuilder-element-function"
         );
         this.function = function;
-        this.config = config;
     }
 
     @Override
@@ -48,7 +47,7 @@
 
     @Override
     public boolean isEnabled() {
-        if( this.config.isSQLCompatible() ) {
+        if( this.getConfig().getPreferences().isSQLCompatible() ) {
             return this.function.isSQLCompatible();
         }
         return true;
@@ -65,6 +64,26 @@
     }
 
     @Override
+    public String getName() {
+        return this.function.name();
+    }
+
+    @Override
+    public Object getValue() {
+        return this.function.name();
+    }
+
+    @Override
+    public String getLabel() {
+        return "<html><b>" + function.name() + "</b> return " + function.returnType() + "</html>";
+    }
+
+    @Override
+    public String getRenderedValue() {
+        return function.template() == null ? function.name() + "({{}})" : function.template();
+    }
+
+    @Override
     public String getDescription() {
         I18nManager i18n = ToolsLocator.getI18nManager();
 
@@ -72,42 +91,36 @@
         html.append("<html>\n");
 
         Function theFunction = this.getFunction();
-        if (theFunction == null) {
-            html.append("<b>").append(i18n.getTranslation("_Function")).append("</b> ").append(this.getName()).append("<br>\n<br>\n");
-            html.append("<b>").append(i18n.getTranslation("_Return")).append("</b> Object<br>\n<br>\n");
-            html.append("<b>").append(i18n.getTranslation("_Template")).append(":</b> ").append(this.getName()).append("()<br>\n");
-        } else {
-            html.append("<b>").append(i18n.getTranslation("_Function")).append("</b> ").append(this.getName()).append("<br>\n<br>\n");
-            List<String> aliases = theFunction.aliases();
-            if( aliases!=null && !aliases.isEmpty() ) {
-                html.append("<b>").append(i18n.getTranslation("_Aliases")).append(":</b> ").append("<ul>\n");
-                for (String alias : aliases) {
-                    html.append("<li>").append(alias).append("</li>\n");
-                }
-                html.append("</ul>\n");
+        html.append("<b>").append(i18n.getTranslation("_Function")).append("</b> ").append(this.getName()).append("<br>\n<br>\n");
+        List<String> aliases = theFunction.aliases();
+        if( aliases!=null && !aliases.isEmpty() ) {
+            html.append("<b>").append(i18n.getTranslation("_Aliases")).append(":</b> ").append("<ul>\n");
+            for (String alias : aliases) {
+                html.append("<li>").append(alias).append("</li>\n");
             }
-            html.append("<b>").append(i18n.getTranslation("_Return")).append("</b> ");
-            html.append(StringUtils.isEmpty(theFunction.returnType()) ? "Objec" : theFunction.returnType());
-            html.append("<br>\n");
-            html.append("<b>").append(i18n.getTranslation("_Template")).append("</b> ");
-            html.append(StringUtils.isEmpty(theFunction.template()) ? this.getName() + "()" : theFunction.template());
-            html.append("<br>\n");
+            html.append("</ul>\n");
+        }
+        html.append("<b>").append(i18n.getTranslation("_Return")).append("</b> ");
+        html.append(StringUtils.isEmpty(theFunction.returnType()) ? "Objec" : theFunction.returnType());
+        html.append("<br>\n");
+        html.append("<b>").append(i18n.getTranslation("_Template")).append("</b> ");
+        html.append(StringUtils.isEmpty(theFunction.template()) ? this.getName() + "()" : theFunction.template());
+        html.append("<br>\n");
 
-            String[] args = theFunction.descriptionArgs();
-            if (args != null) {
-                html.append("<b>").append(i18n.getTranslation("_Arguments")).append(":</b> ").append("<ul>\n");
-                for (String arg : args) {
-                    html.append("<li>").append(arg).append("</li>\n");
-                }
-                html.append("</ul>\n");
-                html.append("<br>\n");
+        String[] args = theFunction.descriptionArgs();
+        if (args != null) {
+            html.append("<b>").append(i18n.getTranslation("_Arguments")).append(":</b> ").append("<ul>\n");
+            for (String arg : args) {
+                html.append("<li>").append(arg).append("</li>\n");
             }
-            String functionDescription = theFunction.description();
-            if( !StringUtils.isBlank(functionDescription) ) {
-                html.append("<b>").append(i18n.getTranslation("_Description")).append("</b><br>\n");
-                html.append(functionDescription.replace("\n", "<br>")).append("<br>\n");
-            }            
+            html.append("</ul>\n");
+            html.append("<br>\n");
         }
+        String functionDescription = theFunction.description();
+        if( !StringUtils.isBlank(functionDescription) ) {
+            html.append("<b>").append(i18n.getTranslation("_Description")).append("</b><br>\n");
+            html.append(functionDescription.replace("\n", "<br>")).append("<br>\n");
+        }            
 
         html.append("</html>\n");
         return html.toString();
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultVariableElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultVariableElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultVariableElement.java	(revision 44259)
@@ -1,7 +1,7 @@
 package org.gvsig.expressionevaluator.swing.impl.elements;
 
 import org.apache.commons.lang3.StringUtils;
-import org.gvsig.expressionevaluator.swing.Element.VariableElement;
+//import org.gvsig.expressionevaluator.swing.Element.VariableElement;
 import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
 import org.gvsig.expressionevaluator.swing.spi.AbstractElement;
 import org.gvsig.tools.ToolsLocator;
@@ -11,16 +11,16 @@
  *
  * @author jjdelcerro
  */
-public class DefaultVariableElement 
-        extends AbstractElement
-        implements VariableElement {
+public class DefaultVariableElement
+        extends AbstractElement //        implements VariableElement 
+{
 
     private final String label;
     private final String source;
     private final String typeName;
     private final String description;
     private final ExpressionBuilderConfig config;
-    
+
     public DefaultVariableElement(ExpressionBuilderConfig config, String label, String source, String name, String typeName, String description) {
         super(name, "expressionbuilder-element");
         this.description = description;
@@ -30,7 +30,7 @@
         this.config = config;
     }
 
-    @Override
+//    @Override
     public String getSource() {
         return this.source;
     }
@@ -40,28 +40,30 @@
         return this.label;
     }
 
-    @Override
+//    @Override
     public String getTypeName() {
         return typeName;
     }
+
     @Override
     public String getDescription() {
-        I18nManager i18n = ToolsLocator.getI18nManager();
+//        I18nManager i18n = ToolsLocator.getI18nManager();
+//
+//        StringBuilder html = new StringBuilder();
+//        html.append("<html>\n");
+//
+//        html.append("<b>").append(this.getLabel()).append("</b><br>\n<br>\n");
+//        html.append("<b>").append(i18n.getTranslation("_Source")).append("</b> ").append(this.getSource()).append("<br>\n");
+//        html.append("<b>").append(i18n.getTranslation("_Name")).append("</b> ").append(this.getName()).append("<br>\n");
+//        html.append("<b>").append(i18n.getTranslation("_Type")).append("</b> ").append(this.getTypeName()).append("<br>\n");
+//        if( !StringUtils.isBlank(this.description) &&
+//                StringUtils.equalsAnyIgnoreCase(this.getName(), this.description) ) {
+//            html.append("<b>").append(i18n.getTranslation("_Description")).append("</b><br>\n");
+//            html.append(this.description.replace("\n", "<br>")).append("<br>\n");
+//        }
+//        html.append("</html>\n");
+//        return html.toString();
+        return null;
+    }
 
-        StringBuilder html = new StringBuilder();
-        html.append("<html>\n");
-
-        html.append("<b>").append(this.getLabel()).append("</b><br>\n<br>\n");
-        html.append("<b>").append(i18n.getTranslation("_Source")).append("</b> ").append(this.getSource()).append("<br>\n");
-        html.append("<b>").append(i18n.getTranslation("_Name")).append("</b> ").append(this.getName()).append("<br>\n");
-        html.append("<b>").append(i18n.getTranslation("_Type")).append("</b> ").append(this.getTypeName()).append("<br>\n");
-        if( !StringUtils.isBlank(this.description) &&
-                StringUtils.equalsAnyIgnoreCase(this.getName(), this.description) ) {
-            html.append("<b>").append(i18n.getTranslation("_Description")).append("</b><br>\n");
-            html.append(this.description.replace("\n", "<br>")).append("<br>\n");
-        }
-        html.append("</html>\n");
-        return html.toString();
-    }
-    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultConstantValueElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultConstantValueElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultConstantValueElement.java	(revision 44259)
@@ -5,6 +5,7 @@
  */
 package org.gvsig.expressionevaluator.swing.impl.elements;
 
+import java.util.Comparator;
 import java.util.Objects;
 import org.gvsig.expressionevaluator.swing.Element.ConstantElement;
 import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
@@ -12,6 +13,7 @@
 import org.gvsig.expressionevaluator.swing.spi.AbstractElement;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.i18n.I18nManager;
+import org.gvsig.tools.util.LabeledValue;
 
 /**
  *
@@ -21,21 +23,28 @@
         extends AbstractElement
         implements ConstantElement {
 
-    private final Object value;
-    private final ExpressionBuilderConfig config;
+    private final String label;
 
-    public DefaultConstantValueElement(ExpressionBuilderConfig config, Object value, String description) {
-        super(Objects.toString(value, ""), "expressionbuilder-element-constant");
-        this.value = value;
-        this.config = config;
+    public DefaultConstantValueElement(Object value, String label, String description) {
+        super(Objects.toString(value,""),  value, "expressionbuilder-element-constant");
+        if( label == null ) {
+            this.label = Objects.toString(value,"");
+        } else {
+            this.label = label;
+        }
     }
 
     @Override
-    public Object getValue() {
-        return value;
+    public String getLabel() {
+        return this.label;
     }
 
     @Override
+    public String getRenderedValue() {
+        return " "+Utils.repr(this.getValue())+" ";
+    }
+
+    @Override
     public String getDescription() {
         I18nManager i18n = ToolsLocator.getI18nManager();
 
@@ -54,4 +63,13 @@
         return html.toString();
     }
 
+    @Override
+    public int compareTo(Object other) {
+        if( !(other instanceof LabeledValue) ) {
+            return super.compareTo(other);
+        }
+        Comparator comparator = Utils.naturalComparator();
+        return comparator.compare(this.getValue(), ((LabeledValue)other).getValue());
+    }
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultGroupElement.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultGroupElement.java	(revision 44258)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/elements/DefaultGroupElement.java	(revision 44259)
@@ -11,7 +11,6 @@
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.swing.Element;
 import org.gvsig.expressionevaluator.swing.Element.GroupElement;
-import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
 import org.gvsig.expressionevaluator.swing.spi.AbstractElement;
 import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
 
@@ -25,19 +24,16 @@
     {
     
     final private List<Element> elements;
-    final private ExpressionBuilderConfig config;
     private ExpressionEvaluatorSwingManager manager;
 
-    public DefaultGroupElement(ExpressionEvaluatorSwingManager manager, ExpressionBuilderConfig config, String name, List<Element> elements) {
-        super(name, "expressionbuilder-element-group");
+    public DefaultGroupElement(ExpressionEvaluatorSwingManager manager, String name, List<Element> elements) {
+        super(name, name, "expressionbuilder-element-group");
         this.manager = manager;
         this.elements = elements;
-        this.config = config;
     }
 
-    public DefaultGroupElement(ExpressionBuilderConfig config, String name) {
-        super(name, "expressionbuilder-element-group");
-        this.config = config;
+    public DefaultGroupElement(String name) {
+        super(name, name, "expressionbuilder-element-group");
         this.elements = new ArrayList<>();
     }
 
@@ -68,7 +64,7 @@
 
     @Override
     public void addElement(Function function) {
-        Element item = this.manager.createConstantElement(this.config, function);
+        Element item = this.manager.createConstantElement(function, function.name());
         this.addElement(item);
     }
 
