wie laden oder aktualisieren Sie eine Registerkarte Inhalte-Basis auf die Aktionen in vaadin

Den Inhalt der Register wird gebildet und angezeigt, wenn die Anwendung geladen wird. Später wird der Inhalt der Registerkarte kann geändert werden, indem Sie andere Aktionen. Ich möchte zeigen die neueren Inhalte nach jeder Aktion. Und jedes mal, wenn ich auf die Registerkarte Blatt, der Inhalt sollte aktualisieren/aktualisiert. Aber ich konnte nicht.

    //the content of the tab from the "reprintsTab" class
    //in the "reprintsTab" it query data from database and print out
    //later I update the data in the database from somewhere else, and I want the tab shows the new content
    //I want to click the tab sheet to reload the "reprintTab" class and print out the new content

    //here is what I did:

    public TabSheet sheet;

    //add tab and add the content from "reprintTab" into this tab
    sheet.addTab(new reprintsTab());

    //add the listener 
    sheet.addListener(new TabSheet.SelectedTabChangeListener() {

        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {

        //I know it does not work, because it only reload the class. but not put the content under the tab I want
        new reprintsTab();

        }
    });

Was soll ich tun? bitte helfen Sie mir, danke.

InformationsquelleAutor Kurt X | 2013-03-13
Schreibe einen Kommentar