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

setErrorMessage causes reset of input element value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.7.1, 5.0.10
    • Fix Version/s: 5.0.11, 6.0.1
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
    • Environment:

      ZK 5.0.7.1 EE

      Description

      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>
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: