Examples of GWTJahiaNode


Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

            e.getStatus().setData(EditModeDNDListener.SOURCE_TYPE, EditModeDNDListener.CONTENT_SOURCE_TYPE);
            List<GWTJahiaNode> nodes = new ArrayList<GWTJahiaNode>(1);
            nodes.add((GWTJahiaNode) listView.getSelectionModel().getSelectedItem());
            e.setData(nodes);
            List<GWTJahiaNode> list = new ArrayList<GWTJahiaNode>(1);
            GWTJahiaNode selectedItem = (GWTJahiaNode) listView.getSelectionModel().getSelectedItem();
            list.add(selectedItem.getReferencedNode()!=null?selectedItem.getReferencedNode():selectedItem);
            e.getStatus().setData("size", list.size());
            e.getStatus().setData(EditModeDNDListener.SOURCE_NODES, list);
            e.setOperation(DND.Operation.COPY);
            super.onDragStart(e);
        }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

    public void setPasteInMainNode(boolean pasteInMainNode) {
        this.pasteInMainNode = pasteInMainNode;
    }

    public void onComponentSelection() {
        GWTJahiaNode m = linker.getSelectionContext().getSingleSelection();
        if (pasteInMainNode) {
            m = linker.getSelectionContext().getMainNode();
        }
        if (m != null) {
            linker.loading(Messages.get("statusbar.pasting.label"));
            final CopyPasteEngine copyPasteEngine = CopyPasteEngine.getInstance();
            JahiaContentManagementService
                    .App.getInstance().paste(JCRClientUtils.getPathesList(copyPasteEngine.getCopiedPaths()), m.getPath(), null, copyPasteEngine.isCut(), new BaseAsyncCallback() {
                public void onApplicationFailure(Throwable throwable) {
                    Window.alert(Messages.get("failure.paste.label") + "\n" + throwable.getLocalizedMessage());
                    linker.loaded();
                }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

* Time: 6:58:02 PM
*
*/
public class UnmountActionItem extends BaseActionItem  {
    public void onComponentSelection() {
        GWTJahiaNode selection = linker.getSelectionContext().getSingleSelection();
        if (selection != null) {
            if (selection.isLocked()) {
                Window.alert(Messages.get("failure.unmountLock1.label") + " " + selection.getName() + Messages.get("failure.unmountLock2.label") + " " + selection.getLockInfos());
            } else if (Window.confirm(Messages.get("confirm.unmount.label") + " " + selection.getName() + " ?")) {
                linker.loading(Messages.get("statusbar.unmounting.label"));
                List<String> selectedPaths = new ArrayList<String>(1);
                selectedPaths.add(selection.getPath());
                JahiaContentManagementService.App.getInstance().deletePaths(selectedPaths, new BaseAsyncCallback() {
                    public void onApplicationFailure(Throwable throwable) {
                        Window.alert(Messages.get("failure.unmount.label") + "\n" + throwable.getLocalizedMessage());
                        linker.loaded();
                    }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

    private void addDeployListener(final MenuItem item, final Linker linker, final String destinationPath) {
        item.addSelectionListener(new SelectionListener<MenuEvent>() {
            @Override
            public void componentSelected(MenuEvent ce) {
                GWTJahiaNode node = linker.getSelectionContext().getMainNode();
                String nodePath = node.getPath();

                final String[] parts = nodePath.split("/");
                nodePath = "/" + parts[1] + "/" + parts[2];
                linker.loading(Messages.get("org.jahia.admin.site.ManageTemplates.deploymentInProgress", "Your templates are being deployed..."));
                JahiaContentManagementService.App.getInstance()
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

        super.init(gwtToolbarItem, linker);    //To change body of overridden methods use File | Settings | File Templates.
        setEnabled(false);
    }

    public void handleNewLinkerSelection() {
        GWTJahiaNode gwtJahiaNode = linker.getSelectionContext().getSingleSelection();
        if (gwtJahiaNode != null) {
            updateTitle(getGwtToolbarItem().getTitle() + " " + gwtJahiaNode.getName());
        }
    }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

        }
    }

    public void handleNewLinkerSelection() {
        LinkerSelectionContext lh = linker.getSelectionContext();
        GWTJahiaNode n;
        if (useMainNode) {
            n = lh.getMainNode();
        }   else {
            n = lh.getSingleSelection();
        }
        if (n != null) {
            boolean isValidParent = false;
            for (String s : parentTypesAsList) {
                isValidParent = n.getNodeTypes().contains(s) || n.getInheritedNodeTypes().contains(s);
                if (isValidParent) {
                    break;
                }
            }
            setEnabled(isValidParent
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

        EngineLoader.showEditEngine(linker, linker.getSelectionContext().getSingleSelection());
    }

    public void handleNewLinkerSelection() {
        LinkerSelectionContext lh = linker.getSelectionContext();
        final GWTJahiaNode singleSelection = lh.getSingleSelection();
        setEnabled(singleSelection != null && PermissionsUtils.isPermitted("jcr:modifyProperties", lh.getSelectionPermissions()));
    }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

            e.getStatus().setData(EditModeDNDListener.SOURCE_TYPE, EditModeDNDListener.CONTENT_SOURCE_TYPE);
            List<GWTJahiaNode> nodes = new ArrayList<GWTJahiaNode>(1);
            nodes.add((GWTJahiaNode) listView.getSelectionModel().getSelectedItem());
            e.setData(nodes);
            List<GWTJahiaNode> list = new ArrayList<GWTJahiaNode>(1);
            GWTJahiaNode selectedItem = (GWTJahiaNode) listView.getSelectionModel().getSelectedItem();
            list.add(selectedItem.getReferencedNode()!=null?selectedItem.getReferencedNode():selectedItem);
            e.getStatus().setData("size", list.size());
            e.getStatus().setData(EditModeDNDListener.SOURCE_NODES, list);
            e.setOperation(DND.Operation.COPY);
            super.onDragStart(e);
        }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

                        menu.add(item);
                        displayMenu = true;
                    }
                }
            } else if (pages.size() == 1) {
                GWTJahiaNode page = pages.get(0);
                if (PermissionsUtils.isPermitted("jcr:write", page.getPermissions())) {
                    addSelectionListener(page, getContextMenuItem(), linker);
                    displayMenu = true;
                }
            }
        }
View Full Code Here

Examples of org.jahia.ajax.gwt.client.data.node.GWTJahiaNode

    private void addSelectionListener(final GWTJahiaNode page, MenuItem item, final Linker linker) {
        item.addSelectionListener(new SelectionListener<MenuEvent>() {
            @Override
            public void componentSelected(MenuEvent ce) {
                LinkerSelectionContext lh = linker.getSelectionContext();
                GWTJahiaNode target = lh.getSingleSelection();
                if (target != null) {
                    JahiaContentManagementService.App.getInstance().pasteReferences(
                            Arrays.asList(target.getPath()), page.getPath(), null,
                            new BaseAsyncCallback() {
                                public void onApplicationFailure(Throwable caught) {
                                    Info.display("Portal Components",
                                            "Error while making your component available for users in their portal page.");
                                }
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.