Package org.brixcms

Examples of org.brixcms.BrixNodeModel


        } else if (requestTarget instanceof BookmarkablePageRequestHandler
                && ((BookmarkablePageRequestHandler) requestTarget).getPageClass().equals(
                HomePage.class)) {
            BrixNode node = ((BrixRequestCycleProcessor) RequestCycle.get().getActiveRequestHandler())
                    .getNodeForUriPath(Path.ROOT);
            return encode(new BrixNodeRequestHandler(new BrixNodeModel(node)));
        } else {
            return null;
        }
    }
View Full Code Here


        }
    }

    public IRequestHandler getRequestTarget() {
        final IModel<BrixNode> model = getNodeModel();
        return new BrixNodeRequestHandler(model != null ? model : new BrixNodeModel("invalidId",
                "invalidWorkspace"), parameters != null ? parameters : new BrixPageParameters()) {
            @Override
            public String getNodeURL() {
                if (getType() == Type.NODE) {
                    return model != null ? super.getNodeURL() : "";
View Full Code Here

        } else {
            BrixNode pageNode = (BrixNode) (tileNode.hasProperty("pageNode") ? tileNode.getProperty("pageNode")
                    .getNode() : null);

            if (pageNode != null) {
                add(new PageRenderingPanel("view", new BrixNodeModel(pageNode)));
            } else {
                add(new Label("view", "Page not found."));
            }
        }
    }
View Full Code Here

        @Override
        protected IModel<BrixNode> getListItemModel(IModel<? extends List<BrixNode>> listViewModel,
                                                    int index) {
            List<BrixNode> nodes = listViewModel.getObject();
            return new BrixNodeModel(nodes.get(index));
        }
View Full Code Here

        }
        return key;
    }

    public VariableTag(BrixNode pageNode, Tag delegate) {
        this.pageNodeModel = new BrixNodeModel(pageNode);
        this.pageNodeModel.detach();
        this.delegate = delegate;
    }
View Full Code Here

    }


    public Map<String, String> getAttributeMap() {
        Map<String, String> original = getDelegate().getAttributeMap();
        BrixNode pageNode = new BrixNodeModel(pageNodeModel).getObject();
        if (pageNode instanceof VariableValueProvider) {
            VariableValueProvider variableValueProvider = (VariableValueProvider) pageNode;
            Map<String, String> result = new HashMap<String, String>();
            for (Entry<String, String> e : original.entrySet()) {
                String k = getKey(e.getValue());
View Full Code Here

public class VariableText implements Text, VariableKeyProvider {
    private final BrixNodeModel pageNodeModel;
    private final String key;

    public VariableText(BrixNode pageNode, String key) {
        this.pageNodeModel = new BrixNodeModel(pageNode);
        this.key = key;
        this.pageNodeModel.detach();
    }
View Full Code Here

        @Override
        protected IModel<BrixNode> getListItemModel(IModel<? extends List<BrixNode>> listViewModel,
                                                    int index) {
            List<BrixNode> nodes = listViewModel.getObject();
            return new BrixNodeModel(nodes.get(index));
        }
View Full Code Here

        this.pageNodeModel.detach();
    }


    public String getText() {
        BrixNode node = new BrixNodeModel(pageNodeModel).getObject();
        if (node instanceof VariableValueProvider) {
            String value = ((VariableValueProvider) node).getVariableValue(key);
            return value != null ? value : "[" + key + "]";
        } else {
            return "Couldn't resolve variable '" + key + "'";
View Full Code Here

     * @param tileName
     */
    public TileTag(String name, Type type, Map<String, String> attributeMap, AbstractContainer tileContainerNode, String tileName) {
        super(name, type, attributeMap);
        this.tileName = tileName;
        tileContainerNodeModel = new BrixNodeModel(tileContainerNode);
        tileContainerNodeModel.detach();
    }
View Full Code Here

TOP

Related Classes of org.brixcms.BrixNodeModel

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.