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

setErrorMessage causes reset of input element value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.11, 6.0.1
    • 5.0.7.1, 5.0.10
    • Components
    • Security Level: Jimmy
    • ZK 5.0.7.1 EE

      step 1: click on save button without entering any data (you should see errorbox message)
      step 2: close errorbox1 and then errorbox2 (if you reverse the closing sequence then it will not cause this issue)
      step 3: enter some text into first textbox
      step 4: click on save again

      Expected: errorbox for 2nd textbox is shown and first textbox validation pass and value is retained
      Actual: errorbox for 2nd textbox is shown correctly but value of first textbox is reset. If you close 2nd

       
      <?xml version="1.0" encoding="UTF-8" ?>
      <zk>
      	<window title="new page title" border="normal">
      		<grid>
      			<columns>
      				<column width="150px" />
      			</columns>
      			<rows>
      				<row>
      					<label value="First textbox"></label>
      					<textbox id="periodValue"></textbox>
      				</row>
      				<row>
      					<label value="Second textbox"></label>
      					<textbox id="periodValue1"></textbox>
      				</row>
      				<row>
      					<button id="b" label="save">
      						<attribute name="onClick"><![CDATA[
      							if ("".equals(periodValue.getValue())) {
      								periodValue.setErrorMessage("Empty not allowed in 1");
      							}
      							if ("".equals(periodValue1.getValue())) {
      								periodValue1.setErrorMessage("Empty not allowed in 2");
      							}
      						]]></attribute>
      					</button>
      				</row>
      			</rows>
      		</grid>
      	</window>
      </zk>
      

            benbai benbai
            ashishd ashishd
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: