Package org.brixcms.web.nodepage

Examples of org.brixcms.web.nodepage.BrixNodeWebPage


            String nodeURL = handler.getNodeURL();
            return encode(nodeURL, handler.getPageParameters(), null);
        } else if (requestHandler instanceof ListenerInterfaceRequestHandler) {
            ListenerInterfaceRequestHandler handler = (ListenerInterfaceRequestHandler) requestHandler;
            if (handler.getPage() instanceof BrixNodeWebPage) {
                BrixNodeWebPage page = (BrixNodeWebPage) handler.getPage();
                String componentPath = handler.getComponentPath();
                RequestListenerInterface listenerInterface = handler.getListenerInterface();
                Integer renderCount = null;
                if (listenerInterface.isIncludeRenderCount()) {
                    renderCount = page.getRenderCount();
                }
                PageInfo pageInfo = new PageInfo(page.getPageId());
                ComponentInfo componentInfo = new ComponentInfo(renderCount, requestListenerInterfaceToString(listenerInterface),
                        componentPath, handler.getBehaviorIndex());
                PageComponentInfo info = new PageComponentInfo(pageInfo, componentInfo);
                Url url = encode(page);
                encodePageComponentInfo(url, info);
                return url;
            } else {
                return null;
            }
        } else if (requestHandler instanceof RenderPageRequestHandler) {
            RenderPageRequestHandler handler = (RenderPageRequestHandler) requestHandler;
            if (handler.getPage() instanceof BrixNodeWebPage) {
                BrixNodeWebPage page = (BrixNodeWebPage) handler.getPage();
                PageInfo i = new PageInfo(page.getPageId());
                PageComponentInfo info = new PageComponentInfo(i, null);
                Url url = encode(page);
                encodePageComponentInfo(url, info);
                return url;
            } else {
                return null;
            }
        } else if (requestHandler instanceof BookmarkableListenerInterfaceRequestHandler) {
            BookmarkableListenerInterfaceRequestHandler target = (BookmarkableListenerInterfaceRequestHandler) requestHandler;
            BrixNodeWebPage page = (BrixNodeWebPage) target.getPage();
            BrixNode node = page.getModelObject();
            PageInfo info = new PageInfo(page.getPageId());
            return encode(node, page.getBrixPageParameters(), info);
        } else if (requestHandler instanceof BookmarkablePageRequestHandler
                && ((BookmarkablePageRequestHandler) requestHandler).getPageClass().equals(HomePage.class)) {
            BrixNode node = ((BrixRequestCycleProcessor) RequestCycle.get().getActiveRequestHandler()).getNodeForUriPath(Path.ROOT);
            return mapHandler(new BrixNodeRequestHandler(new BrixNodeModel(node)));
        } else {
View Full Code Here


    protected boolean isSelected(Reference reference, String url) {
        boolean eq = false;

        if (getPage() instanceof BrixNodeWebPage) {
            BrixNodeWebPage page = (BrixNodeWebPage) getPage();

            if (reference.getType() == Type.NODE) {
                eq = page.getModel().equals(reference.getNodeModel()) &&
                        comparePageParameters(page.getBrixPageParameters(), reference
                                .getParameters());
            } else {
                eq = url.equals(reference.getUrl()) &&
                        comparePageParameters(page.getBrixPageParameters(), reference
                                .getParameters());
            }
        }
        return eq;
    }
View Full Code Here

     * @return brix page
     * @throws BrixException if current request was not to a brix page
     */
    private static BrixNodeWebPage getCurrentPage() {
        IRequestHandler target = RequestCycle.get().getActiveRequestHandler();
        BrixNodeWebPage page = null;
        if (target != null && target instanceof IPageRequestHandler) {
            IRequestablePage p = ((IPageRequestHandler) target).getPage();
            if (p instanceof BrixNodeWebPage) {
                page = (BrixNodeWebPage) p;
            }
View Full Code Here

TOP

Related Classes of org.brixcms.web.nodepage.BrixNodeWebPage

Copyright © 2018 www.massapicom. 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.