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

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


    protected AbstractLink newLink(
            final String linkId,
            final ObjectAdapter objectAdapter, final ObjectAction action,
            final ActionPromptProvider actionPromptProvider) {
       
        final ActionPrompt actionPrompt = actionPromptProvider.getActionPrompt();
        if(actionPrompt != null) {
            final ActionModel actionModel = ActionModel.create(objectAdapter, action);
            actionModel.setActionPrompt(actionPrompt);
           
            final AjaxDeferredBehaviour ajaxDeferredBehaviour = determineDeferredBehaviour(action, actionModel);

            final AbstractLink link = new AjaxLink<Object>(linkId) {
                private static final long serialVersionUID = 1L;
               
                @Override
                public void onClick(AjaxRequestTarget target) {

                    if(ajaxDeferredBehaviour != null) {
                        ajaxDeferredBehaviour.initiate(target);
                    } else {
                        ActionPromptHeaderPanel titlePanel = new ActionPromptHeaderPanel(actionPrompt.getTitleId(), actionModel);
                        final ActionPanel actionPanel =
                                (ActionPanel) getComponentFactoryRegistry().createComponent(
                                        ComponentType.ACTION_PROMPT, actionPrompt.getContentId(), actionModel);

                        actionPanel.setShowHeader(false);

                        actionPrompt.setTitle(titlePanel, target);
                        actionPrompt.setPanel(actionPanel, target);
                        actionPanel.setActionPrompt(actionPrompt);
                        actionPrompt.showPrompt(target);

                        focusOnFirstParameter(target, actionPanel);
                    }
                }
View Full Code Here


    protected AbstractLink newLink(
            final String linkId,
            final ObjectAdapter objectAdapter, final ObjectAction action,
            final ActionPromptProvider actionPromptProvider) {
       
        final ActionPrompt actionPrompt = actionPromptProvider.getActionPrompt();
        if(actionPrompt != null) {
            final ActionModel actionModel = ActionModel.create(objectAdapter, action);
            actionModel.setActionPrompt(actionPrompt);
           
            final AjaxDeferredBehaviour ajaxDeferredBehaviour = determineDeferredBehaviour(action, actionModel);

            final AbstractLink link = new AjaxLink<Object>(linkId) {
                private static final long serialVersionUID = 1L;
               
                @Override
                public void onClick(AjaxRequestTarget target) {

                    if(ajaxDeferredBehaviour != null) {
                        ajaxDeferredBehaviour.initiate(target);
                    } else {
                        final ActionPanel actionPanel =
                                (ActionPanel) getComponentFactoryRegistry().createComponent(
                                        ComponentType.ACTION_PROMPT, actionPrompt.getContentId(), actionModel);
                       
                        actionPrompt.setPanel(actionPanel, target);
                        actionPanel.setActionPrompt(actionPrompt);
                        actionPrompt.show(target);

                        focusOnFirstParameter(target, actionPanel);
                    }
                }
View Full Code Here

    protected AbstractLink newLink(
            final String linkId,
            final ObjectAdapter objectAdapter, final ObjectAction action,
            final ActionPromptProvider actionPromptProvider) {
       
        final ActionPrompt actionPrompt = actionPromptProvider.getActionPrompt();
        if(actionPrompt != null) {
            final ActionModel actionModel = ActionModel.create(objectAdapter, action);
            actionModel.setActionPrompt(actionPrompt);
           
            final AjaxDeferredBehaviour ajaxDeferredBehaviour = determineDeferredBehaviour(action, actionModel);

            final AbstractLink link = new AjaxLink<Object>(linkId) {
                private static final long serialVersionUID = 1L;
               
                @Override
                public void onClick(AjaxRequestTarget target) {
                   
                    if(ajaxDeferredBehaviour != null) {
                        ajaxDeferredBehaviour.initiate(target);
                    } else {
                        final ActionPanel actionPromptPanel =
                                (ActionPanel) getComponentFactoryRegistry().createComponent(
                                        ComponentType.ACTION_PROMPT, actionPrompt.getContentId(), actionModel);
                       
                        actionPrompt.setPanel(actionPromptPanel, target);
                        actionPromptPanel.setActionPrompt(actionPrompt);
                        actionPrompt.show(target);
                       
                        target.focusComponent(actionPromptPanel);
                    }
                }
            };
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.wicket.model.models.ActionPrompt

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.