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

Examples of org.apache.isis.viewer.wicket.model.mementos.PropertyMemento


    private void addPropertyToForm(final EntityModel entityModel,
            final ObjectAssociation association,
            final WebMarkupContainer container) {
        final OneToOneAssociation otoa = (OneToOneAssociation) association;
        final PropertyMemento pm = new PropertyMemento(otoa);

        final ScalarModel scalarModel = entityModel.getPropertyModel(pm);
        final Component component = getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY, ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
       
        if(!renderedFirstField) {
View Full Code Here


    private void addPropertyToForm(final EntityModel entityModel,
            final ObjectAssociation association,
            final WebMarkupContainer container) {
        final OneToOneAssociation otoa = (OneToOneAssociation) association;
        final PropertyMemento pm = new PropertyMemento(otoa);

        final ScalarModel scalarModel = entityModel.getPropertyModel(pm);
        final Component component = getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY, ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
       
        if(!renderedFirstField) {
View Full Code Here

    private void addPropertyToForm(final EntityModel entityModel,
            final ObjectAssociation association,
            final WebMarkupContainer container) {
        final OneToOneAssociation otoa = (OneToOneAssociation) association;
        final PropertyMemento pm = new PropertyMemento(otoa);

        final ScalarModel scalarModel = entityModel.getPropertyModel(pm);
        final Component component = getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY, ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
       
        if(!renderedFirstField) {
View Full Code Here

    private void addPropertyToForm(final EntityModel entityModel,
            final ObjectAssociation association,
            final WebMarkupContainer container) {
        final OneToOneAssociation otoa = (OneToOneAssociation) association;
        final PropertyMemento pm = new PropertyMemento(otoa);

        final ScalarModel scalarModel = entityModel.getPropertyModel(pm);
        final Component component = getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY, ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
       
        if(!renderedFirstField) {
View Full Code Here

    private Component createComponent(final String id, final IModel<ObjectAdapter> rowModel) {

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

        scalarModel.setRenderingHint(RenderingHint.PROPERTY_COLUMN);
        scalarModel.toViewMode();
View Full Code Here

                final WebMarkupContainer container = new WebMarkupContainer(rv.newChildId());
                rv.add(container);
                container.add(eo.nextClass());
                if (association instanceof OneToOneAssociation) {
                    final OneToOneAssociation otoa = (OneToOneAssociation) association;
                    final PropertyMemento pm = new PropertyMemento(otoa);

                    final ScalarModel scalarModel = entityModel.getPropertyModel(pm);
                    component = getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY_OR_COLLECTION, ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
                } else {
                    final OneToManyAssociation otma = (OneToManyAssociation) association;
View Full Code Here

    private Component createComponent(final String id, final IModel<ObjectAdapter> rowModel) {

        final ObjectAdapter adapter = rowModel.getObject();
        final EntityModel model = new EntityModel(adapter);
        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) {
View Full Code Here

    public static Function<OneToOneAssociation, PropertyMemento> fromProperty() {
        return new Function<OneToOneAssociation, PropertyMemento>() {
            @Override
            public PropertyMemento apply(final OneToOneAssociation from) {
                return new PropertyMemento(from);
            }
        };
    }
View Full Code Here

    public static Function<OneToOneAssociation, PropertyMemento> fromProperty() {
        return new Function<OneToOneAssociation, PropertyMemento>() {
            @Override
            public PropertyMemento apply(final OneToOneAssociation from) {
                return new PropertyMemento(from);
            }
        };
    }
View Full Code Here

                final WebMarkupContainer container = new WebMarkupContainer(rv.newChildId());
                rv.add(container);
                container.add(eo.nextClass());
                if (association instanceof OneToOneAssociation) {
                    final OneToOneAssociation otoa = (OneToOneAssociation) association;
                    final PropertyMemento pm = new PropertyMemento(otoa);

                    final ScalarModel scalarModel = entityModel.getPropertyModel(pm);
                    component =
                        getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY_OR_COLLECTION,
                            ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.wicket.model.mementos.PropertyMemento

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.