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

External radio unintuitive selected Index

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • None
    • 6.5.8.1, 8.5.1.3
    • Components
    • None

      Steps to Reproduce

      Click radio "index0", and check the selectedIndex.

       

      <zk>
          <div>
            <radio label='index0' radiogroup="rg1"/>
            <separator/>
            <radiogroup id='rg1'>
                <radio label='index1'/>
                <radio label='index2'/>
                <radio label='index3'/>
                <radio label='index4'/>
            </radiogroup>
            <button label="getSelectedIndex" onClick='Clients.log(rg1.getSelectedIndex());'/>
          </div>
      </zk>
      

       

      Current Result

      Selected Index is not correct.

      Expected Result

      Selected Index is correct.

      Debug Information

      error occurs since ZK 8.5.1.

      ZK-3818 cached _group  in onPageAttached() and remove _group in onPageDetached() in order to update selected index.   

      _group should be cleaned before getRadiogroup() if the radiogroup changed.

      Workaround

      Add external radio after radiogroup rendered.

            Leon03 Leon03
            katherinelin katherinelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: