Package org.jasig.portal.layout

Examples of org.jasig.portal.layout.IUserLayoutManager.saveUserLayout()


                                getMessage("error.add.portlet.in.tab", "Can''t add a new favorite", locale)));
            }

            try {
                // save the user's layout
                ulm.saveUserLayout();
            } catch (Exception e) {
                log.warn("Error saving layout", e);
                return new ModelAndView("jsonView",
                        Collections.singletonMap("response",
                                getMessage("error.persisting.layout.change", "Can''t add a new favorite", locale)));
View Full Code Here


                        log.warn("Error deleting the node" + channelId + "from favorites for user " + (upm.getPerson() == null ? "unknown" : upm.getPerson().getID()));
                        response.setStatus(HttpServletResponse.SC_ACCEPTED);
                        return new ModelAndView("jsonView", Collections.singletonMap("response", getMessage("error.remove.favorite", "Can''t remove favorite", locale)));
                    }
                    // save the user's layout
                    ulm.saveUserLayout();
                } catch (Exception e) {
                    log.warn("Error saving layout", e);
                    response.setStatus(HttpServletResponse.SC_ACCEPTED);
                    return new ModelAndView("jsonView", Collections.singletonMap("response", getMessage("error.remove.favorite", "Can''t remove favorite", locale)));
                }
View Full Code Here

                model.put("response", getMessage("success.remove.portlet", "Removed from Favorites successfully", locale));
                return new ModelAndView("jsonView", model);
            }
        }
        // save the user's layout
        ulm.saveUserLayout();
        return new ModelAndView("jsonView", Collections.singletonMap("response", getMessage("error.finding.favorite", "Can''t find favorite", locale)));
    }

  /**
   * Add a new channel.
View Full Code Here

    String nodeId = node.getId();

    try {
      // save the user's layout
            ulm.saveUserLayout();
            if(addedWindowState!=null){
                IPortletWindow portletWindow = this.portletWindowRegistry.getOrCreateDefaultPortletWindowByFname(request, channel.getFunctionalName());
                portletWindow.setWindowState(addedWindowState);
                this.portletWindowRegistry.storePortletWindow(request, portletWindow);
            }
View Full Code Here

    // add the tab to the layout
    ulm.addNode(newTab, ulm.getRootFolderId(), null);

    try {
      // save the user's layout
            ulm.saveUserLayout();
    } catch (Exception e) {
      log.warn("Error saving layout", e);
    }

    // get the id of the newly added tab
View Full Code Here

        }

        try {
            // save the user's layout
            ulm.saveUserLayout();
        } catch (Exception e) {
            log.warn("Error saving layout", e);
        }

    return new ModelAndView("jsonView", Collections.singletonMap("tabId", tabId));
View Full Code Here

    final boolean updated = ulm.updateNode(tab);

    if (updated) {
        try {
          // save the user's layout
                ulm.saveUserLayout();
        } catch (Exception e) {
          log.warn("Error saving layout", e);
        }

        //TODO why do we have to do this, shouldn't modifying the layout be enough to trigger a full re-render (layout's cache key changes)
View Full Code Here

        ulm.updateNode(node);

        try {
            // save the user's layout
            ulm.saveUserLayout();
        } catch (Exception e) {
            log.warn("Error saving layout", e);
        }

        return new ModelAndView("jsonView", Collections.EMPTY_MAP);
View Full Code Here

            if (nodeDescription.isDeleteAllowed()) {

                boolean nodeSuccessfullyDeleted = layoutManager.deleteNode(nodeId);

                if (nodeSuccessfullyDeleted) {
                    layoutManager.saveUserLayout();

                    response.setRenderParameter("successMessageCode", "favorites.unfavorite.success.parameterized");

                    IUserLayout updatedLayout = layoutManager.getUserLayout();
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.