GMSC Discussions

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Frequent Contributor
Posts: 115
Registered: ‎04-05-2016
Accepted Solution

GMSC 2016 Java SDK: Can not addRow in DataGrid



I am currently working on migrating a couple of GMSC 2015 plugins to GMSC 2016 and therefore I am using the GMSC 2016 Java SDK to compile and test in GMSC 2016. One of the plugins includes that the user is able to (temporally) digitize points in the map and output some result (ID, count, XY coordinates) into the datagrid.


The plugin used to run fine in GMSC 2015 but there seems to be an issue with the addRow(List<Array>)-Method in GMSC 2016 which isn't adding the contents into the dataRows-ArrayList of a searchresult anymore.


	private void addToSearch(GText text) {
		if (this.pointSearch != null
				&& this.pointSearch.getSearchResult() != null) {
			List<Object> row = new ArrayList<>();
			row.add(new Integer(Integer.parseInt(text.getText())));
			GCoordinate coord = GPrimitive.getMBR(text).getCenter();
			row.add(new Double(coord.getX()));
			row.add(new Double(coord.getY()));

When debugging I can see that the "row" element is correctly filled with data, but it's just not getting added as a dataRow into the searchResult. Any idea on what has changed regarding this operation between v. 2015 and 2016?


Thanks you for your help and kind regards,

Sven Möller

Frequent Contributor
Posts: 115
Registered: ‎04-05-2016

Re: GMSC 2016 Java SDK: Can not addRow in DataGrid

Hello again,


I learned that the addRow-method only works on non-empty searchResults. There has to be at least one dataRow so that the method adds more objects.

Instead I use the add-method now like this:



This works, regardless of the current number dataRows in the searchResult.



Sven Möller