Need help with TileSort

Hi!
I hope someone can help me. I am writing my Bac project with GWT and SmartGWT.
At the moment I am trying to create a gui for selecting pictures (in my case medical x-rays) to add them to the desktop on my application. I created a window which opens when I click on a button on my desktop.
There I used the first part of the code of the TileSort & Filtering from the examples to create DetailViewerFields and a tileGrid. I also created some dummy data to test it. The images and also the tilegrid is displayed correctly. But there are two problems:

  1. If I click on one of the image they are marked in the smartgwt example, but in my case it does not seem that something get marked. I do not know why.
  2. My problem: I want to implement the following logic:
  • The user marks the images he wants, the marked images are temporarily stored somewhere, e.g. in an array.
  • After he has selected all the images he clicks on a button
  • Then the images marked in the array are displayed on the desktop and the window closes.

I need only help for the first part: marking the images and storing them in a temporaily varibale. How can I do this? The example code does not really help me in this case, where and how do I need to introduce the handler for marking(selecting).

It would be very great if someone could help me!

This is my current code:

// The stack in which the data is displayed
		VStack vStack = new VStack(20);  
		vStack.setWidth100();  
		
		// The preview Fields
		DetailViewerField checkboxField = new DetailViewerField("checkbox");
		DetailViewerField imageField = new DetailViewerField("image");  
		DetailViewerField titleField = new DetailViewerField("title");  
		//titleField.setCellStyle("title");
		DetailViewerField loincCodeField = new DetailViewerField("loincCode");
		DetailViewerField dateField = new DetailViewerField("date");
		
		
		final TileGrid tileGrid = new TileGrid();  
		tileGrid.setTileWidth(100);  
		tileGrid.setTileHeight(150);  
		tileGrid.setHeight100();  
		tileGrid.setShowAllRecords(true);  
		tileGrid.setData(data);
		tileGrid.setFields(checkboxField, imageField, titleField, loincCodeField, dateField);
		tileGrid.setAutoFetchData(true);  
		tileGrid.setAnimateTileChange(true);
		vStack.addMember(tileGrid);
		
		return vStack;

Thanks,
Florian