BaseFragmentElement rootFragment = pageOrTemplate.getRootFragment(); if (!(rootFragment instanceof Fragment))
BaseFragmentElement rootFragment = pageOrTemplate.getRootFragment(); if (!(rootFragment instanceof Fragment))
page.setShortTitle(s); String l = getActionParameter(requestContext, DEFAULT_LAYOUT); if (!isBlank(l) && (page.getRootFragment() instanceof Fragment)) Fragment rootFragment = (Fragment)page.getRootFragment(); rootFragment.setName(getActionParameter(requestContext, DEFAULT_LAYOUT));
BaseFragmentElement rootFragment = pageOrTemplate.getRootFragment(); if (!(rootFragment instanceof Fragment))
rootFragment = definition.getRootFragment(); rootTemplate = true; rootFragment = definition.getRootFragment();
/** * Copy shared fragments attributes. * * @param source source fragments * @param copyIds flag indicating whether to copy or preserve fragment ids * @param dest destination fragments * @throws NodeException on error creating fragments */ protected void copyFragmentsAttributes(BaseFragmentsElement source, boolean copyIds, BaseFragmentsElement dest) throws NodeException { // create the new page and copy attributes dest.setTitle(source.getTitle()); dest.setShortTitle(source.getShortTitle()); dest.setVersion(source.getVersion()); // copy locale specific metadata dest.getMetadata().copyFields(source.getMetadata().getFields()); // copy security constraints SecurityConstraints srcSecurity = source.getSecurityConstraints(); if ((srcSecurity != null) && !srcSecurity.isEmpty()) { SecurityConstraints copiedSecurity = copySecurityConstraints(PAGE_NODE_TYPE, srcSecurity); dest.setSecurityConstraints(copiedSecurity); } // copy fragments BaseFragmentElement root = copyFragment(source.getRootFragment(), null, copyIds); dest.setRootFragment(root); }
BaseFragmentElement pageRootFragment = pageOrTemplate.getRootFragment(); if (pageRootFragment instanceof FragmentReference)