Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1551

f:ajax doesn't work in t:selectOneRadio layout="spread"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.10
    • 1.1.11
    • selectOneRadio / radio
    • None
    • Mojarra 2.0.3, Tomcat 6.0.29, Eclipse 3.6, Windows XP

    Description

      The f:ajax doesn't work in t:selectOneRadio layout="spread". Judging the HTML source, it incorrectly obtains the client ID of t:selectOneRadio instead of the one of the t:radio (or just "this") as first argument of the ajax function. This is been used in document.getElementById() which in turns returns null/undefinied and breaks the ajax function.

      XHTML source:
      <t:selectOneRadio id="item" value="#

      {bean.item}

      " layout="spread">
      <f:selectItems value="#

      {bean.items}

      " />
      <f:ajax event="click" />
      </t:selectOneRadio>
      <t:radio for="item" index="0" />
      <t:radio for="item" index="1" />

      Generated HTML source (labels omitted):
      <input id="form:item:0" type="radio" name="form:item" value="item1" onclick="mojarra.ab('form:item',event,'click',0,0)" />
      <input id="form:item:1" type="radio" name="form:item" value="item2" onclick="mojarra.ab('form:item',event,'click',0,0)" />

      Expected HTML source (labels omitted):
      <input id="form:item:0" type="radio" name="form:item" value="item1" onclick="mojarra.ab('form:item:0',event,'click',0,0)" />
      <input id="form:item:1" type="radio" name="form:item" value="item2" onclick="mojarra.ab('form:item:1',event,'click',0,0)" />
      OR
      <input id="form:item:0" type="radio" name="form:item" value="item1" onclick="mojarra.ab(this,event,'click',0,0)" />
      <input id="form:item:1" type="radio" name="form:item" value="item2" onclick="mojarra.ab(this,event,'click',0,0)" />

      Attachments

        Issue Links

          Activity

            People

              lu4242 Leonardo Uribe
              balusc Bauke Scholtz
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: