Search in sources :

Example 1 with SpringUI

use of com.vaadin.spring.annotation.SpringUI in project jmix by jmix-framework.

the class JmixVaadinServletConfiguration method getUIPaths.

protected List<String> getUIPaths() {
    List<String> uiMappings = new ArrayList<>();
    logger.debug("Checking the application context for Vaadin UI mappings");
    // more checks are performed by the UI provider
    final String[] uiBeanNames = applicationContext.getBeanNamesForAnnotation(SpringUI.class);
    for (String uiBeanName : uiBeanNames) {
        SpringUI annotation = applicationContext.findAnnotationOnBean(uiBeanName, SpringUI.class);
        String path = applicationContext.getEnvironment().resolvePlaceholders(annotation.path()).replaceFirst("^/", "");
        // Map PushStateNavigation UIs to wildcard path
        boolean hasPushStateNavigation = applicationContext.findAnnotationOnBean(uiBeanName, PushStateNavigation.class) != null;
        if (hasPushStateNavigation) {
            path = getWildcardedPath(path);
        }
        uiMappings.add(path);
    }
    return uiMappings;
}
Also used : ArrayList(java.util.ArrayList) SpringUI(com.vaadin.spring.annotation.SpringUI) PushStateNavigation(com.vaadin.navigator.PushStateNavigation)

Aggregations

PushStateNavigation (com.vaadin.navigator.PushStateNavigation)1 SpringUI (com.vaadin.spring.annotation.SpringUI)1 ArrayList (java.util.ArrayList)1