Add ability to have Radio and RadioGroup not related via component hierarchy
----------------------------------------------------------------------------

                 Key: WICKET-1055
                 URL: https://issues.apache.org/jira/browse/WICKET-1055
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.3.0-beta3
            Reporter: Tim O'Brien
             Fix For: 1.3.0-beta4
         Attachments: patch-detached-radio.txt

I was working on an application that needed to be able to support a Radio 
button that wasn't nested within a RadioGroup.   Here's an illustration of the 
component hierarchy I needed to support:

<span wicket:id="radioGroup1"></span>
<input type="radio"  wicket:id="option1A"/>
<input type="radio"  wicket:id="option1B"/>

The existing RadioGroup/Radio code relies on the component hierarchy, so the 
only way to render a radio group would be:

<span wicket:id="radioGroup1">
  <input type="radio" wicket:id="option1A"/>
  <input type="radio" wicket:id="option1B"/>
</span>

The following patch to Radio and RadioGroup adds the ability to provide an 
explicit relationship between Radio and RadioGroup - bypassing the component 
hierarchy.

Why did I need this?   The application I'm working on creates a form based on 
meta-data about a specific object.   There were a few situation where I needed 
to render two radio options in different parts of a form, and then only way to 
support this was to violate the hierarchy requirement of Radio/RadioGroup.   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to