Search in sources :

Example 1 with ShowLinkAction

use of com.haulmont.cuba.web.gui.components.ShowLinkAction in project cuba by cuba-platform.

the class ScreenHistoryBrowse method init.

@Override
public void init(Map<String, Object> params) {
    LinkColumnHelper.initColumn(historyTable, "caption", entity -> {
        close("windowClose");
        openUrl(entity);
    });
    historyTable.addAction(new ShowLinkAction(historyTable.getDatasource(), entity -> entity != null ? ((ScreenHistoryEntity) entity).getUrl() : ""));
}
Also used : LinkColumnHelper(com.haulmont.cuba.gui.app.LinkColumnHelper) ScreenHistoryEntity(com.haulmont.cuba.security.entity.ScreenHistoryEntity) Table(com.haulmont.cuba.gui.components.Table) App(com.haulmont.cuba.web.App) HashMap(java.util.HashMap) AppBeans(com.haulmont.cuba.core.global.AppBeans) Inject(javax.inject.Inject) List(java.util.List) AbstractWindow(com.haulmont.cuba.gui.components.AbstractWindow) Configuration(com.haulmont.cuba.core.global.Configuration) LinkHandler(com.haulmont.cuba.web.sys.LinkHandler) WebConfig(com.haulmont.cuba.web.WebConfig) Map(java.util.Map) ShowLinkAction(com.haulmont.cuba.web.gui.components.ShowLinkAction) Entity(com.haulmont.cuba.core.entity.Entity) ShowLinkAction(com.haulmont.cuba.web.gui.components.ShowLinkAction)

Aggregations

Entity (com.haulmont.cuba.core.entity.Entity)1 AppBeans (com.haulmont.cuba.core.global.AppBeans)1 Configuration (com.haulmont.cuba.core.global.Configuration)1 LinkColumnHelper (com.haulmont.cuba.gui.app.LinkColumnHelper)1 AbstractWindow (com.haulmont.cuba.gui.components.AbstractWindow)1 Table (com.haulmont.cuba.gui.components.Table)1 ScreenHistoryEntity (com.haulmont.cuba.security.entity.ScreenHistoryEntity)1 App (com.haulmont.cuba.web.App)1 WebConfig (com.haulmont.cuba.web.WebConfig)1 ShowLinkAction (com.haulmont.cuba.web.gui.components.ShowLinkAction)1 LinkHandler (com.haulmont.cuba.web.sys.LinkHandler)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 Inject (javax.inject.Inject)1