Comments (5)
khammond25 (migrated from Bugzilla):
*** #759 has been marked as a duplicate of this bug. ***
from jmeter.
khammond25 (migrated from Bugzilla):
Created attachment patch.ArgumentsPanel.diff: Patch for ArgumentsPanel.java; file contains the diff
patch.ArgumentsPanel.diff
--- \jakarta-jmeter-cvs\jakarta-jmeter\src\org\apache\jmeter\config\gui\ArgumentsPanel.java Thu Jul 26 00:34:44 2001
+++ \jakarta-jmeter-nightly\2001.09.15\jakarta-jmeter\src\org\apache\jmeter\config\gui\ArgumentsPanel.java Thu Sep 20 13:32:52 2001
@@ -117,9 +117,14 @@
***********************************************************/
public void keyReleased(KeyEvent e)
{
- tableModel.setValueAt(table.getValueAt(table.getSelectedRow(), table.getSelectedColumn()),
- table.getSelectedRow(), table.getSelectedColumn());
- this.repaint();
+ /* Note sure why we have code here, so I commented it out. Seems to work fine. [khammond]
+ if (tableModel.getRowCount() > 0)
+ {
+ tableModel.setValueAt(table.getValueAt(table.getSelectedRow(), table.getSelectedColumn()),
+ table.getSelectedRow(), table.getSelectedColumn());
+ this.repaint();
+ }
+ */
}
/************************************************************
@@ -148,15 +153,67 @@
public void actionPerformed(ActionEvent e)
{
String action = e.getActionCommand();
+
if(action.equals("Delete"))
{
- tableModel.removeRow(table.getSelectedRow());
- tableModel.fireTableDataChanged();
+ if (tableModel.getRowCount() > 0)
+ {
+ // If a table cell is being edited, we must cancel the editing before
+ // deleting the row
+ if (table.isEditing())
+ {
+ TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
+ cellEditor.cancelCellEditing();
+ }
+
+ int rowSelected = table.getSelectedRow();
+
+ tableModel.removeRow(rowSelected);
+ tableModel.fireTableDataChanged();
+
+ // Disable the DELETE button if no rows remaining after delete
+ if (tableModel.getRowCount() == 0)
+ {
+ delete.setEnabled(false);
+ }
+
+ // Table still contains one or more rows, so highlight (select)
+ // the appropriate one.
+ else
+ {
+ int rowToSelect = rowSelected;
+
+ if (rowSelected >= tableModel.getRowCount())
+ {
+ rowToSelect = rowSelected - 1;
+ }
+
+ table.setRowSelectionInterval(rowToSelect, rowToSelect);
+ }
+ }
}
else if(action.equals("Add"))
{
+ // If a table cell is being edited, we should accept the current value
+ // and stop the editing before adding a new row.
+ if (table.isEditing())
+ {
+ TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
+ cellEditor.stopCellEditing();
+ }
+
tableModel.addNewRow();
tableModel.fireTableDataChanged();
+
+ // Enabled the DELETE button if it is currently disabled.
+ if (!delete.isEnabled())
+ {
+ delete.setEnabled(true);
+ }
+
+ // Highlight (select) the appropriate row.
+ int rowToSelect = tableModel.getRowCount() - 1;
+ table.setRowSelectionInterval(rowToSelect, rowToSelect);
}
}
@@ -178,13 +235,22 @@
scroller.setColumnHeaderView(table.getTableHeader());
this.add(scroller);
+
+ // ADD button
add = new JButton(JMeterUtils.getResString("add"));
+ add.setMnemonic('A');
add.setActionCommand("Add");
+ add.addActionListener(this);
+
+ // DELETE button
delete = new JButton(JMeterUtils.getResString("delete"));
+ delete.setEnabled(false); // disabled by default
+ delete.setMnemonic('D');
delete.setActionCommand("Delete");
- JPanel buttonPanel = new JPanel();
- add.addActionListener(this);
delete.addActionListener(this);
+
+ // Button Panel
+ JPanel buttonPanel = new JPanel();
buttonPanel.add(add);
buttonPanel.add(delete);
this.add(buttonPanel);
@@ -322,5 +388,4 @@
}
}
}
-
}
from jmeter.
khammond25 (migrated from Bugzilla):
The attachment contain a fix for this bug and a fix for #767. It also
contains the following new functionality:
- ADD and DELETE buttons behave more user-friendly. They now select a row
after the button is pressed. - ADD and DELETE buttons now have mnemonics. After creating the first row, you
can add/edit the remaining rows using just your keyboard (never have to move
your mouse pointer to the next row and click). - The DELETE button is set to disabled (grayed out) when there are no rows in
the table.
from jmeter.
Jordi Salvat i Alabart (migrated from Bugzilla):
Marking all bugs RESOLVED before JMeter 1.8's release date as VERIFIED.
Yes, it's pretty poor QA procedure, but there's bugs here lingering since JMeter
1.6, and we need to clean up a little.
from jmeter.
Jordi Salvat i Alabart (migrated from Bugzilla):
Bulk-closing all bugs RESOLVED before JMeter 1.8 release date.
from jmeter.
Related Issues (20)
- 90th percentile response time is showing incorrect in HTML report
- First HTTP request in Thread Group has twice latency than other HTTP request HOT 2
- Bug: The name of a property of the AssertionGui control node is misspelled. HOT 1
- Not able to run jmeter in ubuntu. HOT 1
- ThreadGroup line 273 cloneTree(threadGroupTree),I have setted CSVDataSet with filename,but after cloneTree,my filename was lost HOT 1
- Support HTTPS / TLS to send metrics to influxdb
- Kotlin DSL
- Please implement ScriptingTestElementSchema with 'filename' and 'script' support for Kotlin DSL
- TransactionController (in genearteParentSample=false mode) is not recorded if last sampler in it was com.blazemeter.jmeter.controller.ParallelSampler
- Start on a Controller or Sampler
- Java Implementation not sending `Authorization` and `Host` header HOT 1
- Jmeter starts the server remotely, and the client gets stuck
- When in low memory, threads become almost sequential and many errors occur HOT 1
- Connections reuse issue HOT 2
- Suspected memory leak HOT 3
- Ignore space in path of JMeter HOT 1
- GRPC mTLS request: Problem with client certificates being returned empty
- Headers not send on http CONNECT method
- Why does this setting exist? proxy.headers.remove (Cookie and Authorization are always removed)
- JMeter + Docker HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmeter.