Table selection question

I’m creating a table in Vaadin 7 and want to add a listener to handle selections. My code looks like:


tbl_SGNames = new Table();
        	tbl_SGNames.setHeight("400px");
        	tbl_SGNames.setWidth("50%");
        	tbl_SGNames.setSelectable(true);
        	tbl_SGNames.setImmediate(true);
        	tbl_SGNames.setContainerDataSource(jc_SGName);
        	tbl_SGNames.setVisibleColumns(new Object[] { "id", "sgname", "modifiedBy", "lastChanged" });
        	tbl_SGNames.addListener(new Property.ValueChangeListener() {
        		private static final long serialVersionUID = 1L;

        		@Override
        		public void valueChange(ValueChangeEvent event) {
        			Sgname tsg = null;

        			Logger.info("Selected Row: " + tbl_SGNames.getValue());
        			<other code here - seems to be working properly...>
        		}
        	});

This seems to be working - it is identical to the code I used in Vaadin 6. However, in Vaadin 7 Eclipse is putting a line through ‘addListener’ and marking it deprecated. The Vaadin manual seems to list addListener as a valid routine - what should I be using instead?

thanks,

nbc

It appears that changing the line:

tbl.addListener(new Property.ValueChangeListener()…

to

tbl.addValueChangeListener(new ValueChangeListener() {

makes the problem go away. The old version does seem to work the same way, but looks like it is deprecated. The documentation probably needs an update…

nbc