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

setIimage() doesn't work on Button

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.0
    • 7.0.0
    • Components
    • None

      Reproducing Steps:

      1. run the zul page below with ZK 7.0.0.FL.20131121
      remember to put an image on corresponding path.

      <zk>
      
      	<checkbox id="acceptTermBox" onCheck="setImage()"/>
      	<button id="submitButton" label="Submit" />
      	<zscript><![CDATA[
      		public void setImage(){
      			if (acceptTermBox.isChecked()){
      //				submitButton.setLabel("checked");
      				submitButton.setImage("/images/submit.png");
      			}else{
      //				submitButton.setLabel("unchecked");
      				submitButton.setImage("");
      			}
      		}
      	]]></zscript>
      </zk>
      

      2. check the checkbox

      Expected:

      the button shows

      Actual:

      no icon appears on the button.

      Extra Information:

      if you call setLabel() first, setImage() can work as expected.

            RaymondChao RaymondChao
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: