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

Examples of org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel


                    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);
                    }
                }

                private void focusOnFirstParameter(AjaxRequestTarget target, ActionPanel actionPanel) {

                    // first, force all parameters to build themselves...
                    actionPanel.visitChildren(new IVisitor<Component, Component>() {
                        @Override
                        public void component(Component object, IVisit<Component> visit) {
                            if (object instanceof ScalarPanelAbstract) {
                                ScalarPanelAbstract spa = (ScalarPanelAbstract) object;
                                spa.forceBuildGui();
                                visit.dontGoDeeper();
                            }
                        }
                    });

                    // second, go searching for the first <input> in the action panel.
                    final Component actionPanelFirstParam = actionPanel.visitChildren(new IVisitor<Component, Component>() {
                        @Override
                        public void component(Component object, IVisit<Component> visit) {
                            if (object instanceof FormComponent &&
                                !"scalarIfCompact".equals(object.getId()) &&
                                object.getOutputMarkupId()) {
View Full Code Here


                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);
                    }
                }

                private void focusOnFirstParameter(AjaxRequestTarget target, ActionPanel actionPanel) {

                    // first, force all parameters to build themselves...
                    actionPanel.visitChildren(new IVisitor<Component, Component>() {
                        @Override
                        public void component(Component object, IVisit<Component> visit) {
                            if (object instanceof ScalarPanelAbstract) {
                                ScalarPanelAbstract spa = (ScalarPanelAbstract) object;
                                spa.forceBuildGui();
                                visit.dontGoDeeper();
                            }
                        }
                    });

                    // second, go searching for the first <input> in the action panel.
                    final Component actionPanelFirstParam = actionPanel.visitChildren(new IVisitor<Component, Component>() {
                        @Override
                        public void component(Component object, IVisit<Component> visit) {
                            if (object instanceof FormComponent &&
                                !"scalarIfCompact".equals(object.getId()) &&
                                object.getOutputMarkupId()) {
View Full Code Here

                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

        actionList.addAll(serviceActionsFor);
    }

    @Override
    public void onClick(final ActionModel actionModel) {
        final ActionPanel actionPanel = new ActionPanel(actionFindUsingComponent.getComponentType().toString(), actionModel);
        actionFindUsingComponent.replaceWith(actionPanel);
    }
View Full Code Here

        actionList.addAll(serviceActionsFor);
    }

    @Override
    public void onClick(final ActionModel actionModel) {
        final ActionPanel actionPanel =
            new ActionPanel(actionFindUsingComponent.getComponentType().toString(), actionModel);
        actionFindUsingComponent.replaceWith(actionPanel);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel

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.