@Override protected boolean acceptsPathParameter() { return (classAccessor != null && pageInstance.getParameters().size() < classAccessor.getKeyProperties().length); }
public Resolution preparePage() { if(!pageInstance.getParameters().isEmpty()) { return new ErrorResolution(404); } return null; }
public Resolution preparePage() { if(!pageInstance.getParameters().isEmpty()) { return new ErrorResolution(404); } return null; }
public Resolution preparePage() { if(!pageInstance.getParameters().isEmpty()) { return new ErrorResolution(404); } return null; }
public Resolution preparePage() { if(!PageActionLogic.supportsDetail(getClass()) && !pageInstance.getParameters().isEmpty()) { return new ErrorResolution(404); } return null; } }
public Resolution preparePage() { if(!pageInstance.getParameters().isEmpty()) { return new ErrorResolution(404); } chartConfiguration = (JFreeChartConfiguration) pageInstance.getConfiguration(); return null; }
public Resolution preparePage() { if(!pageInstance.getParameters().isEmpty()) { return new ErrorResolution(404); } chartConfiguration = (ChartJsConfiguration) pageInstance.getConfiguration(); return null; }
public Resolution preparePage() { textConfiguration = (TextConfiguration) pageInstance.getConfiguration(); if(!pageInstance.getParameters().isEmpty()) { if(pageInstance.getParameters().size() == 1 && SecurityLogic.hasPermissions( portofinoConfiguration, pageInstance, SecurityUtils.getSubject(), AccessLevel.EDIT)) { return new ForwardResolution("/m/pageactions/text/create-page.jsp"); } else { return new ErrorResolution(404); } } return null; }
/** * This is called to process a piece (fragment) of the requested URL. If the fragment matches a child page, that * page is instantiated and initialized. Otherwise, the fragment is taken to be a parameter for the current page. * Subclasses can override this method if they want to handle child pages differently (e.g. having them stored * elsewhere). * @param pathFragment the fragment to process. In path /foo/bar/baz, foo, bar and baz are three different fragments. * @return the object that will potentially continue path dispatch if there are other fragments to consume. This is * either a child page or <code>this</code>. A null return value means that the dispatch failed (no child page * exists and this page does not accept parameters). */ @Override public DispatchElement consumePathFragment(String pathFragment) { boolean acceptsPathParameter = acceptsPathParameter(); if(!acceptsPathParameter || pageInstance.getParameters().isEmpty()) { PageAction subpage = DispatcherLogic.getSubpage(portofinoConfiguration, pageInstance, pathFragment); if (subpage != null) { HttpServletRequest request = ElementsThreadLocals.getHttpServletRequest(); Injections.inject(subpage, request.getServletContext(), request); return subpage; } } if(acceptsPathParameter) { pageInstance.getParameters().add(pathFragment); return this; } else { return null; } }
/** * Returns the layout that drives the display of the embedded children of this page. * If this page instance has parameters, the detail layout is returned; else, the regular layout is returned. * @return the layout. */ public Layout getLayout() { if(getParameters().isEmpty()) { return getPage().getLayout(); } else { return getPage().getDetailLayout(); } }
/** * Sets the layout that drives the display of the embedded children of this page. * If this page instance has parameters, the detail layout is set; else, the regular layout is set. * @param layout the new layout. */ public void setLayout(Layout layout) { if(getParameters().isEmpty()) { getPage().setLayout(layout); } else { getPage().setDetailLayout(layout); } }
public Resolution preparePage() { if(!pageInstance.getParameters().isEmpty()) { return new ErrorResolution(404); } m2mConfiguration = (ManyToManyConfiguration) pageInstance.getConfiguration(); if(m2mConfiguration != null && m2mConfiguration.getActualRelationDatabase() != null) { String databaseName = m2mConfiguration.getActualRelationDatabase().getDatabaseName(); session = persistence.getSession(databaseName); } return null; }
items.add(item); if(!current.getParameters().isEmpty()) { for(String param : current.getParameters()) { sb.append("/").append(param);
List<String> parameters = pageInstance.getParameters(); if(!parameters.isEmpty()) { String encoding = getUrlEncoding();
currentNavigationItem.getChildNavigationItems(); prefix = currentNavigationItem.getPath() + "/"; for(String param : current.getParameters()) { prefix += param + "/"; selected = (i == pageInstancesLength - 2); description = next.getDescription(); parameters = next.getParameters(); currentNavigationItem = new NavigationItem( next.getTitle(), next.getDescription(), path, next.getParameters(), true, selected, false); currentChildNavigationItems.add(currentNavigationItem);
List<String> params = newParent.getParameters(); newParent = new PageInstance(newParent.getParent(), newParent.getDirectory(), oldParent.getPage(), null); newParent.getParameters().addAll(params);