Link to a View

I have a navigator attached at my UI with several views registered.
I want to link to one of this views and i don’t know how to do it.

With a button is to simple.

Button registerButton = new Button("Registrarse", e ->{
       UI.getCurrent().getNavigator().navigateTo("register")
});

But the constructor of Link component needs a Resource.

Thanks

Hi,
if you are using (or extending) Valo theme you can simply apply the link class (registerButton.addStyleName(ValoTheme.BUTTON_LINK)) to the button to make it look like a link

HTH
Marco