Bug 58742 - TableEditor duplicates content from an element with filled table to an element with an empty one
Summary: TableEditor duplicates content from an element with filled table to an elemen...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords: PatchAvailable
Depends on:
Blocks: 58743
  Show dependency tree
 
Reported: 2015-12-16 16:23 UTC by Vincent HERILIER
Modified: 2016-01-14 08:24 UTC (History)
1 user (show)



Attachments
Test suite showing the content duplication between 2 TableEditor widgets from 2 different elements (2.71 KB, application/xml)
2015-12-18 08:47 UTC, Vincent HERILIER
Details
implement ClearGui interface (1.73 KB, patch)
2016-01-03 17:12 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent HERILIER 2015-12-16 16:23:10 UTC
Hi,

Using 2 elements of the same kind with a TableEditor (i.e.: AssertionCompare), one with a table containing a row, the other one with an empty table, if I switch from the first one to the second, it fills the empty table with the same content than the first table.

Clearing the related model "this.model.clearData();" from the related setAsText() method solves the issue, but I'm not sure it is a good place to do that.
NB: The method is invoked by clearGuiFields() in GenericTestBeanCustomizer class to clear up data in GUI...

I hope you'll find a better way to avoid this issue. 

Thanks
Comment 1 Vincent HERILIER 2015-12-18 08:47:52 UTC
Created attachment 33360 [details]
Test suite showing the content duplication between 2 TableEditor widgets from 2 different elements

The testplan is composed from a Thread Group with 2 Compare Assertion elements.
The first one has is TableEditor widget empty, the second has a row inserted.
Going from the first assertion to the second, then going back to the first one inserts the content of the TableEditor widget of the second assertion element into the TableEditor widget of the first one.
To reproduce again the issue, only removing the content from the TableEditor widget of the first of the second assertion element, then switching between them will show the issue again
Comment 2 Vincent HERILIER 2015-12-18 08:50:26 UTC
Beware : loading the test case will produce the loading issue described in bug 58742
Comment 3 Felix Schumacher 2016-01-03 17:12:57 UTC
Created attachment 33397 [details]
implement ClearGui interface

setAsText would be a good place, but to make it clearer, that we want to clear our model for the gui, I think it is better to implement ClearGui as done in this patch.
Comment 4 Vincent HERILIER 2016-01-04 10:38:02 UTC
Hi Felix,

Firstly Happy New Year to you and your team.

So I applied your patch and it works well.
I hope you'll update native TableEditor as well.

Thank you

Vincent
Comment 5 Philippe Mouawad 2016-01-12 21:05:52 UTC
Hi Felix,
Can the patch be commited ?
Thanks
Comment 6 Felix Schumacher 2016-01-13 20:35:43 UTC
Date: Wed Jan 13 20:31:47 2016
New Revision: 1724506

URL: http://svn.apache.org/viewvc?rev=1724506&view=rev
Log:
Reset data in TableEditor when switching between different CompareAssertions in gui.
Based on a patch by Vincent Herilier (vherilier at gmail.com).

Bugzilla Id: 58742

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java
    jmeter/trunk/xdocs/changes.xml
Comment 7 Vincent HERILIER 2016-01-14 08:24:44 UTC
Thank you

--Vincent