Examples of DspException


Examples of org.zkoss.web.servlet.dsp.DspException

    if (!nested && !isEffective())
      return;

    final Action parent = ac.getParent();
    if (!(parent instanceof Choose))
      throw new DspException("The parent of otherwise must be choose");
    final Choose choose = (Choose)parent;
    if (!choose.isMatched())
      ac.renderFragment(null);
  }
View Full Code Here

Examples of org.zkoss.web.servlet.dsp.DspException

    } else if (_items instanceof Enumeration) {
      renderWith(ac, st, (Enumeration)_items);
    } else if (_items instanceof String) {
      renderWith(ac, st, (String)_items);
    } else {
      throw new DspException(MWeb.DSP_UNKNOWN_ATTRIBUTE_VALUE,
        new Object[] {this, "items", new Integer(ac.getLineNumber())});
    }

    if (_var != null) ac.setAttribute(_var, old1, ac.PAGE_SCOPE);
    if (_varStatus != null) ac.setAttribute(_varStatus, old2, ac.PAGE_SCOPE);
View Full Code Here

Examples of org.zkoss.web.servlet.dsp.DspException

    if (!isEffective())
      return;

    final Action parent = ac.getParent();
    if (!(parent instanceof Choose))
      throw new DspException("The parent of when must be choose");

    final Choose choose = (Choose)parent;
    if (_cond && !choose.isMatched()) {
      choose.setMatched(true);
      if (nested)
View Full Code Here

Examples of org.zkoss.web.servlet.dsp.DspException

  public void render(ActionContext ac, boolean nested)
  throws DspException, IOException {
    if (!isEffective())
      return;
    if (nested)
      throw new DspException(MWeb.DSP_NESTED_ACTION_NOT_ALLOWED,
        new Object[] {this, new Integer(ac.getLineNumber())});
    if (_page == null)
      throw new DspException(MWeb.DSP_ATTRIBUTE_REQUIRED,
        new Object[] {this, "page", new Integer(ac.getLineNumber())});
    ac.include(_page, null);
  }
View Full Code Here

Examples of org.zkoss.web.servlet.dsp.DspException

  public void render(ActionContext ac, boolean nested)
  throws DspException, IOException {
    if (!isEffective())
      return;
    if (nested)
      throw new DspException(MWeb.DSP_NESTED_ACTION_NOT_ALLOWED,
        new Object[] {this, new Integer(ac.getLineNumber())});

    int len = _value != null ? _value.length(): 0;
    if (len == 0 || (_nbsp && _value.trim().length() == 0)) {
      if (_nbsp)
View Full Code Here

Examples of org.zkoss.web.servlet.dsp.DspException

  public void render(ActionContext ac, boolean nested)
  throws DspException, IOException {
    if (!isEffective()|| _src == null || _src.length() == 0)
      return; //nothing to generate
    if (nested)
      throw new DspException(MWeb.DSP_NESTED_ACTION_NOT_ALLOWED,
        new Object[] {this, new Integer(ac.getLineNumber())});

    final StringBuffer sb = new StringBuffer(64)
      .append("<img src=\"").append(ac.encodeURL(_src)).append('"');
    append(sb, "id", _id);
View Full Code Here

Examples of org.zkoss.web.servlet.dsp.DspException

  public void render(ActionContext ac, boolean nested)
  throws DspException, IOException {
    if (!isEffective())
      return;
    if (nested)
      throw new DspException(MWeb.DSP_NESTED_ACTION_NOT_ALLOWED,
        new Object[] {this, new Integer(ac.getLineNumber())});
    if (_ctype != null)
      ac.setContentType(_ctype);
    else if (!ac.isIncluded() && _octype != null)
      ac.setContentType(_octype);
View Full Code Here

Examples of org.zkoss.web.servlet.dsp.DspException

  public void render(ActionContext ac, boolean nested)
  throws DspException, IOException {
    if (!isEffective())
      return;
    if (nested)
      throw new DspException(MWeb.DSP_NESTED_ACTION_NOT_ALLOWED,
        new Object[] {this, new Integer(ac.getLineNumber())});
    if (_var == null)
      throw new DspException(MWeb.DSP_ATTRIBUTE_REQUIRED,
        new Object[] {this, "var", new Integer(ac.getLineNumber())});
    ac.removeAttribute(_var, _scope);
  }
View Full Code Here

Examples of org.zkoss.web.servlet.dsp.DspException

  public void render(ActionContext ac, boolean nested)
  throws DspException, IOException {
    if (!isEffective())
      return;
    if (nested)
      throw new DspException(MWeb.DSP_NESTED_ACTION_NOT_ALLOWED,
        new Object[] {this, new Integer(ac.getLineNumber())});
    if (_var == null)
      throw new DspException(MWeb.DSP_ATTRIBUTE_REQUIRED,
        new Object[] {this, "var", new Integer(ac.getLineNumber())});
    ac.setAttribute(_var, _val, _scope);
  }
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.