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

No error shown if coerceFromString_ failed and CustomConstraint was specified.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.10
    • Fix Version/s: 5.0.11
    • Component/s: None
    • Labels:

      Description

      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>
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

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