Error about 'using toString() instead of getValue() to get the value for a

I am runnig a page with tabs.
Here is the code that creates the tabs :

private TabSheet getTabSheet()
    {
        TabSheet tabs = new TabSheet();
        tabs.addTab(new Label("Label 1"), "Tabl 1");
        tabs.addTab(new Label("Label 2"), "Tabl 2");
        TabSheet.Tab tab = tabs.addTab(new Label("Label 3"), "Tabl 3");
        tab.setClosable(true);

        tabs.addSelectedTabChangeListener(new TabSheet.SelectedTabChangeListener() {
            @Override
            public void selectedTabChange(TabSheet.SelectedTabChangeEvent selectedTabChangeEvent) {
                Notification.show("You are watching " + selectedTabChangeEvent.getTabSheet().getSelectedTab().);
            }
        });


        return tabs;
    }

The problem is that when I click on a tab (and the listener activates itself) I get the following error on my output console of my ide (IntelliJ Idea 13) :

WARNING: You are using toString() instead of getValue() to get the value for a Property of type com.vaadin.ui.Label. This is strongly discouraged and only provided for backwards compatibility with Vaadin 6. To disable this warning message and retain the behavior, set the init parameter “legacyPropertyToString” to “true”. To disable the legacy functionality, set “legacyPropertyToString” to false. (Note that your debugger might call toString() and trigger this message). To find out who is calling toString(), enable FINE level logging.

Althought I tried a lot, I cannot find a way to use getValue function in my code.
Any ideas are more than welcome.
Thank you.

Hi,

the warning is basically harmless at least currently. You could do it the correct way though. TabSheet.getSelectedTab() returns a Component. Once you have this component, you could check if it’s an instanceof Property. If so, do the cast and call getValue() on the result and print that instead.

In the case of label the end result should be identical - except that you should not receive the warning.

The same warning states later: To find out who is calling toString(), enable FINE level logging.

¿How can I change the level logging of Vaadin to FINE?

With regular
java.util.logging configuration
:

com.vaadin.level=FINE

I have enabled FINE logging level in JUL, but I can’t see any additional logging in the eclipse console. I have also tried with ALL level, but still same results.

Is there any other setting needed to get this warning’s source?