Search in sources :

Example 1 with FinderContextEvent

use of org.jboss.hal.core.finder.FinderContextEvent in project console by hal.

the class ApplicationFinderPresenter method updateBreadcrumb.

@SuppressWarnings("unchecked")
private void updateBreadcrumb() {
    FinderPath applicationPath = finderPath();
    if (applicationPath != null) {
        // try to connect segments with existing columns from the finder
        for (FinderSegment segment : applicationPath) {
            FinderColumn column = finder.getColumn(segment.getColumnId());
            if (column != null) {
                segment.connect(column);
            } else {
                logger.warn("Unable to find column '{}' to connect breadcrumb segment '{}' for token '{}'", segment.getColumnId(), segment, getProxy().getNameToken());
            }
        }
        finder.getContext().reset(applicationPath);
    }
    // The breadcrumb is part of the header. Notify the header presenter to take care of updating the breadcrumb
    getEventBus().fireEvent(new FinderContextEvent(finder.getContext()));
}
Also used : FinderSegment(org.jboss.hal.core.finder.FinderSegment) FinderPath(org.jboss.hal.core.finder.FinderPath) FinderColumn(org.jboss.hal.core.finder.FinderColumn) FinderContextEvent(org.jboss.hal.core.finder.FinderContextEvent)

Aggregations

FinderColumn (org.jboss.hal.core.finder.FinderColumn)1 FinderContextEvent (org.jboss.hal.core.finder.FinderContextEvent)1 FinderPath (org.jboss.hal.core.finder.FinderPath)1 FinderSegment (org.jboss.hal.core.finder.FinderSegment)1