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

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


    }

    @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


            views.addOrReplace(viewsDropDown);
            addOrReplace(views);
        } else {
            permanentlyHide(ID_VIEWS);
        }
        addOrReplace(firstComponentFactory.createComponent(underlyingId, model));
    }

    private List<ComponentFactory> findOtherComponentFactories(final T model, final ComponentFactory ignoreFactory) {
        final List<ComponentFactory> componentFactories = getComponentFactoryRegistry().findComponentFactories(componentType, model);
        return Lists.newArrayList(Collections2.filter(componentFactories, new Predicate<ComponentFactory>() {
View Full Code Here

        final OneToOneAssociation property = (OneToOneAssociation) adapter.getSpecification().getAssociation(propertyExpression);
        final PropertyMemento pm = new PropertyMemento(property);
        final ScalarModel scalarModel = model.getPropertyModel(pm);

        final ComponentFactory componentFactory = findComponentFactory(ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
        final Component component = componentFactory.createComponent(id, scalarModel);
        if (component instanceof ScalarPanelAbstract) {
            final ScalarPanelAbstract scalarPanel = (ScalarPanelAbstract) component;
            scalarPanel.setFormat(Format.COMPACT);
            scalarModel.toViewMode();
        }
View Full Code Here

    private Component createComponent(final String id, final IModel<ObjectAdapter> rowModel) {
        final ObjectAdapter adapter = rowModel.getObject();
        final IModel<?> model = new EntityModel(adapter);
        final ComponentFactory componentFactory = findComponentFactory(ComponentType.ENTITY_LINK, model);
        return componentFactory.createComponent(id, model);
    }

}
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

    @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

            views.addOrReplace(viewsDropDown);
            addOrReplace(views);
        } else {
            permanentlyHide(ID_VIEWS);
        }
        addOrReplace(firstComponentFactory.createComponent(underlyingId, model));
    }

    private List<ComponentFactory> findOtherComponentFactories(final T model, final ComponentFactory ignoreFactory) {
        final List<ComponentFactory> componentFactories =
            getComponentFactoryRegistry().findComponentFactories(componentType, model);
View Full Code Here

        final PropertyMemento pm = new PropertyMemento(property);
        final ScalarModel scalarModel = model.getPropertyModel(pm);

        final ComponentFactory componentFactory =
            findComponentFactory(ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
        final Component component = componentFactory.createComponent(id, scalarModel);
        if (component instanceof ScalarPanelAbstract) {
            final ScalarPanelAbstract scalarPanel = (ScalarPanelAbstract) component;
            scalarPanel.setFormat(Format.COMPACT);
            scalarModel.toViewMode();
        }
View Full Code Here

    private Component createComponent(final String id, final IModel<ObjectAdapter> rowModel) {
        final ObjectAdapter adapter = rowModel.getObject();
        final IModel<?> model = new EntityModel(adapter);
        final ComponentFactory componentFactory = findComponentFactory(ComponentType.ENTITY_LINK, model);
        return componentFactory.createComponent(id, 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.