Package org.zkoss.zk.ui

Examples of org.zkoss.zk.ui.UiException


  public List getItems(Component comp) {
    if (comp instanceof Combobox) {
      final Combobox cbbox = (Combobox) comp;
      return cbbox.getItems();
    } else {
      throw new UiException(
          "Unsupported type for ComboitemCollectionItem: " + comp);
    }
  }
View Full Code Here


    smartUpdate("resize", true);
  }

  public void beforeChildAdded(Component child, Component refChild) {
    if (!(child instanceof LayoutRegion))
      throw new UiException("Unsupported child for Borderlayout: "
          + child);
    if (child instanceof North) {
      if (_north != null && child != _north)
        throw new UiException("Only one north child is allowed: "
            + this);
    } else if (child instanceof South) {
      if (_south != null && child != _south)
        throw new UiException("Only one south child is allowed: "
            + this);
    } else if (child instanceof West) {
      if (_west != null && child != _west)
        throw new UiException("Only one west child is allowed: " + this);
    } else if (child instanceof East) {
      if (_east != null && child != _east)
        throw new UiException("Only one east child is allowed: " + this);
    } else if (child instanceof Center) {
      if (_center != null && child != _center)
        throw new UiException("Only one center child is allowed: "
            + this);
    }
    super.beforeChildAdded(child, refChild);
  }
View Full Code Here

  public Component getComponentCollectionOwner(Component comp) {
    if (comp instanceof Listitem) {
      final Listitem item = (Listitem) comp;
      return item.getListbox();
    } else {
      throw new UiException(
          "Unsupported type for ListitemCollectionItem: " + comp);
    }
  }
View Full Code Here

  public ListModel getModelByOwner(Component comp) {
    if (comp instanceof Listbox) {
      final Listbox listbox = (Listbox) comp;
      return listbox.getModel();
    } else {
      throw new UiException(
          "Unsupported type for ListitemCollectionItem: " + comp);
    }
  }
View Full Code Here

  public Component getComponentAtIndexByOwner(Component comp, int index) {
    if (comp instanceof Listbox) {
      final Listbox listbox = (Listbox) comp;
      return listbox.getItemAtIndex(index);
    } else {
      throw new UiException(
          "Unsupported type for ListitemCollectionItem: " + comp);
    }
  }
View Full Code Here

  public List getItems(Component comp) {
    if (comp instanceof Listbox) {
      final Listbox listbox = (Listbox) comp;
      return listbox.getItems();
    } else {
      throw new UiException(
          "Unsupported type for ListitemCollectionItem: " + comp);
    }
  }
View Full Code Here

    out.write('\n');
  }

  public void beforeParentChanged(Component parent) {
    if (parent != null && !(parent instanceof Html))
      throw new UiException("Head's parent must be Html, not "+parent);
    super.beforeParentChanged(parent);
  }
View Full Code Here

    return _zclass == null ? "z-treefooter" : _zclass;
  }

  public void beforeParentChanged(Component parent) {
    if (parent != null && !(parent instanceof Treefoot))
      throw new UiException("Wrong parent: "+parent);
    super.beforeParentChanged(parent);
  }
View Full Code Here

       */
      final org.zkoss.zk.ui.util.Configuration config = getWebApp().getConfiguration();
      pu = config.getPreference(CONFIG, null);
    }
    if (pu == null) {
      throw new UiException("Forget to specify the preference of "+CONFIG+" in WEB-INF/zk.xml?");
    }
    return pu;
  }
View Full Code Here

  public String getZclass() {
    return _zclass == null ? "z-treecols" : _zclass;
  }
  public void beforeParentChanged(Component parent) {
    if (parent != null && !(parent instanceof Tree))
      throw new UiException("Wrong parent: "+parent);
    super.beforeParentChanged(parent);
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.UiException

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.