@Route(value = "Inventory", layout = MainView.class)
public class InventoryView extends HorizontalLayout implements HasUrlParameter<String>
{
@Override
public void setParameter( BeforeEvent beforeEvent, @WildcardParameter String paramString )
{
beforeEvent.getUI().getRouter();
beforeEvent.getLayouts();
}
}
Hi, I am just wondering is there anyway to get a reference to the MainView object configured in the Route? I need to hide something in the MainView when we landing the “Inventory” page.
I tried beforeEvent.getUI().getRouter() and beforeEvent.getLayouts(), but seems can only get the Class rather than a object reference.