private static boolean isDebugPage(String viewId) { return Init.instance().isDebugPageAvailable() && viewId.startsWith("/debug."); }
public static boolean isDebugPage() { return Init.instance().isDebugPageAvailable() && getCurrentViewId() != null && getCurrentViewId().startsWith("/debug."); }
@Create public void initialize() throws Exception { List<ExceptionHandler> deferredHandlers = new ArrayList<ExceptionHandler>(); deferredHandlers.add(parse("/WEB-INF/exceptions.xml")); // deprecated for (String pageFile: Pages.instance().getResources()) { deferredHandlers.add(parse(pageFile)); } addHandler(new AnnotationRedirectHandler()); addHandler(new AnnotationErrorHandler()); if (Init.instance().isDebugPageAvailable()) { addHandler(new DebugPageHandler()); } for (ExceptionHandler handler: deferredHandlers) { addHandler(handler); } }