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

navbar fires onSelect event when triggered from server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.0
    • 8.0.4.2
    • Components
    • Security Level: Jimmy
    • None

      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.

            rudyhuang rudyhuang
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h