I know that to change the name of the tab in which browser opens the site I need to to change the title tag in the html file.
But in GWT the things are a bit different: each new place uses the same html file, so the browser tab's name will be the same for all the places.
You can alter the title of the page with the following code
Window.setTitle("My Place Name");
Do notice that the place who call this the latest will set its title.
You can change the page title (eg "Tab Name") by a call to a static function in GWT:
import com.google.gwt.dom.client.Document;
...
public static void setBrowserWindowTitle (String newTitle) {
if (Document.get() != null) {
Document.get().setTitle (newTitle);
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.