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

navbar fires onSelect event when triggered from server

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.4.2
    • Fix Version/s: 8.5.0
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:

      Description

      Steps to Reproduce

      run the zul file

      <zk>
      	<navbar onSelect="Clients.log(event.toString())">
      		<navitem id="ni1" label="item1"/>
      		<navitem id="ni2" label="item2"/>
      	</navbar>
      	<button label="select item1" onClick="ni1.setSelected(true)"/>
      	<button label="select item2" onClick="ni2.setSelected(true)"/>
      </zk>
      click either of the buttons to change the current selected navitem at server side
      

      Current Result

      observing the network traffic an unnecessary onSelect event is sent to the server side (since the update was triggered from server side it's not necessary to fire the event again)

      Expected Result

      no additional onSelect event when the selected navitem was changed at server side.

      Debug Info

      At the same time the event listener doesn't trigger - producing no log output as when clicking a navitem directly.

        Attachments

          Activity

            People

            Assignee:
            rudyhuang rudyhuang
            Reporter:
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            3 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 - 3 hours
                3h