All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.imunity.upman.front.UpmanViewComponent Maven / Gradle / Ivy

There is a newer version: 4.0.2
Show newest version
/*
 * Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
 * See LICENCE.txt file for licensing information.
 */
package io.imunity.upman.front;

import com.vaadin.flow.component.ComponentUtil;
import com.vaadin.flow.component.UI;
import com.vaadin.flow.router.*;
import io.imunity.upman.front.model.ProjectGroup;
import io.imunity.vaadin.elements.UnityViewComponent;

import static io.imunity.vaadin.endpoint.common.Vaadin2XWebAppContext.getCurrentWebAppDisplayedName;

public abstract class UpmanViewComponent extends UnityViewComponent implements HasUrlParameter, AfterNavigationObserver, HasDynamicTitle
{
	public final String pageTitle = getCurrentWebAppDisplayedName();

	public UpmanViewComponent()
	{
		if(ComponentUtil.getData(UI.getCurrent(), ProjectGroup.class) == null)
			return;
		getContent().setClassName("u-view");
		getContent().setHeightFull();
	}

	@Override
	public void setParameter(BeforeEvent event, @OptionalParameter String parameter)
	{
	}

	@Override
	public void afterNavigation(AfterNavigationEvent event)
	{
		loadData();
	}

	@Override
	public String getPageTitle() {
		return pageTitle;
	}

	public abstract void loadData();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy