Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-964

No error shown if coerceFromString_ failed and CustomConstraint was specified.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.11
    • 5.0.10
    • None

      Test Case:

      <vlayout>
      	<html>Copy "1e2" and paste it to the following box, and then press TAB.
      An error message shall be shown</html>
      
      	<zscript><![CDATA[
      	public class MyConstraint extends SimpleConstraint implements CustomConstraint {
      		public MyConstraint(int flags) {
      			super(flags);
      		}
      		public void showCustomError(Component comp, WrongValueException ex) {
      			comp.getFellow("err").setValue(ex != null ? ex.getMessage(): "");
      		}
      	}
      	MyConstraint cs1 = new MyConstraint(0);
      	MyConstraint nes = new MyConstraint(MyConstraint.NO_NEGATIVE);
      	]]></zscript>
      
      	<decimalbox format="#.##" width="150px" constraint="${cs1}"/>
      	<label id="err"/>
      </vlayout>
      

            tomyeh tomyeh
            tomyeh tomyeh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h