You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Johan Compagner (JIRA)" <ji...@apache.org> on 2007/10/03 16:48:50 UTC

[jira] Closed: (WICKET-470) AjaxFormComponentUpdatingBehavior won't work for RadioChoices

     [ https://issues.apache.org/jira/browse/WICKET-470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner closed WICKET-470.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-beta4

ok closing this bug, we could merge the 2 into each other in the futher if needed,
I improved the javadoc a bit so that they point to each other

> AjaxFormComponentUpdatingBehavior won't work for RadioChoices
> -------------------------------------------------------------
>
>                 Key: WICKET-470
>                 URL: https://issues.apache.org/jira/browse/WICKET-470
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>            Reporter: Carlos Pita
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta4
>
>         Attachments: AjaxFormChoiceComponentUpdatingBehavior.java
>
>
> Below is the generated html and js for a simple RadioChoice("sex", Arrays.asList("M", "F")) with an attached behavior. Notice how wicketSerialize will take the else branch for span elements, so it will always return "". Maybe the behavior should be patched, maybe the js, maybe there is a need for another behavior, I don't know.
> <span wicket:id="sex" id="sex5" onblur="var
> wcall=wicketAjaxPost('test?wicket:interface=:2:testForm:sex::IBehaviorListener:0',
> wicketSerialize(document.getElementById('sex5')), function() { },
> function() { });">
> <input name="sex" type="radio" value="0" id="sex_0"/><label
> for="sex_0">M</label><br />
> <input name="sex" type="radio" value="1" id="sex_1"/><label
> for="sex_1">F</label><br />
> </span>
> wicketSerialize = Wicket.Form.serializeElement;
> Wicket.Form.serializeElement = function(e) {
> var tag = e.tagName.toLowerCase();
> if (tag == "select") {
> return Wicket.Form.serializeSelect(e);
> } else if (tag == "input" || tag == "textarea") {
> return Wicket.Form.serializeInput(e);
> } else {
> return "";

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