Search in sources :

Example 1 with DashboardType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.DashboardType in project midpoint by Evolveum.

the class PageDashboardConfigurable method initDashboardObject.

private IModel<DashboardType> initDashboardObject() {
    return new LoadableModel<DashboardType>(false) {

        @Override
        public DashboardType load() {
            StringValue dashboardOid = getPageParameters().get(OnePageParameterEncoder.PARAMETER);
            if (dashboardOid == null || StringUtils.isEmpty(dashboardOid.toString())) {
                getSession().error(getString("PageDashboardConfigurable.message.oidNotDefined"));
                throw new RestartResponseException(PageDashboardInfo.class);
            }
            Task task = createSimpleTask("Search dashboard");
            return WebModelServiceUtils.loadObject(DashboardType.class, dashboardOid.toString(), PageDashboardConfigurable.this, task, task.getResult()).getRealValue();
        }
    };
}
Also used : Task(com.evolveum.midpoint.task.api.Task) RestartResponseException(org.apache.wicket.RestartResponseException) LoadableModel(com.evolveum.midpoint.gui.api.model.LoadableModel) StringValue(org.apache.wicket.util.string.StringValue) DashboardType(com.evolveum.midpoint.xml.ns._public.common.common_3.DashboardType)

Aggregations

LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1 Task (com.evolveum.midpoint.task.api.Task)1 DashboardType (com.evolveum.midpoint.xml.ns._public.common.common_3.DashboardType)1 RestartResponseException (org.apache.wicket.RestartResponseException)1 StringValue (org.apache.wicket.util.string.StringValue)1