Examples of VariableResolver


Examples of javax.faces.el.VariableResolver

    }

    @Override
    protected String afterCreate() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();

        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");

        objects.add(wo);
        return current();
    }
View Full Code Here

Examples of javax.faces.el.VariableResolver

    }
   
    @Override
    protected DcObject getItem() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");
        return wo.getDcObject();
    }
View Full Code Here

Examples of javax.servlet.jsp.el.VariableResolver

     * attribute with a matching name.
     */
    public VariableResolver getVariableResolver() {
        final PageContext ctx = this;

        return new VariableResolver() {
            public Object resolveVariable(String name) throws ELException {
                return ctx.findAttribute(name);
            }
        };
    }
View Full Code Here

Examples of javax.servlet.jsp.el.VariableResolver

   */
  public boolean when(HttpServletRequest request) throws Exception {
    if (expression == null) {
      return true;
    } else {
      VariableResolver resolver = new CalyxoVariableResolver(request);
      try {
        Boolean result = (Boolean)expression.evaluate(resolver);
        return result == null ? false : result.booleanValue();
      } catch (ELException e) {
        throw new ConfigException("Could not evaluate 'when' condition '" + when + "' in filter '" + toInlineString() + "'", e);
View Full Code Here

Examples of javax.servlet.jsp.el.VariableResolver

  public FormResult validate(HttpServletRequest request, FormInputValues params) {
    log.trace("validate()");
    FormResultImpl result = new FormResultImpl(this);

    if (this.inputs != null) {
      VariableResolver resolver = new CalyxoVariableResolver(request);
      Iterator inputs = getFormInputs();
      while (inputs.hasNext()) {
        FormInput input = (FormInput)inputs.next();
        if (input.isIgnored(resolver)) {
          result.add(new IgnoredFormInputResult(input, params));
        } else {
          result.add(input.validate(request, params, resolver));
        }
      }
    }

    if (asserts != null) {
      AssertVariableResolver resolver =
        new AssertVariableResolver(request, params, result);
      Iterator asserts = this.asserts.iterator();
      while (asserts.hasNext()) {
        Assert azzert = (Assert)asserts.next();
        resolver.reset();
        boolean asserted = azzert.eval(resolver);
        if (!asserted && !resolver.isInvalidPropertyReferenced()) {
          result.assertionFailed(resolver, azzert.getMessage());
        }
      }
    }
View Full Code Here

Examples of javax.servlet.jsp.el.VariableResolver

      child.linkSubtree();
    }
  }

  private void resolveSubtree(ModuleContext context) throws ConfigException {
    VariableResolver variables = new ConfigImplVariableResolver(context, this);
    _parentFunctionMapper = parent; // save file parent (may change after merge)
    _resolve(context.getExpressionEvaluator(), variables);
    if (!resolveCalled) {
      log.warn("Node " + toInlineString() + " may not have been fully initialized! Check super._resolve() calls...");
    }
View Full Code Here

Examples of javax.servlet.jsp.el.VariableResolver

     * attribute with a matching name.
     */
    public VariableResolver getVariableResolver() {
        final PageContext ctx = this;

        return new VariableResolver() {
            public Object resolveVariable(String name) throws ELException {
                return ctx.findAttribute(name);
            }
        };
    }
View Full Code Here

Examples of javax.servlet.jsp.el.VariableResolver

   * @param reader   The source XML reader.
   * @return The XML PI filter.
   */
  private PreprocessingFilter createPIHandler(EntityResolver resolver, XMLReader reader) {
    PreprocessingFilter filter = new PreprocessingFilter(reader);
    ProcessingInstructionHandler resolvingHandler = new ExpressionHandler(new VariableResolver() {

      public Object resolveVariable(String name) throws ELException {
        if ("date".equals(name)) {
          return DateFormat.getDateInstance(DateFormat.LONG).format(new Date());
        } else if ("project".equals(name)) {
View Full Code Here

Examples of jetbrick.template.parser.VariableResolver

    public String getVersion() {
        return VERSION;
    }

    private VariableResolver createVariableResolver() {
        VariableResolver resolver = new VariableResolver();
        for (String pkg : config.getImportPackages()) {
            resolver.addImportPackage(pkg);
        }
        for (String klassName : config.getImportClasses()) {
            resolver.addImportClass(klassName);
        }
        for (String method : config.getImportMethods()) {
            resolver.addMethodClass(method);
        }
        for (String function : config.getImportFunctions()) {
            resolver.addFunctionClass(function);
        }
        for (String tag : config.getImportTags()) {
            resolver.addTagClass(tag);
        }
        for (String variable : config.getImportVariables()) {
            int pos = variable.lastIndexOf(" ");
            String defination = variable.substring(0, pos);
            String id = variable.substring(pos + 1);
            resolver.addGlobalVariable(defination, id);
        }

        if (config.isImportAutoscan()) {
            log.info("Starting to autoscan the JetMethods, JetFunctions, JetTags implements...");
            autoScanClassImplements(resolver);
View Full Code Here

Examples of org.apache.cocoon.components.treeprocessor.variables.VariableResolver

    private String makeAbsolutePath(String path) throws ProcessingException, IOException
    {
        String resolvedPath = null;
        try
        {
            VariableResolver resolver = VariableResolverFactory.getResolver(path, manager);
            resolvedPath = resolver.resolve(null, objectModel);
        }
        catch (PatternException e)
        {
            throw new ProcessingException(e);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.