Package org.zkoss.zk.xel

Examples of org.zkoss.zk.xel.ExValue


    if (name == null || name.length() == 0 || value == null)
      throw new IllegalArgumentException();

    _name = name;
    _evalr = evalr;
    _value = new ExValue(value, Object.class);
    _append = append != null ? new ExValue(append, Boolean.class): null;
    _cond = cond;
  }
View Full Code Here


  public WidgetListener(EvaluatorRef evalr, String name, String script, ConditionImpl cond) {
    if (name == null || script == null || (evalr == null && cond != null))
      throw new IllegalArgumentException();
    _evalr = evalr;
    _name = name;
    _script = script != null ? new ExValue(script, String.class): null;
    _cond = cond;
  }
View Full Code Here

   * @param contentType the content type. It may coontain EL expressions.
   * @since 3.0.0
   */
  public void setContentType(String contentType) {
    _contentType = contentType != null && contentType.length() > 0 ?
      new ExValue(contentType, String.class): null;
  }
View Full Code Here

   * @param docType the doc type. It may coontain EL expressions.
   * @since 3.0.0
   */
  public void setDocType(String docType) {
    _docType = docType != null && docType.length() > 0 ?
      new ExValue(docType, String.class): null;
  }
View Full Code Here

   * <p>Default: null (i.e., nothing generated)
   * @since 3.0.0
   */
  public void setFirstLine(String firstLine) {
    _firstLine = firstLine != null && firstLine.length() > 0 ?
      new ExValue(firstLine, String.class): null;
  }
View Full Code Here

        return; //nothing to
      _rootAttrs = new LinkedHashMap();
    }

    if (value == null) _rootAttrs.remove(name);
    else _rootAttrs.put(name, new ExValue(value, String.class));
  }
View Full Code Here

   * @param cond the condition.
   * Note: If null (not specified), it is considered effective.
   */
  public void setIf(String cond) {
    _if = cond != null && cond.length() > 0 ?
      new ExValue(cond, Boolean.class): null;
  }
View Full Code Here

   * @param cond the condition.
   * Note: If null (not specified), it is considered ineffective.
   */
  public void setUnless(String cond) {
    _unless = cond != null && cond.length() > 0 ?
      new ExValue(cond, Boolean.class): null;
  }
View Full Code Here

      List dst = new LinkedList();
      Collection src = CollectionsX.parse(null, expr, ',', true, true);
      for (Iterator it = src.iterator(); it.hasNext();) {
        final String s = (String)it.next();
        if (!ignoreEmpty || s.length() > 0)
          dst.add(new ExValue(s, expcls));
      }
      if (!dst.isEmpty())
        return (ExValue[])dst.toArray(new ExValue[dst.size()]);
    }

    return ignoreEmpty ? null: new ExValue[] {new ExValue(expr, expcls)};
  }
View Full Code Here

      return parseList(expr, expcls, false);
    } else if (type == MAP) {
      Map dst = Maps.parse(new LinkedHashMap(), expr, ',', '\'', false, false, true);
      for (Iterator it = dst.entrySet().iterator(); it.hasNext();) {
        Map.Entry me = (Map.Entry)it.next();
        me.setValue(new ExValue((String)me.getValue(), expcls));
      }
      return dst;
    } else {
      return new ExValue(expr, expcls);
    }
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.xel.ExValue

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.