public Collection getLocalVariableNames() throws TemplateModelException { HashSet result = new HashSet(); for (TemplateModelIterator it = localVars.keys().iterator(); it.hasNext(); ) { result.add(((TemplateScalarModel) it.next()).getAsString()); } return result; } }
public Collection getLocalVariableNames() throws TemplateModelException { HashSet result = new HashSet(); for (TemplateModelIterator it = localVars.keys().iterator(); it.hasNext();) { result.add(it.next().toString()); } return result; } }
@Override protected boolean preprocessRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Environment environment = Environment.getCurrentEnvironment(); if (environment != null) { try { Namespace namespace = environment.getCurrentNamespace(); TemplateCollectionModel collectionModel = namespace.keys(); TemplateModelIterator iterator = collectionModel.iterator(); Map<String, Object> sharedVariables = new HashMap<>(); while (iterator.hasNext()) { SimpleScalar scalar = (SimpleScalar) iterator.next(); TemplateModel value = namespace.get(scalar.getAsString()); sharedVariables.put(scalar.getAsString(), value); } addSharedVariables(getConfiguration(), sharedVariables); } catch (TemplateModelException e) { throw new ServletException(e); } } return false; }
public Collection getLocalVariableNames() throws TemplateModelException { HashSet result = new HashSet(); for (TemplateModelIterator it = localVars.keys().iterator(); it.hasNext(); ) { result.add(((TemplateScalarModel) it.next()).getAsString()); } return result; } }
@Override public TemplateCollectionModel keys() { ensureInitializedRTE(); return super.keys(); }
public Collection getLocalVariableNames() throws TemplateModelException { HashSet result = new HashSet(); for (TemplateModelIterator it = localVars.keys().iterator(); it.hasNext(); ) { result.add(((TemplateScalarModel) it.next()).getAsString()); } return result; } }
@Override public TemplateCollectionModel keys() { ensureInitializedRTE(); return super.keys(); }
@Override public TemplateCollectionModel keys() { ensureInitializedRTE(); return super.keys(); }