Examples of GWTJahiaNode


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

            public Object render(ModelData modelData, String s, ColumnData columnData, int i, int i1,
                                 ListStore listStore, Grid grid) {
                Button button = new Button(Messages.get("label.remove"), new SelectionListener<ButtonEvent>() {
                    @Override
                    public void componentSelected(ButtonEvent buttonEvent) {
                        final GWTJahiaNode node1 = (GWTJahiaNode) buttonEvent.getButton().getData("associatedNode");
                        catStore.remove(node1);
                    }
                });
                button.setData("associatedNode", modelData);
                button.setIcon(StandardIconsProvider.STANDARD_ICONS.minusRound());
                return button;
            }
        });
        action.setFixed(true);

        List<ColumnConfig> configs;
        final GWTJahiaNode node = engine.getNode();
        if (!engine.isExistingNode() || (PermissionsUtils.isPermitted("jcr:modifyProperties",node) && !node.isLocked())) {
            configs = Arrays.asList(columnConfig, action);
        } else {
            configs = Arrays.asList(columnConfig);
        }
View Full Code Here

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

            }
        });
        pageTree.setSelectionModel(new TreeGridClickSelectionModel());
        this.pageTree.getSelectionModel().addSelectionChangedListener(new SelectionChangedListener<GWTJahiaNode>() {
            @Override public void selectionChanged(SelectionChangedEvent<GWTJahiaNode> se) {
                final GWTJahiaNode node = se.getSelectedItem();
                if (node != null && !node.getPath().equals(editLinker.getMainModule().getPath()) &&
                    !node.getNodeTypes().contains("jnt:virtualsite") && !node.getNodeTypes().contains("jnt:navMenuText") &&
                        !node.getInheritedNodeTypes().contains("jmix:link") &&
                         PermissionsUtils.isPermitted("editModeAccess", node)
                        ) {
                    editLinker.onMainSelection(node.getPath(), null, null);
                }
            }
        });
        this.pageTree.getSelectionModel().setSelectionMode(Style.SelectionMode.SINGLE);
       
View Full Code Here

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

            boolean isAllowed = false;
            for (String f : folderTypes) {
                isAllowed |= nodes.get(0).getInheritedNodeTypes().contains(f);
            }
            if (activeItem != null && isAllowed) {
                GWTJahiaNode activeNode = (GWTJahiaNode) activeItem.getModel();
                GWTJahiaNode parent = pageTree.getTreeStore().getParent(activeNode);

                e.getStatus().setData(EditModeDNDListener.TARGET_NODE, activeNode);
                e.getStatus().setData(EditModeDNDListener.TARGET_PARENT, parent);
                e.getStatus().setData(EditModeDNDListener.TARGET_PATH, activeNode.get("path"));

                if (status == 1 && activeItem.isExpanded() && activeItem.getItemCount() > 0) {
                    List<GWTJahiaNode> children = pageTree.getTreeStore().getChildren(activeNode);
                    GWTJahiaNode n = children.get(0);
                    e.getStatus().setData(EditModeDNDListener.TARGET_NEXT_NODE, n);
                    e.getStatus().setData(EditModeDNDListener.TARGET_PARENT, activeNode);
                } else if (status == 1) {
                    List<GWTJahiaNode> children = pageTree.getTreeStore().getChildren(parent);
                    int next = children.indexOf(activeNode) + 1;
                    if (next < children.size()) {
                        GWTJahiaNode n = children.get(next);
                        e.getStatus().setData(EditModeDNDListener.TARGET_NEXT_NODE, n);
                    } else {
                        e.getStatus().setData(EditModeDNDListener.TARGET_NEXT_NODE, null);
                    }
                }
View Full Code Here

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

* Date: Sep 25, 2009
* Time: 6:57:51 PM
*/
public class RenameActionItem extends BaseActionItem {
    public void onComponentSelection() {
        final GWTJahiaNode selection = linker.getSelectionContext().getSingleSelection();
        if (selection != null) {
            if (selection.isLocked()) {
                Window.alert(selection.getName() + " is locked");
                return;
            }
            linker.loading(Messages.get("statusbar.renaming.label"));
            String newName = Window.prompt(Messages.get("confirm.newName.label") + " " + selection.getName(),
                    selection.getName());
            if (newName != null && newName.length() > 0 && !newName.equals(selection.getName())) {
                final boolean folder = !selection.isFile();
                JahiaContentManagementService.App.getInstance()
                        .rename(selection.getPath(), newName, new BaseAsyncCallback() {
                            public void onApplicationFailure(Throwable throwable) {
                                Window.alert(
                                        Messages.get("failure.rename.label") + "\n" + throwable.getLocalizedMessage());
                                linker.loaded();
                            }
View Full Code Here

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

        protected void onDragStart(DNDEvent e) {
            super.onDragStart(e);
            Selection.getInstance().hide();

            List<GWTJahiaNode> l = new ArrayList<GWTJahiaNode>();
            final GWTJahiaNode node = PagesTabItem.this.pageTree.getSelectionModel().getSelectedItem();
            if (node.getInheritedNodeTypes().contains("jmix:navMenuItem") && PermissionsUtils.isPermitted("jcr:removeNode", node) && !node.isLocked()) {
                l.add(node.getReferencedNode()!=null?node.getReferencedNode():node);
                e.getStatus().setData(EditModeDNDListener.SOURCE_TYPE, EditModeDNDListener.PAGETREE_TYPE);
                e.getStatus().setData(EditModeDNDListener.SOURCE_NODES, l);
            } else {
                e.getStatus().setData(EditModeDNDListener.SOURCE_TYPE, null);
                e.getStatus().setStatus(false);
View Full Code Here

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

    @Override
    public void init(NodeHolder engine, AsyncTabItem tab, String locale) {
        if (engine.getAcl() != null) {
            tab.setProcessed(true);

            GWTJahiaNode node;
            if (engine.getNode() != null) {
                node = engine.getNode();
            } else {
                node = engine.getTargetNode();
            }

            rolesEditor = new AclEditor(engine.getAcl(), node.getAclContext(), roleGroups);
            rolesEditor.setCanBreakInheritance(canBreakInheritance);
            if (!(node.getProviderKey().equals("default") || node.getProviderKey().equals("jahia"))) {
                rolesEditor.setReadOnly(true);
            } else {
                rolesEditor.setReadOnly(!PermissionsUtils.isPermitted("jcr:modifyAccessControl", node) || node.isLocked());
            }

            tab.setLayout(new FitLayout());
            rolesEditor.addNewAclPanel(tab);
        }
View Full Code Here

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

             */
            public Object render(GWTJahiaWorkflowHistoryItem model, String property, ColumnData config,
                                 int rowIndex, int colIndex,
                                 ListStore<GWTJahiaWorkflowHistoryItem> gwtJahiaWorkflowHistoryItemListStore,
                                 Grid<GWTJahiaWorkflowHistoryItem> gwtJahiaWorkflowHistoryItemGrid) {
                final GWTJahiaNode wrapper = (GWTJahiaNode) model.getProperties().get("nodeWrapper");

                if (wrapper != null) {
                    return new Label(wrapper.getDisplayName() + " (" + wrapper.getPath() + ")");
                }
                List<GWTJahiaWorkflowHistoryItem> models = gwtJahiaWorkflowHistoryItemListStore.getModels();
                for (final GWTJahiaWorkflowHistoryItem historyItem : models) {
                    final GWTJahiaNode nodewrapper = (GWTJahiaNode) historyItem.getProperties().get("nodeWrapper");
                    if (nodewrapper!=null && historyItem.getProcessId().equals(model.getProcessId()) &&
                        historyItem instanceof GWTJahiaWorkflowHistoryProcess) {
                        Button button = new Button(Messages.get("label.preview"));
                        button.addSelectionListener(new SelectionListener<ButtonEvent>() {
                            @Override
                            public void componentSelected(ButtonEvent ce) {
                                String path = nodewrapper.getPath();
                                String locale = JahiaGWTParameters.getLanguage();
                                JahiaContentManagementService.App.getInstance().getNodeURL("render", path, null, null,
                                        "default", locale, new BaseAsyncCallback<String>() {
                                            public void onSuccess(String url) {
                                                Window window = new Window();
View Full Code Here

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

            public void onFailure(Throwable reason) {
            }

            public void onSuccess() {
                LinkerSelectionContext lh = linker.getSelectionContext();
                GWTJahiaNode parent = lh.getSingleSelection();
                if (parent != null) {
                    final com.extjs.gxt.ui.client.widget.Window w = new com.extjs.gxt.ui.client.widget.Window();
                    w.setHeading(Messages.get("label.deployNewPortlet", "New portlets"));
                    w.setModal(true);
                    w.setResizable(false);
View Full Code Here

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

public class SwitchModeActionItem extends BaseActionItem {

    public void handleNewLinkerSelection() {
        final String workspace = getPropertyValue(getGwtToolbarItem(), "workspace");
        if (workspace.equalsIgnoreCase("live")) {
            final GWTJahiaNode node = linker.getSelectionContext().getMainNode();
            if (node == null || node.getAggregatedPublicationInfo().getStatus() == GWTJahiaPublicationInfo.NOT_PUBLISHED
                    || node.getAggregatedPublicationInfo().getStatus() == GWTJahiaPublicationInfo.UNPUBLISHED) {
                setEnabled(false);
            } else {
                setEnabled(true);
            }
        }
View Full Code Here

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

    @Override
    public void onComponentSelection() {
        final String workspace = getPropertyValue(getGwtToolbarItem(), "workspace");
        final String urlParams = getPropertyValue(getGwtToolbarItem(), "urlParams");
        final String servlet = getPropertyValue(getGwtToolbarItem(), "servlet");
        final GWTJahiaNode node = linker.getSelectionContext().getMainNode();
        if (node != null) {
            String path = node.getPath();
            String locale = JahiaGWTParameters.getLanguage();
            JahiaContentManagementService.App.getInstance()
                    .getNodeURL(servlet, path, null, null, workspace, locale, new BaseAsyncCallback<String>() {
                        public void onSuccess(String url) {
                            String url1 = url + ((urlParams !=null) ? "?" + urlParams :"");
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.