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

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


     * @param action
     * @return
     */
    public static ActionModel create(ObjectAdapter objectAdapter, ObjectAction action) {
        final ObjectAdapterMemento serviceMemento = ObjectAdapterMemento.Functions.fromAdapter().apply(objectAdapter);
        final ActionMemento homePageActionMemento = ObjectAdapterMemento.Functions.fromAction().apply(action);
        final Mode mode = action.getParameterCount() > 0? Mode.PARAMETERS : Mode.RESULTS;
        return new ActionModel(serviceMemento, homePageActionMemento, mode);
    }
View Full Code Here


    private static ActionMemento newActionMementoFrom(final PageParameters pageParameters) {
        final ObjectSpecId owningSpec = ObjectSpecId.of(PageParameterNames.ACTION_OWNING_SPEC.getStringFrom(pageParameters));
        final ActionType actionType = PageParameterNames.ACTION_TYPE.getEnumFrom(pageParameters, ActionType.class);
        final String actionNameParms = PageParameterNames.ACTION_ID.getStringFrom(pageParameters);
        return new ActionMemento(owningSpec, actionType, actionNameParms);
    }
View Full Code Here

        final String actionNameParms = PageParameterNames.ACTION_ID.getStringFrom(pageParameters);
        return new ActionMemento(owningSpec, actionType, actionNameParms);
    }

    private static Mode actionModeFrom(PageParameters pageParameters) {
        final ActionMemento actionMemento = newActionMementoFrom(pageParameters);
        if(actionMemento.getAction().getParameterCount() == 0) {
            return Mode.RESULTS;
        }
        final List<String> listFrom = PageParameterNames.ACTION_ARGS.getListFrom(pageParameters);
        return listFrom != null && !listFrom.isEmpty()? Mode.RESULTS: Mode.PARAMETERS;
    }
View Full Code Here

            final ObjectAdapterMemento serviceAdapterMemento,
            final ObjectAction objectAction,
            final String linkId,
            final ActionPromptProvider actionPromptProvider) {
       
        final ActionMemento actionMemento = new ActionMemento(objectAction);
        final AbstractLink link = new Link<Object>(linkId) {
           
            private static final long serialVersionUID = 1L;

            @Override
            public void onClick() {
                final ObjectAction objectAction = actionMemento.getAction();
                final ConcurrencyChecking concurrencyChecking =
                        ConcurrencyChecking.concurrencyCheckingFor(objectAction.getSemantics());

                try {
                    final List<ObjectAdapterMemento> toggleMementosList = model.getToggleMementosList();
View Full Code Here

     * @param action
     * @return
     */
    public static ActionModel create(ObjectAdapter objectAdapter, ObjectAction action) {
        final ObjectAdapterMemento serviceMemento = ObjectAdapterMemento.Functions.fromAdapter().apply(objectAdapter);
        final ActionMemento homePageActionMemento = ObjectAdapterMemento.Functions.fromAction().apply(action);
        final Mode mode = action.getParameterCount() > 0? Mode.PARAMETERS : Mode.RESULTS;
        return new ActionModel(serviceMemento, homePageActionMemento, mode);
    }
View Full Code Here

    private static ActionMemento newActionMementoFrom(final PageParameters pageParameters) {
        final ObjectSpecId owningSpec = ObjectSpecId.of(PageParameterNames.ACTION_OWNING_SPEC.getStringFrom(pageParameters));
        final ActionType actionType = PageParameterNames.ACTION_TYPE.getEnumFrom(pageParameters, ActionType.class);
        final String actionNameParms = PageParameterNames.ACTION_ID.getStringFrom(pageParameters);
        return new ActionMemento(owningSpec, actionType, actionNameParms);
    }
View Full Code Here

        final String actionNameParms = PageParameterNames.ACTION_ID.getStringFrom(pageParameters);
        return new ActionMemento(owningSpec, actionType, actionNameParms);
    }

    private static Mode actionModeFrom(PageParameters pageParameters) {
        final ActionMemento actionMemento = newActionMementoFrom(pageParameters);
        if(actionMemento.getAction().getParameterCount() == 0) {
            return Mode.RESULTS;
        }
        final List<String> listFrom = PageParameterNames.ACTION_ARGS.getListFrom(pageParameters);
        return listFrom != null && !listFrom.isEmpty()? Mode.RESULTS: Mode.PARAMETERS;
    }
View Full Code Here

            final ObjectAdapterMemento serviceAdapterMemento,
            final ObjectAction objectAction,
            final String linkId,
            final ActionPromptProvider actionPromptProvider) {
       
        final ActionMemento actionMemento = new ActionMemento(objectAction);
        final AbstractLink link = new Link<Object>(linkId) {
           
            private static final long serialVersionUID = 1L;

            @Override
            public void onClick() {
                final ObjectAction objectAction = actionMemento.getAction();
                final ConcurrencyChecking concurrencyChecking =
                        ConcurrencyChecking.concurrencyCheckingFor(objectAction.getSemantics());

                try {
                    final List<ObjectAdapterMemento> toggleMementosList = model.getToggleMementosList();
View Full Code Here

     * @param action
     * @return
     */
    public static ActionModel create(ObjectAdapter objectAdapter, ObjectAction action) {
        final ObjectAdapterMemento serviceMemento = ObjectAdapterMemento.Functions.fromAdapter().apply(objectAdapter);
        final ActionMemento homePageActionMemento = ObjectAdapterMemento.Functions.fromAction().apply(action);
        final Mode mode = action.getParameterCount() > 0? Mode.PARAMETERS : Mode.RESULTS;
        return new ActionModel(serviceMemento, homePageActionMemento, mode);
    }
View Full Code Here

    private static ActionMemento newActionMementoFrom(final PageParameters pageParameters) {
        final ObjectSpecId owningSpec = ObjectSpecId.of(PageParameterNames.ACTION_OWNING_SPEC.getStringFrom(pageParameters));
        final ActionType actionType = PageParameterNames.ACTION_TYPE.getEnumFrom(pageParameters, ActionType.class);
        final String actionNameParms = PageParameterNames.ACTION_ID.getStringFrom(pageParameters);
        return new ActionMemento(owningSpec, actionType, actionNameParms);
    }
View Full Code Here

TOP

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

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.