Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.spi/src/main/java/org/gvsig/tools/dynform/spi/dynformset/AbstractJDynFormSet.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.spi/src/main/java/org/gvsig/tools/dynform/spi/dynformset/AbstractJDynFormSet.java	(revision 2038)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.spi/src/main/java/org/gvsig/tools/dynform/spi/dynformset/AbstractJDynFormSet.java	(revision 2039)
@@ -87,7 +87,7 @@
     }
 
     @Override
-    public void fireEvent(int eventid, Object value) {
+    public void fireEvent(String action, Object value) {
     }
      
     protected JDynFormSetFactory getFactory() {
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynformset/base/BaseJDynFormSet.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynformset/base/BaseJDynFormSet.java	(revision 2038)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynformset/base/BaseJDynFormSet.java	(revision 2039)
@@ -46,6 +46,16 @@
 import org.gvsig.tools.dynform.JDynForm.JDynFormListener;
 import org.gvsig.tools.dynform.JDynFormField;
 import org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.FormSetListener;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_CANCEL_NEW;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_CLOSE;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_DELETE;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_FIRST;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_LAST;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_NEW;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_NEXT;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_PREVIOUS;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_SAVE;
+import static org.gvsig.tools.dynform.services.dynformset.base.FormSetButtonBar.ID_ACTION_SEARCH;
 import org.gvsig.tools.dynform.spi.dynformset.AbstractJDynFormSet;
 import org.gvsig.tools.dynform.spi.dynformset.ActionStore;
 import org.gvsig.tools.dynform.spi.DynFormSPIManager;
@@ -164,13 +174,13 @@
 
         this.buttonBar = new FormSetButtonBar();
         this.buttonBar.addListener(this);
-        this.buttonBar.setActionActive(ACTION_DELETE, this.allowDelete());
-        this.buttonBar.setActionActive(ACTION_NEW, this.allowNew());
-        this.buttonBar.setActionActive(ACTION_CANCEL_NEW, this.allowNew());
-        this.buttonBar.setActionActive(ACTION_SAVE, this.allowUpdate());
-        this.buttonBar.setActionActive(ACTION_SEARCH, this.allowSearch());
-        this.buttonBar.setActionActive(ACTION_CLOSE, this.allowClose());
-        this.buttonBar.setVisible(ACTION_CANCEL_NEW, false);
+        this.buttonBar.setActionActive(ID_ACTION_DELETE, this.allowDelete());
+        this.buttonBar.setActionActive(ID_ACTION_NEW, this.allowNew());
+        this.buttonBar.setActionActive(ID_ACTION_CANCEL_NEW, this.allowNew());
+        this.buttonBar.setActionActive(ID_ACTION_SAVE, this.allowUpdate());
+        this.buttonBar.setActionActive(ID_ACTION_SEARCH, this.allowSearch());
+        this.buttonBar.setActionActive(ID_ACTION_CLOSE, this.allowClose());
+        this.buttonBar.setVisible(ID_ACTION_CANCEL_NEW, false);
         this.buttonBar.setReadOnly(this.isReadOnly());
         this.contents.add(this.form.asJComponent(), BorderLayout.CENTER);
         
@@ -189,7 +199,7 @@
     public void setAllowDelete(boolean allowDelete) {
         super.setAllowDelete(allowDelete);
         if( this.buttonBar!=null ) {
-            this.buttonBar.setActionActive(ACTION_DELETE, this.allowDelete());
+            this.buttonBar.setActionActive(ID_ACTION_DELETE, this.allowDelete());
         }
     }
 
@@ -197,7 +207,7 @@
     public void setAllowNew(boolean allowNew) {
         super.setAllowNew(allowNew);
         if( this.buttonBar!=null ) {
-            this.buttonBar.setActionActive(ACTION_NEW, this.allowNew());
+            this.buttonBar.setActionActive(ID_ACTION_NEW, this.allowNew());
         }
     }
     
@@ -205,17 +215,17 @@
         this.current = 0;
         if (this.values == null || this.values.isEmpty()) {
             this.form.setReadOnly(true);
-            this.getButtonBar().setEnabled(ACTION_DELETE, false);
-            this.getButtonBar().setEnabled(ACTION_SAVE, false);
-            this.getButtonBar().setEnabled(ACTION_NEW,
+            this.getButtonBar().setEnabled(ID_ACTION_DELETE, false);
+            this.getButtonBar().setEnabled(ID_ACTION_SAVE, false);
+            this.getButtonBar().setEnabled(ID_ACTION_NEW,
                     this.allowNew() && !this.isReadOnly());
             this.getButtonBar().setNumrecords(0);
             this.form.clear();
         } else {
             this.form.setValues((DynObject) this.values.get(this.current));
-            this.getButtonBar().setEnabled(ACTION_DELETE,
+            this.getButtonBar().setEnabled(ID_ACTION_DELETE,
                     this.allowDelete() && !this.isReadOnly());
-            this.getButtonBar().setEnabled(ACTION_SAVE,
+            this.getButtonBar().setEnabled(ID_ACTION_SAVE,
                     this.allowUpdate() && !this.isReadOnly());
             this.getButtonBar().setNumrecords(this.values.size());
         }
@@ -269,9 +279,9 @@
         this.form.setValues((DynObject) this.values.get(this.current));
         this.buttonBar.setCurrent(this.current);
         try {
-            this.getButtonBar().setEnabled(ACTION_DELETE,
+            this.getButtonBar().setEnabled(ID_ACTION_DELETE,
                     this.allowDelete() && !this.isReadOnly());
-            this.getButtonBar().setEnabled(ACTION_SAVE,
+            this.getButtonBar().setEnabled(ID_ACTION_SAVE,
                     this.allowUpdate() && !this.isReadOnly());
         } catch (Exception ex) {
             LOGGER.warn("Can't enable/disable delete and save buttons",ex);
@@ -466,17 +476,17 @@
             bar.setCurrentLabel(ToolsLocator.getI18nManager().getTranslation("nuevo"));
             bar.setNumrecords(this.countValues());
 
-            bar.setVisible(ACTION_CANCEL_NEW, true);
-            bar.setVisible(ACTION_NEW, false);
+            bar.setVisible(ID_ACTION_CANCEL_NEW, true);
+            bar.setVisible(ID_ACTION_NEW, false);
             
-            bar.setEnabled(ACTION_SAVE,true);
-            bar.setEnabled(ACTION_CANCEL_NEW,true);
-            bar.setEnabled(ACTION_DELETE,false);
-            bar.setEnabled(ACTION_FIRST,false);
-            bar.setEnabled(ACTION_NEXT,false);
-            bar.setEnabled(ACTION_PREVIOUS,false);
-            bar.setEnabled(ACTION_LAST,false);
-            bar.setEnabled(ACTION_SEARCH,false);
+            bar.setEnabled(ID_ACTION_SAVE,true);
+            bar.setEnabled(ID_ACTION_CANCEL_NEW,true);
+            bar.setEnabled(ID_ACTION_DELETE,false);
+            bar.setEnabled(ID_ACTION_FIRST,false);
+            bar.setEnabled(ID_ACTION_NEXT,false);
+            bar.setEnabled(ID_ACTION_PREVIOUS,false);
+            bar.setEnabled(ID_ACTION_LAST,false);
+            bar.setEnabled(ID_ACTION_SEARCH,false);
         } catch (Exception ex) {
             LOGGER.warn("Can't enable/disable delete and save buttons",ex);
         }
@@ -491,13 +501,13 @@
         try {
             FormSetButtonBar bar = this.getButtonBar();
 
-            bar.setVisible(ACTION_CANCEL_NEW, false);
-            bar.setVisible(ACTION_NEW, true);
+            bar.setVisible(ID_ACTION_CANCEL_NEW, false);
+            bar.setVisible(ID_ACTION_NEW, true);
             
-            bar.setEnabled(ACTION_SAVE,true);
-            bar.setEnabled(ACTION_NEW,true);
-            bar.setEnabled(ACTION_DELETE,true);
-            bar.setEnabled(ACTION_SEARCH,true);
+            bar.setEnabled(ID_ACTION_SAVE,true);
+            bar.setEnabled(ID_ACTION_NEW,true);
+            bar.setEnabled(ID_ACTION_DELETE,true);
+            bar.setEnabled(ID_ACTION_SEARCH,true);
 
             bar.setCurrentLabel(null);
             bar.setNumrecords(this.countValues());
@@ -685,8 +695,8 @@
     }
 
     @Override
-    public void fireEvent(int eventid, Object value) {
-        this.getButtonBar().fireEvent(eventid, value);
+    public void fireEvent(String action, Object value) {
+        this.getButtonBar().fireEvent(action, value);
     }
 
 }
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynformset/base/FormSetButtonBar.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynformset/base/FormSetButtonBar.java	(revision 2038)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynformset/base/FormSetButtonBar.java	(revision 2039)
@@ -54,10 +54,10 @@
 import static org.gvsig.tools.dynform.JDynFormSet.ACTION_CLOSE;
 import static org.gvsig.tools.dynform.JDynFormSet.ACTION_DELETE;
 import static org.gvsig.tools.dynform.JDynFormSet.ACTION_FIRST;
-import static org.gvsig.tools.dynform.JDynFormSet.ACTION_LAST;
 import static org.gvsig.tools.dynform.JDynFormSet.ACTION_NEW;
 import static org.gvsig.tools.dynform.JDynFormSet.ACTION_NEXT;
 import static org.gvsig.tools.dynform.JDynFormSet.ACTION_PREVIOUS;
+import static org.gvsig.tools.dynform.JDynFormSet.ACTION_LAST;
 import static org.gvsig.tools.dynform.JDynFormSet.ACTION_SAVE;
 import static org.gvsig.tools.dynform.JDynFormSet.ACTION_SEARCH;
 import static org.gvsig.tools.dynform.JDynFormSet.ACTION_SET_CURRENT_RECORD;
@@ -68,14 +68,23 @@
 
 public class FormSetButtonBar implements Component {
 
-    protected static final Logger logger = LoggerFactory
+    protected static final Logger LOGGER = LoggerFactory
             .getLogger(FormSetButtonBar.class);
 
+    public static final int ID_ACTION_FIRST = 1;
+    public static final int ID_ACTION_PREVIOUS = 2;
+    public static final int ID_ACTION_NEXT = 3;
+    public static final int ID_ACTION_LAST = 4;
+    public static final int ID_ACTION_SAVE = 5;
+    public static final int ID_ACTION_NEW = 6;
+    public static final int ID_ACTION_CANCEL_NEW = 7;
+    public static final int ID_ACTION_DELETE = 8;
+    public static final int ID_ACTION_SEARCH = 9;
+    public static final int ID_ACTION_CLOSE = 10;
+    public static final int ID_ACTION_SET_CURRENT_RECORD = 11;
 
     private static final int MAX_ACTIONS = 11;
 
-    public Boolean activatedActions[] = new Boolean[MAX_ACTIONS];
-
     private static final int COUNTER_HEIGHT = 50;
     private static final int COUNTER_WIDTH = 100;
 
@@ -112,18 +121,35 @@
 
     private JPanel othersButtons;
     private final List<Action> otherActions;
-    private final Map<String,JButton> otherButtons;
+    private final Map<String, JButton> otherButtons;
+    
+    private final Map<String,Integer> actionNameToId;
 
     private boolean readOnly = false;
 
     private JButton records;
     private final JButton buttons[] = new JButton[MAX_ACTIONS];
+    private final Boolean activatedActions[] = new Boolean[MAX_ACTIONS];
 
+
     public FormSetButtonBar() {
         // Activamos todas las acciones por defecto
         for (int i = 0; i < this.activatedActions.length; i++) {
             this.activatedActions[i] = true;
         }
+        this.actionNameToId = new HashMap();
+        this.actionNameToId.put(ACTION_FIRST, ID_ACTION_FIRST);
+        this.actionNameToId.put(ACTION_PREVIOUS, ID_ACTION_PREVIOUS);
+        this.actionNameToId.put(ACTION_NEXT, ID_ACTION_NEXT);
+        this.actionNameToId.put(ACTION_LAST, ID_ACTION_LAST);
+        this.actionNameToId.put(ACTION_SAVE, ID_ACTION_SAVE);
+        this.actionNameToId.put(ACTION_NEW, ID_ACTION_NEW);
+        this.actionNameToId.put(ACTION_CANCEL_NEW, ID_ACTION_CANCEL_NEW);
+        this.actionNameToId.put(ACTION_DELETE, ID_ACTION_DELETE);
+        this.actionNameToId.put(ACTION_SEARCH, ID_ACTION_SEARCH);
+        this.actionNameToId.put(ACTION_CLOSE, ID_ACTION_CLOSE);
+        this.actionNameToId.put(ACTION_SET_CURRENT_RECORD, ID_ACTION_SET_CURRENT_RECORD);
+
         this.listeners = new HashSet();
         this.otherActions = new ArrayList<>();
         this.otherButtons = new HashMap<>();
@@ -145,88 +171,98 @@
         this.listeners.remove(listener);
     }
 
-    public void fireEvent(int eventid, Object value) {
-        if (this.readOnly) {
-            Iterator it = this.listeners.iterator();
-            while (it.hasNext()) {
-                FormSetListener listener = (FormSetListener) it.next();
-                try {
-                    switch (eventid) {
-                        case ACTION_FIRST:
-                            listener.doActionFirst();
-                            break;
-                        case ACTION_PREVIOUS:
-                            listener.doActionPrevious();
-                            break;
-                        case ACTION_NEXT:
-                            listener.doActionNext();
-                            break;
-                        case ACTION_LAST:
-                            listener.doActionLast();
-                            break;
-                        case ACTION_SEARCH:
-                            listener.doActionSearch();
-                            break;
-                        case ACTION_CLOSE:
-                            listener.doActionClose();
-                            break;
-                        case ACTION_SET_CURRENT_RECORD:
-                            listener.doSetCurrentRecord(((Integer) value));
-                            break;
-                    }
-                } catch (Exception ex) {
-                    logger.info("Error calling listener " + listener.toString()
-                            + "(" + listener.getClass().getName() + ") from "
-                            + this.toString() + "(" + this.getClass().getName()
-                            + ").", ex);
-                }
+    public void fireEvent(String action, Object value) {
+        
+        Integer actionid = this.actionNameToId.get(action);
+        if( actionid==null ) {
+            JButton button = this.otherButtons.get(action);
+            if( button != null && button.getAction()!=null ) {
+                button.getAction().actionPerformed(new ActionEvent(value, 1, action));
             }
+            
         } else {
-            Iterator it = this.listeners.iterator();
-            while (it.hasNext()) {
-                FormSetListener listener = (FormSetListener) it.next();
-                try {
-                    switch (eventid) {
-                        case ACTION_FIRST:
-                            listener.doActionFirst();
-                            break;
-                        case ACTION_PREVIOUS:
-                            listener.doActionPrevious();
-                            break;
-                        case ACTION_NEXT:
-                            listener.doActionNext();
-                            break;
-                        case ACTION_LAST:
-                            listener.doActionLast();
-                            break;
-                        case ACTION_SAVE:
-                            listener.doActionSave();
-                            break;
-                        case ACTION_NEW:
-                            listener.doActionNew();
-                            break;
-                        case ACTION_CANCEL_NEW:
-                            listener.doActionCancelNew();
-                            break;
-                        case ACTION_DELETE:
-                            listener.doActionDelete();
-                            break;
-                        case ACTION_SEARCH:
-                            listener.doActionSearch();
-                            break;
-                        case ACTION_CLOSE:
-                            listener.doActionClose();
-                            break;
-                        case ACTION_SET_CURRENT_RECORD:
-                            listener.doSetCurrentRecord(((Integer) value));
-                            break;
+            if (this.readOnly) {
+                Iterator it = this.listeners.iterator();
+                while (it.hasNext()) {
+                    FormSetListener listener = (FormSetListener) it.next();
+                    try {
+                        switch (actionid) {
+                            case ID_ACTION_FIRST:
+                                listener.doActionFirst();
+                                break;
+                            case ID_ACTION_PREVIOUS:
+                                listener.doActionPrevious();
+                                break;
+                            case ID_ACTION_NEXT:
+                                listener.doActionNext();
+                                break;
+                            case ID_ACTION_LAST:
+                                listener.doActionLast();
+                                break;
+                            case ID_ACTION_SEARCH:
+                                listener.doActionSearch();
+                                break;
+                            case ID_ACTION_CLOSE:
+                                listener.doActionClose();
+                                break;
+                            case ID_ACTION_SET_CURRENT_RECORD:
+                                listener.doSetCurrentRecord(((Integer) value));
+                                break;
+                        }
+                    } catch (Exception ex) {
+                        LOGGER.info("Error calling listener " + listener.toString()
+                                + "(" + listener.getClass().getName() + ") from "
+                                + this.toString() + "(" + this.getClass().getName()
+                                + ").", ex);
                     }
-                } catch (Exception ex) {
-                    logger.info("Error calling listener " + listener.toString()
-                            + "(" + listener.getClass().getName() + ") from "
-                            + this.toString() + "(" + this.getClass().getName()
-                            + ").", ex);
                 }
+            } else {
+                Iterator it = this.listeners.iterator();
+                while (it.hasNext()) {
+                    FormSetListener listener = (FormSetListener) it.next();
+                    try {
+                        switch (actionid) {
+                            case ID_ACTION_FIRST:
+                                listener.doActionFirst();
+                                break;
+                            case ID_ACTION_PREVIOUS:
+                                listener.doActionPrevious();
+                                break;
+                            case ID_ACTION_NEXT:
+                                listener.doActionNext();
+                                break;
+                            case ID_ACTION_LAST:
+                                listener.doActionLast();
+                                break;
+                            case ID_ACTION_SAVE:
+                                listener.doActionSave();
+                                break;
+                            case ID_ACTION_NEW:
+                                listener.doActionNew();
+                                break;
+                            case ID_ACTION_CANCEL_NEW:
+                                listener.doActionCancelNew();
+                                break;
+                            case ID_ACTION_DELETE:
+                                listener.doActionDelete();
+                                break;
+                            case ID_ACTION_SEARCH:
+                                listener.doActionSearch();
+                                break;
+                            case ID_ACTION_CLOSE:
+                                listener.doActionClose();
+                                break;
+                            case ID_ACTION_SET_CURRENT_RECORD:
+                                listener.doSetCurrentRecord(((Integer) value));
+                                break;
+                        }
+                    } catch (Exception ex) {
+                        LOGGER.info("Error calling listener " + listener.toString()
+                                + "(" + listener.getClass().getName() + ") from "
+                                + this.toString() + "(" + this.getClass().getName()
+                                + ").", ex);
+                    }
+                }
             }
         }
     }
@@ -235,34 +271,34 @@
         setEnabled(ACTION_NEW, true);
         if (numrecords <= 0) {
             this.records.setText("0 / 0");
-            setEnabled(ACTION_FIRST, false);
-            setEnabled(ACTION_PREVIOUS, false);
-            setEnabled(ACTION_NEXT, false);
+            setEnabled(ID_ACTION_FIRST, false);
+            setEnabled(ID_ACTION_PREVIOUS, false);
+            setEnabled(ID_ACTION_NEXT, false);
             setEnabled(ACTION_LAST, false);
             return;
         }
-        if( this.currentLabel==null ) {
+        if (this.currentLabel == null) {
             this.records.setText((current + 1) + " / " + numrecords);
         } else {
             this.records.setText(this.currentLabel + " / " + numrecords);
         }
         if (current <= 0) {
             current = 0;
-            setEnabled(ACTION_FIRST, false);
-            setEnabled(ACTION_PREVIOUS, false);
-            setEnabled(ACTION_NEXT, true);
+            setEnabled(ID_ACTION_FIRST, false);
+            setEnabled(ID_ACTION_PREVIOUS, false);
+            setEnabled(ID_ACTION_NEXT, true);
             setEnabled(ACTION_LAST, true);
         } else if (current >= numrecords - 1) {
             current = numrecords - 1;
-            setEnabled(ACTION_NEXT, false);
+            setEnabled(ID_ACTION_NEXT, false);
             setEnabled(ACTION_LAST, false);
-            setEnabled(ACTION_FIRST, true);
-            setEnabled(ACTION_PREVIOUS, true);
+            setEnabled(ID_ACTION_FIRST, true);
+            setEnabled(ID_ACTION_PREVIOUS, true);
         } else {
-            setEnabled(ACTION_NEXT, true);
+            setEnabled(ID_ACTION_NEXT, true);
             setEnabled(ACTION_LAST, true);
-            setEnabled(ACTION_FIRST, true);
-            setEnabled(ACTION_PREVIOUS, true);
+            setEnabled(ID_ACTION_FIRST, true);
+            setEnabled(ID_ACTION_PREVIOUS, true);
         }
     }
 
@@ -290,7 +326,7 @@
         JPanel contents = new JPanel();
         contents.setLayout(new FlowLayout(FlowLayout.LEADING, 4, 4));
 
-        JComponent firstButton = createButton(i18nManager.getTranslation("_first"), "first.png", ACTION_FIRST, KeyEvent.CTRL_MASK+KeyEvent.VK_PAGE_UP);
+        JComponent firstButton = createButton(i18nManager.getTranslation("_first"), "first.png", ACTION_FIRST, KeyEvent.CTRL_MASK + KeyEvent.VK_PAGE_UP);
         contents.add(firstButton);
         contents.add(createButton(i18nManager.getTranslation("_back"), "previous.png", ACTION_PREVIOUS, KeyEvent.VK_PAGE_UP));
 
@@ -316,13 +352,13 @@
         contents.add(this.records);
 
         contents.add(createButton(i18nManager.getTranslation("_next"), "next.png", ACTION_NEXT, KeyEvent.VK_PAGE_DOWN));
-        contents.add(createButton(i18nManager.getTranslation("_last"), "last.png", ACTION_LAST, KeyEvent.CTRL_MASK+KeyEvent.VK_PAGE_DOWN));
+        contents.add(createButton(i18nManager.getTranslation("_last"), "last.png", ACTION_LAST, KeyEvent.CTRL_MASK + KeyEvent.VK_PAGE_DOWN));
 
-        contents.add(createButton(i18nManager.getTranslation("guardar"), "save.png", ACTION_SAVE, KeyEvent.CTRL_MASK+KeyEvent.VK_S));
+        contents.add(createButton(i18nManager.getTranslation("guardar"), "save.png", ACTION_SAVE, KeyEvent.CTRL_MASK + KeyEvent.VK_S));
         contents.add(createButton(i18nManager.getTranslation("nuevo"), "new.png", ACTION_NEW, KeyEvent.VK_F6));
         contents.add(createButton(i18nManager.getTranslation("cancelar nuevo"), "cancelnew.png", ACTION_CANCEL_NEW, KeyEvent.VK_F12));
-        contents.add(createButton(i18nManager.getTranslation("borrar"), "delete.png", ACTION_DELETE, KeyEvent.SHIFT_MASK+KeyEvent.VK_F2));
-        contents.add(createButton(i18nManager.getTranslation("search"), "search.png", ACTION_SEARCH, KeyEvent.CTRL_MASK+KeyEvent.VK_F));
+        contents.add(createButton(i18nManager.getTranslation("borrar"), "delete.png", ACTION_DELETE, KeyEvent.SHIFT_MASK + KeyEvent.VK_F2));
+        contents.add(createButton(i18nManager.getTranslation("search"), "search.png", ACTION_SEARCH, KeyEvent.CTRL_MASK + KeyEvent.VK_F));
 
         return contents;
     }
@@ -354,19 +390,20 @@
     }
 
     private void initButtons() {
-        setActionActive(ACTION_SAVE, isActionActive(ACTION_SAVE));
-        setActionActive(ACTION_NEW, isActionActive(ACTION_NEW));
-        setActionActive(ACTION_SEARCH, isActionActive(ACTION_SEARCH));
-        setActionActive(ACTION_DELETE, isActionActive(ACTION_DELETE));
-        setActionActive(ACTION_CLOSE, isActionActive(ACTION_CLOSE));
+        setActionActive(ID_ACTION_SAVE, isActionActive(ID_ACTION_SAVE));
+        setActionActive(ID_ACTION_NEW, isActionActive(ID_ACTION_NEW));
+        setActionActive(ID_ACTION_SEARCH, isActionActive(ID_ACTION_SEARCH));
+        setActionActive(ID_ACTION_DELETE, isActionActive(ID_ACTION_DELETE));
+        setActionActive(ID_ACTION_CLOSE, isActionActive(ID_ACTION_CLOSE));
     }
 
-    private JComponent createButton(final String tip, final String image, final int action, int mnemonic) {
-
+    private JComponent createButton(final String tip, final String image, final String action, int mnemonic) {
+        int actionid = this.actionNameToId.get(action);
+        
         URL url = this.getClass().getClassLoader().getResource("org/gvsig/tools/dynform/impl/" + image);
         Icon icon = new ImageIcon(url);
         JButton button = new JButton(icon);
-        if( mnemonic!=KeyEvent.VK_UNDEFINED ) {
+        if (mnemonic != KeyEvent.VK_UNDEFINED) {
             button.setMnemonic(mnemonic);
         }
         button.setBorder(BorderFactory.createEmptyBorder());
@@ -382,7 +419,7 @@
                 fireEvent(action, null);
             }
         });
-        this.buttons[action] = button;
+        this.buttons[actionid] = button;
         return button;
     }
 
@@ -405,42 +442,64 @@
     }
 
     public void setVisible(String id, boolean visible) {
+        Integer x = this.actionNameToId.get(id);
+        if( x!=null ) {
+            this.buttons[x].setVisible(visible);
+            return;
+        }
         JButton button = this.otherButtons.get(id);
-        if( button == null ) {
+        if (button == null) {
             return;
         }
         button.setVisible(visible);
     }
-    
+
     public void setEnabled(String id, boolean enabled) {
+        Integer x = this.actionNameToId.get(id);
+        if( x!=null ) { // Ojo, si quito el intValue a veces falla
+            this.buttons[x.intValue()].setEnabled(enabled);
+            return;
+        }
         JButton button = this.otherButtons.get(id);
-        if( button == null ) {
+        if (button == null) {
             return;
         }
         button.setEnabled(enabled);
     }
-    
+
     public boolean isEnabled(String id) {
+        Integer x = this.actionNameToId.get(id);
+        if( x!=null ) {
+            return this.buttons[x].isEnabled();
+        }
         JButton button = this.otherButtons.get(id);
-        if( button == null ) {
-            throw new IllegalArgumentException("Don't exists action '"+id+"'.");
+        if (button == null) {
+            throw new IllegalArgumentException("Don't exists action '" + id + "'.");
         }
         return button.isEnabled();
     }
-    
+
     public JComponent getActionButton(String id) {
+        Integer x = this.actionNameToId.get(id);
+        if( x!=null ) {
+            return this.buttons[x];
+        }
         JButton button = this.otherButtons.get(id);
         return button;
     }
-    
+
     public boolean isVisible(String id) {
+        Integer x = this.actionNameToId.get(id);
+        if( x!=null ) {
+            return this.buttons[x].isVisible();
+        }
         JButton button = this.otherButtons.get(id);
-        if( button == null ) {
-            throw new IllegalArgumentException("Don't exists action '"+id+"'.");
+        if (button == null) {
+            throw new IllegalArgumentException("Don't exists action '" + id + "'.");
         }
         return button.isVisible();
     }
-    
+
     public void setCurrent(int current) {
         this.current = current;
         updateRecords();
@@ -457,9 +516,9 @@
     }
 
     public void setActionActive(int action, boolean active) {
-        if (action == ACTION_SAVE || action == ACTION_DELETE
-                || action == ACTION_NEW || action == ACTION_SEARCH
-                || action == ACTION_CLOSE) {
+        if (action == ID_ACTION_SAVE || action == ID_ACTION_DELETE
+                || action == ID_ACTION_NEW || action == ID_ACTION_SEARCH
+                || action == ID_ACTION_CLOSE) {
             if (this.contents == null) {
                 this.initComponents();
             }
@@ -474,14 +533,14 @@
 
     public void setReadOnly(boolean readOnly) {
         this.readOnly = readOnly;
-        
-        this.setEnabled(ACTION_SAVE, !readOnly);
+
+        this.setEnabled(ID_ACTION_SAVE, !readOnly);
         this.setEnabled(ACTION_NEW, !readOnly);
-        this.setEnabled(ACTION_CANCEL_NEW, !readOnly);
+        this.setEnabled(ID_ACTION_CANCEL_NEW, !readOnly);
         this.setEnabled(ACTION_DELETE, !readOnly);
-        this.setEnabled(ACTION_SEARCH, true);
+        this.setEnabled(ID_ACTION_SEARCH, true);
         this.setEnabled(ACTION_CLOSE, true);
-        
+
         updateRecords();
     }
 
@@ -497,7 +556,7 @@
         button.setContentAreaFilled(false);
         button.setCursor(new Cursor(Cursor.HAND_CURSOR));
         String id = Objects.toString(action.getValue(Action.ACTION_COMMAND_KEY), null);
-        if( !StringUtils.isEmpty(id) ) {
+        if (!StringUtils.isEmpty(id)) {
             this.otherButtons.put(id, button);
         }
         this.othersButtons.add(button);
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynform/AbeilleJDynForm.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynform/AbeilleJDynForm.java	(revision 2038)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynform/AbeilleJDynForm.java	(revision 2039)
@@ -24,6 +24,7 @@
 import java.awt.event.ActionListener;
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import javax.swing.JButton;
 import javax.swing.JLabel;
@@ -352,6 +353,34 @@
         return form;
     }
     
+    public Iterator getFieldsIterator() {
+        if (!this.isContentsInitialized()) {
+            this.initComponents();
+        }
+        return this.components.values().iterator();
+    }
+
+    @Override
+    public void setReadOnly(boolean readOnly) {
+        if( this.isReadOnly() == readOnly ) {
+            return;
+        }
+        super.setReadOnly(readOnly);
+        if (this.isContentsInitialized()) {
+            Iterator it = this.getFieldsIterator();
+            while (it.hasNext()) {
+                JDynFormField field = (JDynFormField) it.next();
+                if( readOnly ) {
+                    field.setReadOnly(true);
+                } else if( field.getDefinition().isReadOnly() ) {
+                    field.setReadOnly(true);
+                } else {
+                    field.setReadOnly(false);
+                }
+            }
+        }
+    }
+
     private void bindUserCode(FormPanel form) {
         Script theScript = this.getScript();
         if( theScript==null ) {
@@ -486,7 +515,9 @@
             return false;
         }
         try {
-            return (boolean) this.callUserFunction(USERCODE_FORM_ISMODIFIED, this, values);
+            if( this.getScript()!=null ) {
+                return (boolean) this.callUserFunction(USERCODE_FORM_ISMODIFIED, this, values);
+            }
         } catch (NoSuchMethodException ex) {
         } catch (Exception ex) {
             LOGGER.warn("Error calling user function form_IsModified.",ex);
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.api/src/main/java/org/gvsig/tools/dynform/JDynFormSet.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.api/src/main/java/org/gvsig/tools/dynform/JDynFormSet.java	(revision 2038)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.api/src/main/java/org/gvsig/tools/dynform/JDynFormSet.java	(revision 2039)
@@ -35,17 +35,17 @@
 
 public interface JDynFormSet  extends Component {
 
-        public static final int ACTION_FIRST = 1;
-        public static final int ACTION_PREVIOUS = 2;
-        public static final int ACTION_NEXT = 3;
-        public static final int ACTION_LAST = 4;
-        public static final int ACTION_SAVE = 5;
-        public static final int ACTION_NEW = 6;
-        public static final int ACTION_CANCEL_NEW = 7;
-        public static final int ACTION_DELETE = 8;
-        public static final int ACTION_SEARCH = 9;
-        public static final int ACTION_CLOSE = 10;
-        public static final int ACTION_SET_CURRENT_RECORD = 11;
+        public static final String ACTION_FIRST = "first";
+        public static final String ACTION_PREVIOUS = "previous";
+        public static final String ACTION_NEXT = "next";
+        public static final String ACTION_LAST = "last";
+        public static final String ACTION_SAVE = "save";
+        public static final String ACTION_NEW = "new";
+        public static final String ACTION_CANCEL_NEW = "cancel-new";
+        public static final String ACTION_DELETE = "delete";
+        public static final String ACTION_SEARCH = "search";
+        public static final String ACTION_CLOSE = "close";
+        public static final String ACTION_SET_CURRENT_RECORD = "set-current-record";
 
 	public interface JDynFormSetListener {
 		public void formMessage(String message);
@@ -114,7 +114,7 @@
         public boolean isActionVisible(String action);
         public boolean isActionEnabled(String action);
         public JComponent getActionButton(String action);
-        public void fireEvent(int eventid, Object value);
+        public void fireEvent(String action, Object value);
         
 	public void addActionToPopupMenu(DataType tipo, String name, Action action);
 	public void addSeparatorToPopupMenu(DataType tipo);
