Wicket
  1. Wicket
  2. WICKET-1271

Script in RenderHead method of AjaxFormChoiceComponentUpdatingBehavior needs fixing

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-final
    • Fix Version/s: 1.3.1
    • Component/s: wicket
    • Labels:
      None

      Description

      The script in the renderHead method of AjaxFormChoiceComponentUpdatingBehavior assumes that the Radio Component will be the immediate child of the RadioGroup Component, But in some or in most of the cases that is not correct.

      That is not the case even in the Wicket Examples, in examples the hierarchy is RadioGroup/ListView/Radio.

      I have maodied the rendered script to work for RadioGroup/ListView/Radio hierarchy.

      And the Patch is attached.

      Regards
      Dipu

        Issue Links

          Activity

          Dipu C Seminlal created issue -
          Hide
          Dipu C Seminlal added a comment -

          Patch for the rendered Script in AjaxFormChoiceComponentUpdatingBehavior

          Show
          Dipu C Seminlal added a comment - Patch for the rendered Script in AjaxFormChoiceComponentUpdatingBehavior
          Dipu C Seminlal made changes -
          Field Original Value New Value
          Attachment AjaxFormChoiceComponentUpdatingBehavior_patch_revision_610340.txt [ 12372786 ]
          Dipu C Seminlal made changes -
          Description The script in the renderHead method of AjaxFormChoiceComponentUpdatingBehavior assumes that the Radio Component will be the immediate child of the RadioGroup Component, But in some or in most of the cases that is not correct.

          That is not the case even in the Wicket Examples, in examples the hierarchy is RadioGroup/ListView/Radio.

          The script in the renderHead method of AjaxFormChoiceComponentUpdatingBehavior assumes that the Radio Component will be the immediate child of the RadioGroup Component, But in some or in most of the cases that is not correct.

          That is not the case even in the Wicket Examples, in examples the hierarchy is RadioGroup/ListView/Radio.

          I have maodied the rendered script to work for RadioGroup/ListView/Radio hierarchy.

          And the Patch is attached.

          Regards
          Dipu


          Environment any
          Igor Vaynberg made changes -
          Assignee Johan Compagner [ jcompagner ]
          Igor Vaynberg made changes -
          Link This issue duplicates WICKET-1258 [ WICKET-1258 ]
          Igor Vaynberg made changes -
          Resolution Fixed [ 1 ]
          Assignee Johan Compagner [ jcompagner ] Igor Vaynberg [ ivaynberg ]
          Fix Version/s 1.3.1 [ 12312500 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hide
          Rens Verhage added a comment - - edited

          More elegant way of fetching descendant input elements, without cumbersome loop

          /edit:
          Grmbl, nevermind my patch, doesn't seem to work in firefox...

          /edit 2:
          I stand corrected, my patch seems to also work within firefox. However, if I declare my HTML like:

          <table>
          <tr>
          <span wicket:id="radiogroup" id="someid">
          <td><input wicket:id="radio1" /></td>
          <td><input wicket:id="radio1" /></td>
          </span>
          </tr>
          </table>

          won't work as firefox does not accept the span tag between <tr> and <td>, and therefore will return a single node of #text when calling document.getElementById('someid').childNodes. Placing the span outside the table works. IE doesn't seem too picky about this.

          Show
          Rens Verhage added a comment - - edited More elegant way of fetching descendant input elements, without cumbersome loop /edit: Grmbl, nevermind my patch, doesn't seem to work in firefox... /edit 2: I stand corrected, my patch seems to also work within firefox. However, if I declare my HTML like: <table> <tr> <span wicket:id="radiogroup" id="someid"> <td><input wicket:id="radio1" /></td> <td><input wicket:id="radio1" /></td> </span> </tr> </table> won't work as firefox does not accept the span tag between <tr> and <td>, and therefore will return a single node of #text when calling document.getElementById('someid').childNodes. Placing the span outside the table works. IE doesn't seem too picky about this.
          Rens Verhage made changes -
          Attachment patch.txt [ 12374041 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          5d 9h 54m 1 Igor Vaynberg 14/Jan/08 21:18

            People

            • Assignee:
              Igor Vaynberg
              Reporter:
              Dipu C Seminlal
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development