Search in sources :

Example 46 with Panel

use of org.apache.wicket.markup.html.panel.Panel in project midpoint by Evolveum.

the class PrismValuePanel method createTypedInputComponent.

// normally this method returns an InputPanel;
// however, for some special readonly types (like ObjectDeltaType) it will return a Panel
private Panel createTypedInputComponent(String id) {
    //        ValueWrapper valueWrapper = model.getObject();
    //        ItemWrapper itemWrapper =
    final Item item = valueWrapperModel.getObject().getItem().getItem();
    Panel panel = null;
    if (item instanceof PrismProperty) {
        final PrismProperty property = (PrismProperty) item;
        PrismPropertyDefinition definition = property.getDefinition();
        final QName valueType = definition.getTypeName();
        //pointing to prism property real value
        final String baseExpression = "value.value";
        //now it works only in description
        if (ObjectType.F_DESCRIPTION.equals(definition.getName())) {
            return new TextAreaPanel(id, new PropertyModel(valueWrapperModel, baseExpression), null);
        }
        if (ActivationType.F_ADMINISTRATIVE_STATUS.equals(definition.getName())) {
            return WebComponentUtil.createEnumPanel(ActivationStatusType.class, id, new PropertyModel<ActivationStatusType>(valueWrapperModel, baseExpression), this);
        } else if (ActivationType.F_LOCKOUT_STATUS.equals(definition.getName())) {
            return new LockoutStatusPanel(id, valueWrapperModel.getObject(), new PropertyModel<LockoutStatusType>(valueWrapperModel, baseExpression));
        } else {
            if (definition.getTypeName().getLocalPart().equals(ActivationStatusType.class.getSimpleName())) {
                return WebComponentUtil.createEnumPanel(ActivationStatusType.class, id, new PropertyModel<ActivationStatusType>(valueWrapperModel, baseExpression), this);
            }
        }
        if (DOMUtil.XSD_DATETIME.equals(valueType)) {
            panel = new DatePanel(id, new PropertyModel<XMLGregorianCalendar>(valueWrapperModel, baseExpression));
        } else if (ProtectedStringType.COMPLEX_TYPE.equals(valueType)) {
            panel = new PasswordPanel(id, new PropertyModel<ProtectedStringType>(valueWrapperModel, baseExpression), valueWrapperModel.getObject().isReadonly());
        } else if (DOMUtil.XSD_BOOLEAN.equals(valueType)) {
            panel = new TriStateComboPanel(id, new PropertyModel<Boolean>(valueWrapperModel, baseExpression));
        } else if (SchemaConstants.T_POLY_STRING_TYPE.equals(valueType)) {
            InputPanel inputPanel;
            PrismPropertyDefinition def = property.getDefinition();
            if (def.getValueEnumerationRef() != null) {
                PrismReferenceValue valueEnumerationRef = def.getValueEnumerationRef();
                String lookupTableUid = valueEnumerationRef.getOid();
                Task task = pageBase.createSimpleTask("loadLookupTable");
                OperationResult result = task.getResult();
                Collection<SelectorOptions<GetOperationOptions>> options = WebModelServiceUtils.createLookupTableRetrieveOptions();
                final PrismObject<LookupTableType> lookupTable = WebModelServiceUtils.loadObject(LookupTableType.class, lookupTableUid, options, pageBase, task, result);
                if (lookupTable != null) {
                    inputPanel = new AutoCompleteTextPanel<String>(id, new LookupPropertyModel<String>(valueWrapperModel, baseExpression + ".orig", lookupTable.asObjectable()), String.class) {

                        @Override
                        public Iterator<String> getIterator(String input) {
                            return prepareAutoCompleteList(input, lookupTable).iterator();
                        }
                    };
                } else {
                    inputPanel = new TextPanel<>(id, new PropertyModel<String>(valueWrapperModel, baseExpression + ".orig"), String.class);
                }
            } else {
                inputPanel = new TextPanel<>(id, new PropertyModel<String>(valueWrapperModel, baseExpression + ".orig"), String.class);
            }
            if (ObjectType.F_NAME.equals(def.getName()) || UserType.F_FULL_NAME.equals(def.getName())) {
                inputPanel.getBaseFormComponent().setRequired(true);
            }
            panel = inputPanel;
        } else if (DOMUtil.XSD_BASE64BINARY.equals(valueType)) {
            panel = new UploadDownloadPanel(id, valueWrapperModel.getObject().isReadonly()) {

                @Override
                public InputStream getStream() {
                    Object object = ((PrismPropertyValue) valueWrapperModel.getObject().getValue()).getValue();
                    return object != null ? new ByteArrayInputStream((byte[]) object) : new ByteArrayInputStream(new byte[0]);
                //                		return super.getStream();
                }

                @Override
                public void updateValue(byte[] file) {
                    ((PrismPropertyValue) valueWrapperModel.getObject().getValue()).setValue(file);
                }

                @Override
                public void uploadFilePerformed(AjaxRequestTarget target) {
                    super.uploadFilePerformed(target);
                    target.add(PrismValuePanel.this.get(ID_FEEDBACK));
                }

                @Override
                public void removeFilePerformed(AjaxRequestTarget target) {
                    super.removeFilePerformed(target);
                    target.add(PrismValuePanel.this.get(ID_FEEDBACK));
                }

                @Override
                public void uploadFileFailed(AjaxRequestTarget target) {
                    super.uploadFileFailed(target);
                    target.add(PrismValuePanel.this.get(ID_FEEDBACK));
                    target.add(((PageBase) getPage()).getFeedbackPanel());
                }
            };
        } else if (ObjectDeltaType.COMPLEX_TYPE.equals(valueType)) {
            panel = new ModificationsPanel(id, new AbstractReadOnlyModel<DeltaDto>() {

                @Override
                public DeltaDto getObject() {
                    if (valueWrapperModel.getObject() == null || valueWrapperModel.getObject().getValue() == null || ((PrismPropertyValue) valueWrapperModel.getObject().getValue()).getValue() == null) {
                        return null;
                    }
                    PrismContext prismContext = ((PageBase) getPage()).getPrismContext();
                    ObjectDeltaType objectDeltaType = (ObjectDeltaType) ((PrismPropertyValue) valueWrapperModel.getObject().getValue()).getValue();
                    try {
                        ObjectDelta delta = DeltaConvertor.createObjectDelta(objectDeltaType, prismContext);
                        return new DeltaDto(delta);
                    } catch (SchemaException e) {
                        throw new IllegalStateException("Couldn't convert object delta: " + objectDeltaType);
                    }
                }
            });
        } else if (QueryType.COMPLEX_TYPE.equals(valueType) || CleanupPoliciesType.COMPLEX_TYPE.equals(valueType)) {
            return new TextAreaPanel(id, new AbstractReadOnlyModel() {

                @Override
                public Object getObject() {
                    if (valueWrapperModel.getObject() == null || valueWrapperModel.getObject().getValue() == null) {
                        return null;
                    }
                    PrismPropertyValue ppv = (PrismPropertyValue) valueWrapperModel.getObject().getValue();
                    if (ppv == null || ppv.getValue() == null) {
                        return null;
                    }
                    QName name = property.getElementName();
                    if (name == null && property.getDefinition() != null) {
                        name = property.getDefinition().getName();
                    }
                    if (name == null) {
                        name = SchemaConstants.C_VALUE;
                    }
                    PrismContext prismContext = ((PageBase) getPage()).getPrismContext();
                    try {
                        return prismContext.xmlSerializer().serializeAnyData(ppv.getValue(), name);
                    } catch (SchemaException e) {
                        throw new SystemException("Couldn't serialize property value of type: " + valueType + ": " + e.getMessage(), e);
                    }
                }
            }, 10);
        } else {
            Class type = XsdTypeMapper.getXsdToJavaMapping(valueType);
            if (type != null && type.isPrimitive()) {
                type = ClassUtils.primitiveToWrapper(type);
            }
            if (isEnum(property)) {
                return WebComponentUtil.createEnumPanel(definition, id, new PropertyModel<>(valueWrapperModel, baseExpression), this);
            }
            //                  // default QName validation is a bit weird, so let's treat QNames as strings [TODO finish this - at the parsing side]
            //                  if (type == QName.class) {
            //                      type = String.class;
            //                  }
            PrismPropertyDefinition def = property.getDefinition();
            if (def.getValueEnumerationRef() != null) {
                PrismReferenceValue valueEnumerationRef = def.getValueEnumerationRef();
                String lookupTableUid = valueEnumerationRef.getOid();
                Task task = pageBase.createSimpleTask("loadLookupTable");
                OperationResult result = task.getResult();
                Collection<SelectorOptions<GetOperationOptions>> options = WebModelServiceUtils.createLookupTableRetrieveOptions();
                final PrismObject<LookupTableType> lookupTable = WebModelServiceUtils.loadObject(LookupTableType.class, lookupTableUid, options, pageBase, task, result);
                if (lookupTable != null) {
                    panel = new AutoCompleteTextPanel<String>(id, new LookupPropertyModel<String>(valueWrapperModel, baseExpression, lookupTable == null ? null : lookupTable.asObjectable()), type) {

                        @Override
                        public Iterator<String> getIterator(String input) {
                            return prepareAutoCompleteList(input, lookupTable).iterator();
                        }

                        @Override
                        public void checkInputValue(AutoCompleteTextField input, AjaxRequestTarget target, LookupPropertyModel model) {
                            Iterator<String> lookupTableValuesIterator = prepareAutoCompleteList("", lookupTable).iterator();
                            String value = input.getInput();
                            boolean isValueExist = false;
                            if (value != null) {
                                if (value.trim().equals("")) {
                                    isValueExist = true;
                                } else {
                                    while (lookupTableValuesIterator.hasNext()) {
                                        String lookupTableValue = lookupTableValuesIterator.next();
                                        if (value.trim().equals(lookupTableValue)) {
                                            isValueExist = true;
                                            break;
                                        }
                                    }
                                }
                            }
                            if (isValueExist) {
                                input.setModelValue(new String[] { value });
                                target.add(PrismValuePanel.this.get(ID_FEEDBACK));
                            } else {
                                input.error("Entered value doesn't match any of available values and will not be saved.");
                                target.add(PrismValuePanel.this.get(ID_FEEDBACK));
                            }
                        }
                    };
                } else {
                    panel = new TextPanel<>(id, new PropertyModel<String>(valueWrapperModel, baseExpression), type);
                }
            } else {
                panel = new TextPanel<>(id, new PropertyModel<String>(valueWrapperModel, baseExpression), type);
            }
        }
    } else if (item instanceof PrismReference) {
        PrismContext prismContext = item.getPrismContext();
        if (prismContext == null) {
            prismContext = pageBase.getPrismContext();
        }
        QName targetTypeName = ((PrismReferenceDefinition) item.getDefinition()).getTargetTypeName();
        Class targetClass = null;
        if (targetTypeName != null && prismContext != null) {
            targetClass = prismContext.getSchemaRegistry().determineCompileTimeClass(targetTypeName);
        }
        final Class typeClass = targetClass != null ? targetClass : (item.getDefinition().getTypeClassIfKnown() != null ? item.getDefinition().getTypeClassIfKnown() : FocusType.class);
        Collection typeClasses = new ArrayList();
        // HACK HACK MID-3201 MID-3231
        if (isUserOrgItem(item, typeClass)) {
            typeClasses.add(UserType.class);
            typeClasses.add(OrgType.class);
        } else {
            typeClasses.add(typeClass);
        }
        panel = new ValueChoosePanel(id, new PropertyModel<>(valueWrapperModel, "value"), item.getValues(), false, typeClasses);
    } else if (item instanceof PrismContainer<?>) {
        AssociationWrapper itemWrapper = (AssociationWrapper) valueWrapperModel.getObject().getItem();
        final PrismContainer container = (PrismContainer) item;
        PrismContainerDefinition definition = container.getDefinition();
        QName valueType = definition.getTypeName();
        if (ShadowAssociationType.COMPLEX_TYPE.equals(valueType)) {
            PrismContext prismContext = item.getPrismContext();
            if (prismContext == null) {
                prismContext = pageBase.getPrismContext();
            }
            ShadowType shadowType = ((ShadowType) itemWrapper.getContainer().getObject().getObject().asObjectable());
            PrismObject<ResourceType> resource = shadowType.getResource().asPrismObject();
            // of resources.
            try {
                resource.revive(prismContext);
            } catch (SchemaException e) {
                throw new SystemException(e.getMessage(), e);
            }
            RefinedResourceSchema refinedSchema;
            CompositeRefinedObjectClassDefinition rOcDef;
            try {
                refinedSchema = RefinedResourceSchemaImpl.getRefinedSchema(resource);
                rOcDef = refinedSchema.determineCompositeObjectClassDefinition(shadowType.asPrismObject());
            } catch (SchemaException e) {
                throw new SystemException(e.getMessage(), e);
            }
            RefinedAssociationDefinition assocDef = itemWrapper.getRefinedAssociationDefinition();
            RefinedObjectClassDefinition assocTargetDef = assocDef.getAssociationTarget();
            ObjectQuery query = getAssociationsSearchQuery(prismContext, resource, assocTargetDef.getTypeName(), assocTargetDef.getKind());
            List values = item.getValues();
            return new AssociationValueChoicePanel(id, valueWrapperModel, values, false, ShadowType.class, query, assocTargetDef);
        }
    }
    return panel;
}
Also used : LockoutStatusPanel(com.evolveum.midpoint.web.component.LockoutStatusPanel) Task(com.evolveum.midpoint.task.api.Task) ArrayList(java.util.ArrayList) AutoCompleteTextPanel(com.evolveum.midpoint.gui.api.component.autocomplete.AutoCompleteTextPanel) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) AutoCompleteTextField(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField) List(java.util.List) ArrayList(java.util.ArrayList) ValueChoosePanel(com.evolveum.midpoint.web.component.form.ValueChoosePanel) SchemaException(com.evolveum.midpoint.util.exception.SchemaException) PasswordPanel(com.evolveum.midpoint.gui.api.component.password.PasswordPanel) DeltaDto(com.evolveum.midpoint.web.component.model.delta.DeltaDto) PageBase(com.evolveum.midpoint.gui.api.page.PageBase) AutoCompleteTextPanel(com.evolveum.midpoint.gui.api.component.autocomplete.AutoCompleteTextPanel) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ObjectDeltaType(com.evolveum.prism.xml.ns._public.types_3.ObjectDeltaType) ByteArrayInputStream(java.io.ByteArrayInputStream) Collection(java.util.Collection) ProtectedStringType(com.evolveum.prism.xml.ns._public.types_3.ProtectedStringType) ModificationsPanel(com.evolveum.midpoint.web.component.model.delta.ModificationsPanel) AbstractReadOnlyModel(org.apache.wicket.model.AbstractReadOnlyModel) GetOperationOptions(com.evolveum.midpoint.schema.GetOperationOptions) SystemException(com.evolveum.midpoint.util.exception.SystemException) AssociationValueChoicePanel(com.evolveum.midpoint.web.page.admin.users.component.AssociationValueChoicePanel) Iterator(java.util.Iterator) ObjectDelta(com.evolveum.midpoint.prism.delta.ObjectDelta) QName(javax.xml.namespace.QName) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) LookupPropertyModel(com.evolveum.midpoint.web.model.LookupPropertyModel) PropertyModel(org.apache.wicket.model.PropertyModel) LockoutStatusPanel(com.evolveum.midpoint.web.component.LockoutStatusPanel) FeedbackPanel(org.apache.wicket.markup.html.panel.FeedbackPanel) AutoCompleteTextPanel(com.evolveum.midpoint.gui.api.component.autocomplete.AutoCompleteTextPanel) ValueChoosePanel(com.evolveum.midpoint.web.component.form.ValueChoosePanel) PasswordPanel(com.evolveum.midpoint.gui.api.component.password.PasswordPanel) ModificationsPanel(com.evolveum.midpoint.web.component.model.delta.ModificationsPanel) Panel(org.apache.wicket.markup.html.panel.Panel) AssociationValueChoicePanel(com.evolveum.midpoint.web.page.admin.users.component.AssociationValueChoicePanel) SelectorOptions(com.evolveum.midpoint.schema.SelectorOptions) LookupPropertyModel(com.evolveum.midpoint.web.model.LookupPropertyModel)

Example 47 with Panel

use of org.apache.wicket.markup.html.panel.Panel in project midpoint by Evolveum.

the class TaskBasicTabPanel method initLayoutHandler.

private void initLayoutHandler() {
    Panel handlerPanel = HandlerPanelFactory.instance().createPanelForTask(ID_HANDLER_PANEL, new PropertyModel<HandlerDto>(taskDtoModel, TaskDto.F_HANDLER_DTO), parentPage);
    add(handlerPanel);
}
Also used : HandlerDto(com.evolveum.midpoint.web.page.admin.server.handlers.dto.HandlerDto) LinkPanel(com.evolveum.midpoint.web.component.data.column.LinkPanel) Panel(org.apache.wicket.markup.html.panel.Panel) AbstractObjectTabPanel(com.evolveum.midpoint.web.component.objectdetails.AbstractObjectTabPanel)

Example 48 with Panel

use of org.apache.wicket.markup.html.panel.Panel in project webanno by webanno.

the class ProjectPage method makeTabs.

private List<ITab> makeTabs() {
    List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(Model.of("Details")) {

        private static final long serialVersionUID = 6703144434578403272L;

        @Override
        public Panel getPanel(String panelId) {
            return new ProjectDetailPanel(panelId, selectedProject);
        }

        @Override
        public boolean isVisible() {
            return selectedProject.getObject() != null;
        }
    });
    // Add the project settings panels from the registry
    for (ProjectSettingsPanelDecl psp : projectSettingsPanelRegistryService.getPanels()) {
        AbstractTab tab = new AbstractTab(Model.of(psp.label)) {

            private static final long serialVersionUID = -1503555976570640065L;

            @Override
            public Panel getPanel(String aPanelId) {
                try {
                    return ConstructorUtils.invokeConstructor(psp.panel, aPanelId, selectedProject);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }

            @Override
            public boolean isVisible() {
                return selectedProject.getObject() != null && selectedProject.getObject().getId() != null && psp.condition.applies(selectedProject.getObject());
            }
        };
        tabs.add(tab);
    }
    return tabs;
}
Also used : AjaxTabbedPanel(org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel) ProjectTagSetsPanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.tagsets.ProjectTagSetsPanel) AnnotationGuideLinePanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.guidelines.AnnotationGuideLinePanel) Panel(org.apache.wicket.markup.html.panel.Panel) BootstrapAjaxTabbedPanel(de.tudarmstadt.ukp.clarin.webanno.support.bootstrap.BootstrapAjaxTabbedPanel) ProjectDetailPanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.detail.ProjectDetailPanel) ProjectUsersPanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.users.ProjectUsersPanel) ProjectDetailPanel(de.tudarmstadt.ukp.clarin.webanno.ui.project.detail.ProjectDetailPanel) ArrayList(java.util.ArrayList) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ProjectSettingsPanelDecl(de.tudarmstadt.ukp.clarin.webanno.ui.core.settings.ProjectSettingsPanelRegistryService.ProjectSettingsPanelDecl) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab)

Example 49 with Panel

use of org.apache.wicket.markup.html.panel.Panel in project syncope by apache.

the class SAML2SP method buildTabList.

private List<ITab> buildTabList() {
    final List<ITab> tabs = new ArrayList<>(2);
    tabs.add(new AbstractTab(new ResourceModel("idps")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new SAML2IdPsDirectoryPanel(panelId, getPageReference());
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("sp")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new SAML2SPPanel(panelId);
        }
    });
    return tabs;
}
Also used : AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) SAML2SPPanel(org.apache.syncope.client.console.panels.SAML2SPPanel) Panel(org.apache.wicket.markup.html.panel.Panel) SAML2IdPsDirectoryPanel(org.apache.syncope.client.console.panels.SAML2IdPsDirectoryPanel) ArrayList(java.util.ArrayList) SAML2SPPanel(org.apache.syncope.client.console.panels.SAML2SPPanel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ResourceModel(org.apache.wicket.model.ResourceModel) SAML2IdPsDirectoryPanel(org.apache.syncope.client.console.panels.SAML2IdPsDirectoryPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab)

Example 50 with Panel

use of org.apache.wicket.markup.html.panel.Panel in project syncope by apache.

the class AnyPanel method getDirectoryPanel.

protected Panel getDirectoryPanel(final String id) {
    final Panel panel;
    String fiql;
    final String realm;
    final String dynRealm;
    if (realmTO.getFullPath().startsWith(SyncopeConstants.ROOT_REALM)) {
        realm = realmTO.getFullPath();
        dynRealm = null;
    } else {
        realm = SyncopeConstants.ROOT_REALM;
        dynRealm = realmTO.getKey();
    }
    switch(anyTypeTO.getKind()) {
        case USER:
            fiql = dynRealm == null ? SyncopeClient.getUserSearchConditionBuilder().is("key").notNullValue().query() : SyncopeClient.getUserSearchConditionBuilder().inDynRealms(dynRealm).query();
            final UserTO userTO = new UserTO();
            userTO.setRealm(realmTO.getFullPath());
            panel = new UserDirectoryPanel.Builder(anyTypeClassRestClient.list(anyTypeTO.getClasses()), anyTypeTO.getKey(), pageRef).setRealm(realm).setFiltered(true).setFiql(fiql).setWizardInModal(true).addNewItemPanelBuilder(FormLayoutInfoUtils.instantiate(userTO, anyTypeTO.getClasses(), formLayoutInfo.getLeft(), pageRef)).build(id);
            MetaDataRoleAuthorizationStrategy.authorize(panel, WebPage.RENDER, StandardEntitlement.USER_SEARCH);
            break;
        case GROUP:
            fiql = dynRealm == null ? SyncopeClient.getGroupSearchConditionBuilder().is("key").notNullValue().query() : SyncopeClient.getGroupSearchConditionBuilder().inDynRealms(dynRealm).query();
            final GroupTO groupTO = new GroupTO();
            groupTO.setRealm(realmTO.getFullPath());
            panel = new GroupDirectoryPanel.Builder(anyTypeClassRestClient.list(anyTypeTO.getClasses()), anyTypeTO.getKey(), pageRef).setRealm(realm).setFiltered(true).setFiql(fiql).setWizardInModal(true).addNewItemPanelBuilder(FormLayoutInfoUtils.instantiate(groupTO, anyTypeTO.getClasses(), formLayoutInfo.getMiddle(), pageRef)).build(id);
            // list of group is available to all authenticated users
            break;
        case ANY_OBJECT:
            fiql = dynRealm == null ? SyncopeClient.getAnyObjectSearchConditionBuilder(anyTypeTO.getKey()).is("key").notNullValue().query() : SyncopeClient.getAnyObjectSearchConditionBuilder(anyTypeTO.getKey()).inDynRealms(dynRealm).query();
            final AnyObjectTO anyObjectTO = new AnyObjectTO();
            anyObjectTO.setRealm(realmTO.getFullPath());
            anyObjectTO.setType(anyTypeTO.getKey());
            panel = new AnyObjectDirectoryPanel.Builder(anyTypeClassRestClient.list(anyTypeTO.getClasses()), anyTypeTO.getKey(), pageRef).setRealm(realm).setFiltered(true).setFiql(fiql).setWizardInModal(true).addNewItemPanelBuilder(FormLayoutInfoUtils.instantiate(anyObjectTO, anyTypeTO.getClasses(), formLayoutInfo.getRight().get(anyTypeTO.getKey()), pageRef)).build(id);
            MetaDataRoleAuthorizationStrategy.authorize(panel, WebPage.RENDER, AnyEntitlement.SEARCH.getFor(anyTypeTO.getKey()));
            break;
        default:
            panel = new LabelPanel(id, null);
    }
    return panel;
}
Also used : AbstractSearchPanel(org.apache.syncope.client.console.panels.search.AbstractSearchPanel) SearchClausePanel(org.apache.syncope.client.console.panels.search.SearchClausePanel) AnyObjectSearchPanel(org.apache.syncope.client.console.panels.search.AnyObjectSearchPanel) UserSearchPanel(org.apache.syncope.client.console.panels.search.UserSearchPanel) GroupSearchPanel(org.apache.syncope.client.console.panels.search.GroupSearchPanel) Panel(org.apache.wicket.markup.html.panel.Panel) AnyObjectTO(org.apache.syncope.common.lib.to.AnyObjectTO) UserTO(org.apache.syncope.common.lib.to.UserTO) GroupTO(org.apache.syncope.common.lib.to.GroupTO)

Aggregations

Panel (org.apache.wicket.markup.html.panel.Panel)76 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)27 ArrayList (java.util.ArrayList)21 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)18 BasePanel (com.evolveum.midpoint.gui.api.component.BasePanel)16 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)16 Before (org.junit.Before)16 AbstractTab (org.apache.wicket.extensions.markup.html.tabs.AbstractTab)15 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)13 AjaxBootstrapTabbedPanel (de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel)12 ResourceModel (org.apache.wicket.model.ResourceModel)11 DivTestPanel (org.odlabs.wiquery.ui.DivTestPanel)11 ItemPanelSettingsBuilder (com.evolveum.midpoint.gui.impl.prism.panel.ItemPanelSettingsBuilder)10 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)10 List (java.util.List)9 Test (org.junit.Test)9 IModel (org.apache.wicket.model.IModel)8 Model (org.apache.wicket.model.Model)6 ActionsPanel (org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel)5 Label (org.apache.wicket.markup.html.basic.Label)5