[ 1874263 ] button doesn't work in grid mode
This commit is contained in:
parent
171ff34dfd
commit
3c0bb8985a
|
@ -535,9 +535,7 @@ public class GridController extends CPanel
|
||||||
// Enable Button actions in grid
|
// Enable Button actions in grid
|
||||||
if (mField.getDisplayType () == DisplayType.Button)
|
if (mField.getDisplayType () == DisplayType.Button)
|
||||||
{
|
{
|
||||||
VEditor button = ce.getEditor ();
|
ce.setActionListener(aPanel);
|
||||||
if (button != null && aPanel != null)
|
|
||||||
((JButton)button).addActionListener (aPanel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // column not displayed
|
else // column not displayed
|
||||||
|
|
|
@ -24,6 +24,7 @@ import javax.swing.*;
|
||||||
import javax.swing.table.*;
|
import javax.swing.table.*;
|
||||||
|
|
||||||
import org.adempiere.plaf.AdempierePLAF;
|
import org.adempiere.plaf.AdempierePLAF;
|
||||||
|
import org.compiere.apps.APanel;
|
||||||
import org.compiere.model.*;
|
import org.compiere.model.*;
|
||||||
import org.compiere.util.*;
|
import org.compiere.util.*;
|
||||||
|
|
||||||
|
@ -60,6 +61,8 @@ public final class VCellEditor extends AbstractCellEditor
|
||||||
private VEditor m_editor = null;
|
private VEditor m_editor = null;
|
||||||
/** Table */
|
/** Table */
|
||||||
private JTable m_table = null;
|
private JTable m_table = null;
|
||||||
|
private ActionListener buttonListener;
|
||||||
|
private ActionListener actionListener;
|
||||||
/** ClickCount */
|
/** ClickCount */
|
||||||
private static int CLICK_TO_START = 1;
|
private static int CLICK_TO_START = 1;
|
||||||
/** Logger */
|
/** Logger */
|
||||||
|
@ -203,7 +206,8 @@ public final class VCellEditor extends AbstractCellEditor
|
||||||
public void actionPerformed (ActionEvent e)
|
public void actionPerformed (ActionEvent e)
|
||||||
{
|
{
|
||||||
log.finer(m_mField.getColumnName() + ": Value=" + m_editor.getValue());
|
log.finer(m_mField.getColumnName() + ": Value=" + m_editor.getValue());
|
||||||
// super.stopCellEditing(); // causes VLookup.Search Text not to work
|
if (e.getSource() == m_editor && actionListener != null)
|
||||||
|
actionListener.actionPerformed(e);
|
||||||
} // actionPerformed
|
} // actionPerformed
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -236,4 +240,7 @@ public final class VCellEditor extends AbstractCellEditor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setActionListener(ActionListener listener) {
|
||||||
|
actionListener = listener;
|
||||||
|
}
|
||||||
} // VCellEditor
|
} // VCellEditor
|
||||||
|
|
Loading…
Reference in New Issue