Package com.nexirius.framework.htmlview

Examples of com.nexirius.framework.htmlview.VariableStore


            throw new Exception("Child " + childName + " of " + parser.getModel().getFieldName() + " is not an ArrayModel");
        }

        ArrayModel array = (ArrayModel) child;
        DataModelEnumeration e = array.getEnumeration();
        VariableStore variableStore = parser.getResolver().getVariableStore();
        int index = 0;
        String oldIndex = variableStore.getValueOf(VariableStore.INDEX);
        String oldCount = variableStore.getValueOf(VariableStore.COUNT);
        String template = getTemplate();
        boolean childIsEditor = parser.isEditor();
        Boolean type = getIsEditor();

        if (type != null) {
            childIsEditor = type.booleanValue();
        }

        variableStore.setVariable(VariableStore.COUNT, Integer.toString(array.getSize()));

        while (e.hasMore()) {
            DataModel item = e.next();

            variableStore.setVariable(VariableStore.INDEX, Integer.toString(index + 1));

            byte result[] = parser.getResolver().resolve(sessionVariable, item, template, childIsEditor);

            parser.getOut().write(result);

            ++index;
        }

        variableStore.setVariable(VariableStore.COUNT, oldCount);
        variableStore.setVariable(VariableStore.INDEX, oldIndex);
    }
View Full Code Here

TOP

Related Classes of com.nexirius.framework.htmlview.VariableStore

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.