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

setIimage() doesn't work on Button

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: