Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.app
- import com.vaadin.navigator.Navigator
- import com.vaadin.navigator.View
- import com.vaadin.navigator.ViewChangeListener
- import com.vaadin.server.Page
- import com.vaadin.ui.Alignment
- import com.vaadin.ui.Button
- import com.vaadin.ui.VerticalLayout
- class Dashboard(val nav: Navigator) : VerticalLayout(), View {
- init {
- Page.getCurrent().setTitle("Login")
- setHeight("100%")
- setWidth("100%")
- val overviewButton = Button("Go to User Overview")
- addComponent(overviewButton)
- setComponentAlignment(overviewButton, Alignment.MIDDLE_CENTER)
- overviewButton.addClickListener {
- nav.navigateTo(UserOverview::class.java.name)
- }
- }
- override fun enter(event: ViewChangeListener.ViewChangeEvent) {
- // Do nothing
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement