Package org.zkoss.zk.xel

Examples of org.zkoss.zk.xel.ExValue


  /*package*/ ArgumentInfo(Map args) {
    if (args != null && !args.isEmpty()) {
      for (Iterator it = args.entrySet().iterator(); it.hasNext();) {
        final Map.Entry me = (Map.Entry)it.next();
        me.setValue(new ExValue((String)me.getValue(), Object.class));
      }
      _args = args;
    } else
      _args = null;
  }
View Full Code Here


   * (returned by {@link #resolveSwitch}) is an empty string.
   */
  public void setSwitch(String switchc) {
    if (_case != null && switchc != null)
      throw new IllegalStateException("case and switch/choose cannot coexist");
    _switch = switchc != null ? new ExValue(switchc, Object.class): null;
  }
View Full Code Here

        _resolver = cls;
      } catch (ClassNotFoundException ex) {
        throw new ClassNotFoundException("Class not found: "+clsnm, ex);
      }
    } else {
      _resolver = new ExValue(clsnm, String.class);
    }
  }
View Full Code Here

   * belongs.
   */
  public TextInfo(EvaluatorRef evalr, String text) {
    if (evalr == null) throw new IllegalArgumentException();
    _evalr = evalr;
    _text = text != null ? new ExValue(text, String.class): null;
  }
View Full Code Here

      throw new IllegalArgumentException();

    _evalr = evalr;
    _page = null;
    _comp = comp;
    _expr = expr != null ? new ExValue[] {new ExValue(expr, Object.class)}: null;
    _begin = begin != null && begin.length() > 0 ? new ExValue(begin, Integer.class): null;
    _end = end != null && end.length() > 0 ? new ExValue(end, Integer.class): null;
  }
View Full Code Here

      throw new IllegalArgumentException();

    _evalr = evalr;
    _page = page;
    _comp = null;
    _expr = expr != null ? new ExValue[] {new ExValue(expr, Object.class)}: null;
    _begin = begin != null && begin.length() > 0 ? new ExValue(begin, Integer.class): null;
    _end = end != null && end.length() > 0 ? new ExValue(end, Integer.class): null;
  }
View Full Code Here

  public void addCustomAttribute(String name, String value) {
    if (name == null || value == null
    || name.length() == 0 || value.length() == 0)
      throw new IllegalArgumentException();

    final ExValue ev = new ExValue(value, Object.class);
    if (_custAttrs == null)
      _custAttrs = new HashMap(4);
    _custAttrs.put(name, ev);
  }
View Full Code Here

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

    if (_molds == null)
      _molds = new HashMap(2);
    _molds.put(name, new ExValue(widgetClass, String.class));
  }
View Full Code Here

    return _molds != null ?
      _molds.keySet(): (Collection)Collections.EMPTY_LIST;
  }
  public String getWidgetClass(Component comp, String moldName) {
    if (_molds != null) {
      final ExValue wc = (ExValue)_molds.get(moldName);
      if (wc != null) {
        final String s = (String)wc.getValue(_evalr, comp);
        if (s != null)
          return s;
      }
    }
    return getDefaultWidgetClass(comp);
View Full Code Here

  }
  public String getDefaultWidgetClass() {
    return getDefaultWidgetClass(null);
  }
  public void setDefaultWidgetClass(String widgetClass) {
    final ExValue oldwc = _defWgtClass;
    _defWgtClass = new ExValue(widgetClass, String.class);

    //replace mold's widget class if it is the old default one
    if (oldwc != null && _molds != null)
      for (Iterator it = _molds.entrySet().iterator(); it.hasNext();) {
        final Map.Entry me = (Map.Entry)it.next();
        if (oldwc.equals(me.getValue()))
          me.setValue(_defWgtClass);
      }
  }
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.