Package freemarker.template

Examples of freemarker.template.TemplateCollectionModel


        }
       
       
        void runLoop(Environment env) throws TemplateException, IOException {
            if (list instanceof TemplateCollectionModel) {
                TemplateCollectionModel baseListModel = (TemplateCollectionModel)list;
                TemplateModelIterator it = baseListModel.iterator();
                hasNext = it.hasNext();
                while (hasNext) {
                    loopVar = it.next();
                    hasNext = it.hasNext();
                    if (nestedBlock != null) {
View Full Code Here


                list.add(unwrap(seq.get(i), nullModel, permissive));
            }
            return list;
        }
        if(model instanceof TemplateCollectionModel) {
            TemplateCollectionModel coll = (TemplateCollectionModel)model;
            ArrayList list = new ArrayList();
            TemplateModelIterator it = coll.iterator();           
            while(it.hasNext()) {
                list.add(unwrap(it.next(), nullModel, permissive));
            }
            return list;
        }
View Full Code Here

                return 0;
            }
        });

        // TemplateCollectionModel
        params.put("property9", new TemplateCollectionModel() {
            public TemplateModelIterator iterator() throws TemplateModelException {
                return new TemplateModelIterator() {
                    private Iterator i;
                    {
                        i = Collections.EMPTY_LIST.iterator();
View Full Code Here

                return 0;
            }
        });

        // TemplateCollectionModel
        params.put("property9", new TemplateCollectionModel() {
            public TemplateModelIterator iterator() throws TemplateModelException {
                return new TemplateModelIterator() {
                    private Iterator i;
                    {
                        i = Collections.EMPTY_LIST.iterator();
View Full Code Here

                return 0;
            }
        });

        // TemplateCollectionModel
        params.put("property9", new TemplateCollectionModel() {
            public TemplateModelIterator iterator() throws TemplateModelException {
                return new TemplateModelIterator() {
                    private Iterator i;
                    {
                        i = Collections.EMPTY_LIST.iterator();
View Full Code Here

                return 0;
            }
        });

        // TemplateCollectionModel
        params.put("property9", new TemplateCollectionModel() {
            public TemplateModelIterator iterator() throws TemplateModelException {
                return new TemplateModelIterator() {
                    private Iterator i;
                    {
                        i = Collections.EMPTY_LIST.iterator();
View Full Code Here

                list.add(unwrap(seq.get(i), nullModel, permissive));
            }
            return list;
        }
        if(model instanceof TemplateCollectionModel) {
            TemplateCollectionModel coll = (TemplateCollectionModel)model;
            ArrayList list = new ArrayList();
            TemplateModelIterator it = coll.iterator();           
            while(it.hasNext()) {
                list.add(unwrap(it.next(), nullModel, permissive));
            }
            return list;
        }
View Full Code Here

        }
       
       
        void runLoop(Environment env) throws TemplateException, IOException {
            if (list instanceof TemplateCollectionModel) {
                TemplateCollectionModel baseListModel = (TemplateCollectionModel)list;
                TemplateModelIterator it = baseListModel.iterator();
                hasNext = it.hasNext();
                while (hasNext) {
                    loopVar = it.next();
                    hasNext = it.hasNext();
                    if (nestedBlock != null) {
View Full Code Here

    static class keysBI extends BuiltInForHashEx {

        TemplateModel calculateResult(TemplateHashModelEx hashExModel, Environment env)
                throws TemplateModelException, InvalidReferenceException {
            TemplateCollectionModel keys = hashExModel.keys();
            if (keys == null) throw newNullPropertyException("keys", hashExModel, env);
            return keys instanceof TemplateSequenceModel ? keys : new CollectionAndSequence(keys);
        }
View Full Code Here

    }
   
    static class valuesBI extends BuiltInForHashEx {
        TemplateModel calculateResult(TemplateHashModelEx hashExModel, Environment env)
                throws TemplateModelException, InvalidReferenceException {
            TemplateCollectionModel values = hashExModel.values();
            if (values == null) throw newNullPropertyException("values", hashExModel, env);
            return values instanceof TemplateSequenceModel ? values : new CollectionAndSequence(values);
        }
View Full Code Here

TOP

Related Classes of freemarker.template.TemplateCollectionModel

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.