View | Details | Raw Unified | Return to bug 49534
Collapse All | Expand All

(-)src/main/java/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java (-7 / +2 lines)
Lines 26-32 Link Here
26
26
27
import javax.el.ELContext;
27
import javax.el.ELContext;
28
import javax.el.ValueExpression;
28
import javax.el.ValueExpression;
29
import javax.el.VariableMapper;
30
import javax.servlet.jsp.JspTagException;
29
import javax.servlet.jsp.JspTagException;
31
import javax.servlet.jsp.jstl.core.IndexedValueExpression;
30
import javax.servlet.jsp.jstl.core.IndexedValueExpression;
32
import javax.servlet.jsp.jstl.core.IteratedExpression;
31
import javax.servlet.jsp.jstl.core.IteratedExpression;
Lines 237-244 Link Here
237
                length = st.countTokens();
236
                length = st.countTokens();
238
                isIndexedValueExpression = false;
237
                isIndexedValueExpression = false;
239
            } else {
238
            } else {
240
                //What does this mean if we get here???
239
                // unrecognized type
241
                length=0;
240
                throw new JspTagException(Resources.getMessage("FOREACH_BAD_ITEMS"));
242
            }
241
            }
243
        }
242
        }
244
    }
243
    }
Lines 268-277 Link Here
268
        if (rawItems != null) {
267
        if (rawItems != null) {
269
            if (rawItems instanceof ValueExpression) {
268
            if (rawItems instanceof ValueExpression) {
270
                deferredExpression = (ValueExpression)rawItems;
269
                deferredExpression = (ValueExpression)rawItems;
271
                ELContext myELContext = pageContext.getELContext();
272
                VariableMapper vm = myELContext.getVariableMapper();
273
                //String itemsName=deferredExpression.getExpressionString();
274
                //vm.setVariable(itemsName, deferredExpression);
275
                items = toDeferredForEachIterator(deferredExpression);
270
                items = toDeferredForEachIterator(deferredExpression);
276
            } else {
271
            } else {
277
                // extract an iterator over the 'items' we've got
272
                // extract an iterator over the 'items' we've got

Return to bug 49534