Example usage for javax.servlet.jsp.tagext VariableInfo getVarName

List of usage examples for javax.servlet.jsp.tagext VariableInfo getVarName

Introduction

In this page you can find the example usage for javax.servlet.jsp.tagext VariableInfo getVarName.

Prototype

public String getVarName() 

Source Link

Document

Returns the name of the scripting variable.

Usage

From source file:org.seasar.mayaa.impl.engine.processor.JspProcessor.java

protected void pushNestedVariables() {
    operateNestedVariables(new NestedVariableOperator() {
        public void operate(AttributeScope pageScope, VariableInfo info, boolean firstHit) {
            String name = info.getVarName();
            if (pageScope.hasAttribute(name)) {
                if (firstHit) {
                    getNestedVariablesMap().clear();
                }//w w w.  ja  v a2s. co  m
                getNestedVariablesMap().put(name, pageScope.getAttribute(name));
            }
        }
    });
}

From source file:org.seasar.mayaa.impl.engine.processor.JspProcessor.java

protected void popNestedVariables() {
    operateNestedVariables(new NestedVariableOperator() {
        public void operate(AttributeScope pageScope, VariableInfo info, boolean firstHit) {
            String name = info.getVarName();
            Map map = getNestedVariablesMap();
            if (map.containsKey(name)) {
                pageScope.setAttribute(name, map.get(name));
            } else {
                pageScope.removeAttribute(name);
            }//  w  ww . jav a 2 s.  c o  m
        }
    });
}