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

External radio unintuitive selected Index

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: 6.5.8.1, 8.5.1.3
    • Fix Version/s: None
    • Component/s: Components
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: