Package org.zkoss.zk.ui

Examples of org.zkoss.zk.ui.WrongValueException


   * successive action events.
   */
  public void setDelay(int delay)
  throws WrongValueException {
    if (delay < 0)
      throw new WrongValueException("Negative delay is not allowed: "+delay);
    if (delay != _delay) {
      _delay = delay;
      smartUpdate("delay", _delay);
    }
  }
View Full Code Here


  /** Sets the orient.
   * @param orient either "horizontal" or "vertical".
   */
  public void setOrient(String orient) throws WrongValueException {
    if (!"horizontal".equals(orient) && !"vertical".equals(orient))
      throw new WrongValueException("orient cannot be "+orient);

    if (!Objects.equals(_orient, orient)) {
      _orient = orient;
      smartUpdate("orient", _orient);
    }
View Full Code Here

  /** Sets the orient.
   * @param orient either "horizontal" or "vertical".
   */
  public void setOrient(String orient) throws WrongValueException {
    if (!"horizontal".equals(orient) && !"vertical".equals(orient))
      throw new WrongValueException(orient);

    if (!Objects.equals(_orient, orient)) {
      _orient = orient;
      smartUpdate("orient", _orient);
    }
View Full Code Here

                comp  = (Component) ZkFlowContextManager.getSelf(exec).getAttribute((String)source, false);
              }
              if (comp != null) {
                //cannot throw out exception here, or the flow state will out of sync
                //save in executution and throw it later in ZkFlowHandlerAdapter.handl()
                ZkFlowContextManager.setWrongValueException(exec, new WrongValueException(comp, msg.getText()));
              } else {
                requestContext.getViewScope().put("errors", errors);
                requestContext.getExternalContext().requestFlowExecutionRedirect();
              }
            }
View Full Code Here

  private Textbox username;
  private Textbox password;
 
  public void onClick$wveButton(){
    username.clearErrorMessage();
    throw new WrongValueException(username, "Not a valid username.");
  }
View Full Code Here

  }

  public void onClick$wvseButton(){
    username.clearErrorMessage();
    password.clearErrorMessage();
    WrongValueException[] wrongValues = {new WrongValueException(username, "Not a valid username."),
        new WrongValueException(password, "Not a valid password.")};
    throw new WrongValuesException(wrongValues);
  }
View Full Code Here

    getBinder().saveAll();

    // check if Pasword equals ReTyped password
    if (!StringUtils.equals(getSelectedUser().getUsrPassword(), getPwd().getRetypePassword())) {
      throw new WrongValueException(txtb_User_Password_Retype, Labels.getLabel("message.error.RetypedPasswordMustBeSame"));
    }

    try {
      // save it
      getUserService().saveOrUpdate(getSelectedUser());
View Full Code Here

      this.userNameTest.getValue();
      this.userNameTest.invalidate();
      this.userNameTest.focus();

    } else {
      throw new WrongValueException(this.userNameTest, "false userName or password. Please retry.");
    }
  }
View Full Code Here

      }

      if (compareComponent instanceof Textbox) {

        if (StringUtils.isEmpty(enteredValue)) {
          throw new WrongValueException(comp, Labels.getLabel("message.Error.CannotBeEmpty"));
        }

        final String comparedValue = ((Textbox) compareComponent).getValue();
        if (!enteredValue.equals(comparedValue)) {
          throw new WrongValueException(comp, Labels.getLabel("message.Error.RetypedPasswordMustBeSame"));
        }
      }
    }
  }
View Full Code Here

        return result;
    }

    public void showReport(JasperreportComponent jasperreport){
        if (getSelectedOrder() == null) {
            throw new WrongValueException(bdOrder, _("Please, select a project"));
        }
        super.showReport(jasperreport);
    }
View Full Code Here

TOP

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

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.