Package org.apache.isis.viewer.wicket.ui

Examples of org.apache.isis.viewer.wicket.ui.ComponentFactory.createComponent()


        final ObjectAdapter adapter = rowModel.getObject();
        final EntityModel model = new EntityModel(adapter);
        model.setRenderingHint(parentAdapterMementoIfAny != null? RenderingHint.PARENTED_TITLE_COLUMN: RenderingHint.STANDALONE_TITLE_COLUMN);
        model.setContextAdapterIfAny(parentAdapterMementoIfAny);
        final ComponentFactory componentFactory = findComponentFactory(ComponentType.ENTITY_LINK, model);
        return componentFactory.createComponent(id, model);
    }

   

}
View Full Code Here


                entityModelForLink.setContextAdapterIfAny(getModel().getContextAdapterIfAny());
                entityModelForLink.setRenderingHint(getModel().getRenderingHint());
               
                final ComponentFactory componentFactory =
                        getComponentFactoryRegistry().findComponentFactory(ComponentType.ENTITY_ICON_AND_TITLE, entityModelForLink);
                final Component component = componentFactory.createComponent(entityModelForLink);
               
                ((MarkupContainer)getComponentForRegular()).addOrReplace(component);
            }
        } else {
            permanentlyHideEntityIconAndTitleIfInRegularMode();
View Full Code Here

            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);
           
            permanentlyHide(ID_ENTITY_TITLE_NULL);
        } else {
            // represent no object by a simple label displaying '(null)'
View Full Code Here

        buildEntityActionsGui();
    }

    private void addOrReplaceIconAndTitle() {
        final ComponentFactory componentFactory = getComponentFactoryRegistry().findComponentFactory(ComponentType.ENTITY_ICON_AND_TITLE, getEntityModel());
        final Component component = componentFactory.createComponent(getEntityModel());
        addOrReplace(component);
    }


    private void buildEntityActionsGui() {
View Full Code Here

    }

    @Override
    public Component createComponent(final ComponentType componentType, final IModel<?> model) {
        final ComponentFactory componentFactory = findComponentFactoryElseFailFast(componentType, model);
        final Component component = componentFactory.createComponent(model);
        return component;
    }

    @Override
    public Component createComponent(final ComponentType componentType, final String id, final IModel<?> model) {
View Full Code Here

    }

    @Override
    public Component createComponent(final ComponentType componentType, final String id, final IModel<?> model) {
        final ComponentFactory componentFactory = findComponentFactoryElseFailFast(componentType, model);
        final Component component = componentFactory.createComponent(id, model);
        return component;
    }

    @Override
    public List<ComponentFactory> findComponentFactories(final ComponentType componentType, final IModel<?> model) {
View Full Code Here

        scalarModel.setRenderingHint(RenderingHint.PROPERTY_COLUMN);
        scalarModel.toViewMode();

        final ComponentFactory componentFactory = findComponentFactory(ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
        final Component component = componentFactory.createComponent(id, scalarModel);
       
        return component;
    }

}
View Full Code Here

        final EntityModel model = new EntityModel(adapter);
        model.setRenderingHint(parentAdapterMementoIfAny != null? RenderingHint.PARENTED_TITLE_COLUMN: RenderingHint.STANDALONE_TITLE_COLUMN);
        model.setContextAdapterIfAny(parentAdapterMementoIfAny);
        // will use EntityLinkSimplePanelFactory as model is an EntityModel
        final ComponentFactory componentFactory = findComponentFactory(ComponentType.ENTITY_LINK, model);
        return componentFactory.createComponent(id, model);
    }

   

}
View Full Code Here

    @Override
    protected void onSelectionChanged(final ComponentFactory newSelection) {
        final ComponentFactory componentFactory = getModel().getObject();
        if (componentFactory != null) {
            container.addOrReplace(componentFactory.createComponent(underlyingId, underlyingModel));
        }
    }
}
View Full Code Here

    }

    @Override
    public Component createComponent(final ComponentType componentType, final IModel<?> model) {
        final ComponentFactory componentFactory = findComponentFactoryElseFailFast(componentType, model);
        final Component component = componentFactory.createComponent(model);
        return component;
    }

    @Override
    public Component createComponent(final ComponentType componentType, final String id, final IModel<?> model) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.