Package org.apache.isis.viewer.wicket.model.models

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel


        super(ComponentType.ENTITY, EntityLinksSelectorPanel.class);
    }

    @Override
    public Component createComponent(final String id, final IModel<?> model) {
        final EntityModel entityModel = (EntityModel) model;
        return new EntityLinksSelectorPanel(id, entityModel, this);
    }
View Full Code Here


    @Override
    public ApplicationAdvice appliesTo(final IModel<?> model) {
        if (!(model instanceof EntityModel)) {
            return ApplicationAdvice.DOES_NOT_APPLY;
        }
        final EntityModel entityModel = (EntityModel) model;
        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
        return appliesIf(specification != null && !specification.containsFacet(ValueFacet.class));
    }
View Full Code Here

        return appliesIf(specification != null && !specification.containsFacet(ValueFacet.class));
    }

    @Override
    public Component createComponent(final String id, final IModel<?> model) {
        final EntityModel scalarModel = (EntityModel) model;
        return new EntityLinkSimplePanel(id, scalarModel);
    }
View Full Code Here

    private void syncWithInput() {
        final ObjectAdapter adapter = getPendingElseCurrentAdapter();

        if (adapter != null) {
            final EntityModel entityModelForLink = new EntityModel(adapter);
            entityModelForLink.setContextAdapterIfAny(getEntityModel().getContextAdapterIfAny());
            entityModelForLink.setRenderingHint(getEntityModel().getRenderingHint());
           
            final ComponentFactory componentFactory = getComponentFactoryRegistry().findComponentFactory(ComponentType.ENTITY_ICON_AND_TITLE, entityModelForLink);
            //final ComponentFactory componentFactory = getComponentFactoryRegistry().findComponentFactory(ComponentType.ENTITY_ICON_TITLE_AND_COPYLINK, entityModelForLink);
            final Component component = componentFactory.createComponent(entityModelForLink);
            addOrReplace(component);
View Full Code Here

                private static final long serialVersionUID = 1L;
   
                @Override
                protected void onUpdate(AjaxRequestTarget target) {
                    final String oidStr = breadcrumbChoice.getInput();
                    final EntityModel selectedModel = breadcrumbModel.lookup(oidStr);
                    if(selectedModel == null) {
                        final MessageBroker messageBroker = IsisContext.getAuthenticationSession().getMessageBroker();
                        messageBroker.addWarning("Cannot find object");
                        String feedbackMsg = JGrowlUtil.asJGrowlCalls(messageBroker);
                        target.appendJavaScript(feedbackMsg);
                        breadcrumbModel.remove(oidStr);
                        return;
                    }
                    setResponsePage(EntityPage.class, selectedModel.getPageParameters());
                }
            });
       
        final Settings settings = breadcrumbChoice.getSettings();
        settings.setMinimumInputLength(0);
View Full Code Here

        oidStrByEntityModel.put(entityModel, oidStr);
        list.add(0, entityModel);
    }

    private void removeExisting(final String oidStr) {
        final EntityModel existingModel = entityModelByOidStr.get(oidStr);
        if(existingModel != null) {
            remove(oidStr, existingModel);
        }
    }
View Full Code Here

        oidStrByEntityModel.remove(model);
        list.remove(model);
    }

    public void remove(String oidStr) {
        EntityModel removedModel = entityModelByOidStr.remove(oidStr);
        if(removedModel != null) {
            remove(removedModel);
        }
    }
View Full Code Here

        if(copyLink == null) {
            copyLink = createLink(ID_COPY_LINK);
            addOrReplace(copyLink);
        }
        EntityModel model = getModel();
        addSubscribingLink(model);
        addSimpleClipboardModalWindow();

        EntityModel.RenderingHint renderingHint = model.getRenderingHint();
        EntityModel.Mode mode = model.getMode();
        setVisible(renderingHint == EntityModel.RenderingHint.REGULAR && mode == EntityModel.Mode.VIEW);
    }
View Full Code Here

        }
    }

    private void buildGui() {

        final EntityModel entityModel = (EntityModel) getModel();
        final ColumnSpans columnSpans = entityModel.getObject().getSpecification().getFacet(MemberGroupLayoutFacet.class).getColumnSpans();

        renderedFirstField = false;
       
        // left column
        MarkupContainer leftColumn = new WebMarkupContainer(ID_LEFT_COLUMN);
View Full Code Here

            AbstractLink link = new AbstractLink(ID_SUBSCRIBING_LINK) {
                private static final long serialVersionUID = 1L;
            };
            return link;
        } else {
            final EntityModel entityModel = (EntityModel) uiHintContainer;
            final PageParameters pageParameters = entityModel.getPageParameters();
            final Class<? extends Page> pageClass = getPageClassRegistry().getPageClass(PageType.ENTITY);
            return Links.newBookmarkablePageLink(ID_SUBSCRIBING_LINK, pageParameters, pageClass);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.wicket.model.models.EntityModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.