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

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


        EntityCollectionModel collectionModel = EntityCollectionModel.createParented(entityModel, otma);
        return collectionModel;
    }

    CollectionPanel(String id, EntityCollectionModel collectionModel) {
        this(id, collectionModel, new EntityModel(collectionModel.getParentObjectAdapterMemento()), collectionModel.getCollectionMemento().getCollection());
    }
View Full Code Here


        // permanentlyHide(ID_ENTITY_TITLE_NULL);
    }


    private ChoiceProvider<ObjectAdapterMemento> providerForObjectAutoComplete() {
        final EntityModel entityModel = getScalarModel();
        return new ObjectAdapterMementoProviderAbstract(getScalarModel()) {

            private static final long serialVersionUID = 1L;

            @Override
            protected List<ObjectAdapterMemento> obtainMementos(String term) {
                final ObjectSpecification typeOfSpecification = entityModel.getTypeOfSpecification();
                final AutoCompleteFacet autoCompleteFacet = typeOfSpecification.getFacet(AutoCompleteFacet.class);
                final List<ObjectAdapter> results = autoCompleteFacet.execute(term);
                return Lists.transform(results, ObjectAdapterMemento.Functions.fromAdapter());
            }
View Full Code Here

        };
    }

    private ChoiceProvider<ObjectAdapterMemento> providerForParamOrPropertyAutoComplete() {
        final EntityModel entityModel = getScalarModel();
        return new ObjectAdapterMementoProviderAbstract(getScalarModel()) {
           
            private static final long serialVersionUID = 1L;
           
            @Override
View Full Code Here

        }
    }


    private void addOrReplaceIconAndTitle(ObjectAdapter pendingOrCurrentAdapter) {
        final EntityModel entityModelForLink = new EntityModel(pendingOrCurrentAdapter);
        entityModelForLink.setContextAdapterIfAny(getScalarModel().getContextAdapterIfAny());
        entityModelForLink.setRenderingHint(getScalarModel().getRenderingHint());
        final ComponentFactory componentFactory = getComponentFactoryRegistry().findComponentFactory(ComponentType.ENTITY_ICON_AND_TITLE, entityModelForLink);
        final Component component = componentFactory.createComponent(entityModelForLink);
        addOrReplace(component);
    }
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 Component component = componentFactory.createComponent(entityModelForLink);
            addOrReplace(component);
           
View Full Code Here

    }

    @Override
    protected void onBeforeRenderWhenDisabled(final String disableReason) {
        super.onBeforeRenderWhenDisabled(disableReason);
        final EntityModel entityLinkModel = (EntityModel) entityLink.getModel();
        entityLinkModel.toViewMode();
       
        setTitleAttribute(disableReason);

        entityLink.syncVisibilityAndUsability();
    }
View Full Code Here

        addOrReplace(component);
    }


    private void buildEntityActionsGui() {
        final EntityModel model = getModel();
        final ObjectAdapter adapter = model.getObject();
        final ObjectAdapterMemento adapterMemento = model.getObjectAdapterMemento();
        if (adapter != null) {
            final List<ObjectAction> topLevelActions = getTopLevelActions(adapter);

            if(!topLevelActions.isEmpty()) {
                final CssMenuBuilder cssMenuBuilder = new CssMenuBuilder(adapterMemento, getServiceAdapters(), topLevelActions, linkFactory);
View Full Code Here

    public ActionPromptHeaderPanel(String id, final ActionModel model) {
        super(id, model);

        ObjectAdapter targetAdapter = model.getTargetAdapter();

        getComponentFactoryRegistry().addOrReplaceComponent(this, ComponentType.ENTITY_ICON_AND_TITLE, new EntityModel(targetAdapter));

        add(new Label(ID_ACTION_NAME, new AbstractReadOnlyModel<String>() {
            @Override
            public String getObject() {
                return model.getActionMemento().getAction().getName();
View Full Code Here

        super(ComponentType.ENTITY_ICON_AND_TITLE, EntityIconTitleAndCopyLinkPanel.class);
    }

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

    /**
     * Called reflectively, in support of
     * {@link BookmarkablePageLink bookmarkable} links.
     */
    public EntityPage(final PageParameters pageParameters) {
        this(pageParameters, new EntityModel(pageParameters));
    }
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.