Index: CreateNewAttributePanel.java
===================================================================
--- CreateNewAttributePanel.java	(revision 43988)
+++ CreateNewAttributePanel.java	(revision 43989)
@@ -27,7 +27,6 @@
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.GridLayout;
-import java.awt.LayoutManager;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
@@ -49,11 +48,17 @@
 import org.gvsig.andami.ui.mdiManager.WindowInfo;
 import org.gvsig.app.ApplicationLocator;
 import org.gvsig.app.ApplicationManager;
+import org.gvsig.expressionevaluator.swing.Element;
+import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator;
+import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
+import org.gvsig.expressionevaluator.swing.ExpressionPickerController;
+import org.gvsig.fmap.dal.DALLocator;
 import org.gvsig.fmap.dal.DataTypes;
+import org.gvsig.fmap.dal.expressionevaluator.FeatureAttributeEmulatorExpression;
 import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor;
 import org.gvsig.fmap.dal.feature.EditableFeatureType;
-import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
-import org.gvsig.fmap.dal.feature.FeatureAttributeEmulator;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.dal.swing.DataSwingManager;
 import org.gvsig.gui.beans.AcceptCancelPanel;
 import org.gvsig.i18n.Messages;
 import org.gvsig.tools.ToolsLocator;
@@ -120,28 +125,36 @@
         }
     };
     private String[] currentFieldNames;
+    private ExpressionPickerController expressionPicker;
+    private FeatureStore store;
 
-    public CreateNewAttributePanel() {
+//    public CreateNewAttributePanel() {
+//        super();
+//        initialize();
+//    }
+
+    public CreateNewAttributePanel(FeatureStore store) {
         super();
+        this.store = store;
         initialize();
     }
 
-    public CreateNewAttributePanel(boolean isDoubleBuffered) {
-        super(isDoubleBuffered);
-        initialize();
-    }
+//    public CreateNewAttributePanel(boolean isDoubleBuffered) {
+//        super(isDoubleBuffered);
+//        initialize();
+//    }
+//
+//    public CreateNewAttributePanel(LayoutManager layout) {
+//        super(layout);
+//        initialize();
+//    }
+//
+//    public CreateNewAttributePanel(LayoutManager layout,
+//        boolean isDoubleBuffered) {
+//        super(layout, isDoubleBuffered);
+//        initialize();
+//    }
 
-    public CreateNewAttributePanel(LayoutManager layout) {
-        super(layout);
-        initialize();
-    }
-
-    public CreateNewAttributePanel(LayoutManager layout,
-        boolean isDoubleBuffered) {
-        super(layout, isDoubleBuffered);
-        initialize();
-    }
-
     public WindowInfo getWindowInfo() {
         if (viewInfo == null) {
             viewInfo = new WindowInfo(WindowInfo.MODALDIALOG);
@@ -164,6 +177,20 @@
         this.setPreferredSize(new java.awt.Dimension(300, 310));
         this.add(getJPanel(), java.awt.BorderLayout.CENTER);
         this.add(getJPanelOkCancel(), java.awt.BorderLayout.SOUTH);
+        
+        jBtnExpression.setText("");        
+        ExpressionEvaluatorSwingManager manager = ExpressionEvaluatorSwingLocator.getManager();
+        this.expressionPicker = manager.createExpressionPickerController(jTxtExpression, jBtnExpression);
+        if( this.store != null ) {
+            Element element = manager.createElement(
+                    DataSwingManager.FEATURE_STORE_EXPRESSION_ELEMENT, 
+                    this.expressionPicker, 
+                    this.store
+            );
+            if( element != null ) {
+                this.expressionPicker.getElements().add(element);
+            }
+        }
     }
 
     /**
@@ -336,11 +363,10 @@
         }
         EditableFeatureAttributeDescriptor ead = null;
         if (getJRdbFieldVirtual().isSelected()) {
-            String code = getJTxtExpression().getText();
-            EmulatedFieldExpression myEmulated = 
-                    new EmulatedFieldExpression(
-                            featureType,
-                            code);
+            FeatureAttributeEmulatorExpression myEmulated = DALLocator.getDataManager().createFeatureAttributeEmulatorExpression(
+                    featureType, 
+                    this.expressionPicker.get()
+            );
             if (!myEmulated.isValid()) {
                 I18nManager i18n = ToolsLocator.getI18nManager();
                 ApplicationManager application = ApplicationLocator.getManager();
