Index: FeatureTypeEditingPanel.java
===================================================================
--- FeatureTypeEditingPanel.java	(revision 42532)
+++ FeatureTypeEditingPanel.java	(revision 42533)
@@ -52,12 +52,15 @@
 import org.gvsig.andami.ui.mdiManager.IWindow;
 import org.gvsig.andami.ui.mdiManager.WindowInfo;
 import org.gvsig.app.project.documents.table.TableOperations;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
 import org.gvsig.fmap.dal.DataTypes;
 import org.gvsig.fmap.dal.exception.DataException;
 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.FeatureStore;
+import org.gvsig.fmap.dal.feature.FeatureStoreProviderFactory;
 import org.gvsig.i18n.Messages;
 import org.gvsig.tools.swing.api.ToolsSwingLocator;
 import org.slf4j.Logger;
@@ -65,9 +68,9 @@
 
 /**
  * To modify FeatureTypes from the interface.
- * 
+ *
  * @author Vicente Caballero Navarro
- * 
+ *
  */
 public class FeatureTypeEditingPanel extends JPanel implements IWindow {
 
@@ -106,7 +109,7 @@
     private class MyTableModel extends AbstractTableModel {
 
         /**
-		 * 
+		 *
 		 */
         private static final long serialVersionUID = -2847526298987536118L;
 
@@ -216,9 +219,9 @@
 
     /**
      * This method initializes
-     * 
+     *
      * @throws DataException
-     * 
+     *
      */
     public FeatureTypeEditingPanel(FeatureStore fs) throws DataException {
         super();
@@ -245,7 +248,7 @@
 
     /**
      * This method initializes this
-     * 
+     *
      */
     private void initialize() {
         FlowLayout flowLayout = new FlowLayout();
@@ -327,7 +330,7 @@
 
     /**
      * This method initializes jScrollPane
-     * 
+     *
      * @return javax.swing.JScrollPane
      */
     private JScrollPane getJScrollPane() {
@@ -341,7 +344,7 @@
 
     /**
      * This method initializes jTableFields
-     * 
+     *
      * @return javax.swing.JTable
      */
     private JTable getJTableFields() {
@@ -383,7 +386,7 @@
 
     /**
      * This method initializes jBtnNewField
-     * 
+     *
      * @return javax.swing.JButton
      */
     private JButton getJBtnNewField() {
@@ -411,6 +414,11 @@
 
                 public void actionPerformed(java.awt.event.ActionEvent e) {
                     ActionListener okAction;
+                    DataManager dataManager = DALLocator.getDataManager();
+                    FeatureStoreProviderFactory factory =
+                            (FeatureStoreProviderFactory) dataManager.
+                            getStoreProviderFactory(featureStore.getProviderName());
+                    panelNewField.setMaxAttributeNameSize(factory.getMaxAttributeNameSize());
                     okAction = new java.awt.event.ActionListener() {
 
                         public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -456,7 +464,7 @@
 
     /**
      * This method initializes jButton
-     * 
+     *
      * @return javax.swing.JButton
      */
     private JButton getJBtnDelete() {
@@ -475,7 +483,7 @@
                         for (int i = selecteds.length - 1; i >= 0; i--) {
                             String fieldName =
                                 (String) tm.getValueAt(selecteds[i], 0);
-                            
+
                             String old_geom_fld = editableType.getDefaultGeometryAttributeName();
                             if (old_geom_fld.compareTo(fieldName) == 0) {
                                 JOptionPane.showMessageDialog(
@@ -498,7 +506,7 @@
 
     /**
      * This method initializes jBtnRenameField
-     * 
+     *
      * @return javax.swing.JButton
      */
     private JButton getJBtnRenameField() {
@@ -517,7 +525,7 @@
                         for (int i = selecteds.length - 1; i >= 0; i--) {
                             String fieldName =
                                 (String) tm.getValueAt(selecteds[i], 0);
-                            
+
                             String old_geom_fld = editableType.getDefaultGeometryAttributeName();
                             /*
                              * old_geom_fld is null if we are dealing with
@@ -541,7 +549,7 @@
                             if (newName == null) {
                                 continue;
                             }
-                            
+
                             if (newName.length() == 0)  {
                                 JOptionPane.showMessageDialog(
                                         jTableFields,
@@ -550,20 +558,20 @@
                                         JOptionPane.ERROR_MESSAGE);
                                 continue;
                             }
-                            
+
                             if (editableType.getIndex(newName) != -1) {
                                 NotificationManager.showMessageInfo(
                                     PluginServices.getText(this,
                                         "field_already_exists"), null);
                                 continue;
                             }
-                            
+
                             try {
                                 EditableFeatureAttributeDescriptor efad =
                                     (EditableFeatureAttributeDescriptor)
                                     editableType.getAttributeDescriptor(fieldName);
                                 efad.setName(newName);
-                                
+
                             } catch (Exception de) {
                                 JOptionPane.showMessageDialog(
                                     jTableFields,
@@ -582,7 +590,7 @@
 
     /**
      * This method initializes jBtnOK
-     * 
+     *
      * @return javax.swing.JButton
      */
     private JButton getJBtnOK() {
@@ -609,7 +617,7 @@
 
     /**
      * This method initializes jButton
-     * 
+     *
      * @return javax.swing.JButton
      */
     private JButton getJBtnCancel() {
@@ -631,7 +639,7 @@
 
     /**
      * This method initializes jPanelButtons
-     * 
+     *
      * @return javax.swing.JPanel
      */
     private JPanel getJPanelButtons() {
