Examples of UIException


Examples of org.zkoss.zk.ui.UiException

    return _zclass == null ? "z-horbox" : _zclass;
  }
 
  public void beforeChildAdded(Component child, Component refChild) {
    if (!(child instanceof Horpanel))
      throw new UiException("Unsupported child for tabs: "+child);
    super.beforeChildAdded(child, refChild);
  }
View Full Code Here

Examples of org.zkoss.zk.ui.UiException

   * @return
   */
  public static final WireEvent getOnWireEvent(AuRequest request) {
    final Component comp = request.getComponent();
    if (comp == null)
      throw new UiException(MZk.ILLEGAL_REQUEST_COMPONENT_REQUIRED, request);
    final Map data = request.getData();

    String drawmethod = (String) data.get("drawmethod");
    Wirebox inbox = (Wirebox) request.getDesktop().getComponentByUuidIfAny((String) data.get("inbox"));
    Wirebox outbox = (Wirebox) request.getDesktop().getComponentByUuidIfAny((String) data.get("outbox"));
    if (inbox == null || outbox == null || !data.containsKey("joint"))
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] { data, request });

    Wire wire = new Wire();
    wire.setIn(inbox);
    wire.setOut(outbox);
    wire.setConfig("drawingMethod="+drawmethod);
View Full Code Here

Examples of org.zkoss.zk.ui.UiException

   * @return
   */
  public static final WireEvent getUnWireEvent(AuRequest request) {
    final Component comp = request.getComponent();
    if (comp == null)
      throw new UiException(MZk.ILLEGAL_REQUEST_COMPONENT_REQUIRED, request);
    final Map data = request.getData();

    Wirebox targetbox = (Wirebox) request.getDesktop().getComponentByUuidIfAny((String) data.get("boxid"));

    if (targetbox == null  && !data.containsKey("joint"))
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] { data, request });


    String joint = (String) data.get("joint");

    ArrayList list = targetbox.getAvailableWires(joint);
    Wire unwiredWire = (Wire) list.get(0);
    if(unwiredWire == null )
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] { data, request });
    unwiredWire.setParent(null);
    return new WireEvent(request.getCommand(), unwiredWire.getOut(), unwiredWire, null);
  }
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.