Search in sources :

Example 1 with TemplateGeneralModel

use of org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel in project ovirt-engine by oVirt.

the class ImportTemplatePopupView method initGeneralSubTabView.

@Override
protected void initGeneralSubTabView() {
    ScrollPanel generalPanel = new ScrollPanel();
    DetailModelProvider<TemplateListModel, TemplateGeneralModel> modelProvider = new DetailModelProvider<TemplateListModel, TemplateGeneralModel>() {

        @Override
        public TemplateGeneralModel getModel() {
            return (TemplateGeneralModel) importModel.getDetailModels().get(0);
        }

        @Override
        public void onSubTabSelected() {
        }

        @Override
        public void onSubTabDeselected() {
        }

        @Override
        public void activateDetailModel() {
        }

        @Override
        public TemplateListModel getMainModel() {
            // Not used, here to satisfy interface contract.
            return null;
        }
    };
    generalView = new ImportTemplateGeneralSubTabView(modelProvider);
    generalPanel.add(generalView);
    subTabLayoutPanel.add(generalPanel, constants.generalImpTempTab());
}
Also used : TemplateGeneralModel(org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel) DetailModelProvider(org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider) TemplateListModel(org.ovirt.engine.ui.uicommonweb.models.templates.TemplateListModel) ScrollPanel(com.google.gwt.user.client.ui.ScrollPanel)

Example 2 with TemplateGeneralModel

use of org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel in project ovirt-engine by oVirt.

the class RegisterTemplateInfoPanel method initGeneralForm.

private void initGeneralForm() {
    DetailModelProvider<TemplateListModel, TemplateGeneralModel> modelProvider = new DetailModelProvider<TemplateListModel, TemplateGeneralModel>() {

        @Override
        public TemplateGeneralModel getModel() {
            return getTemplateGeneralModel();
        }

        @Override
        public void onSubTabSelected() {
        }

        @Override
        public void onSubTabDeselected() {
        }

        @Override
        public void activateDetailModel() {
        }

        @Override
        public TemplateListModel getMainModel() {
            // Not used, here to satisfy interface contract.
            return null;
        }
    };
    generalView = new ImportTemplateGeneralSubTabView(modelProvider);
}
Also used : TemplateGeneralModel(org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel) DetailModelProvider(org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider) ImportTemplateGeneralSubTabView(org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportTemplateGeneralSubTabView) TemplateListModel(org.ovirt.engine.ui.uicommonweb.models.templates.TemplateListModel)

Aggregations

DetailModelProvider (org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider)2 TemplateGeneralModel (org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel)2 TemplateListModel (org.ovirt.engine.ui.uicommonweb.models.templates.TemplateListModel)2 ScrollPanel (com.google.gwt.user.client.ui.ScrollPanel)1 ImportTemplateGeneralSubTabView (org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportTemplateGeneralSubTabView)1