tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Callender (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-2220) RadioGroup goes wrong in AJAX submit: gets set to first value
Date Sun, 10 Nov 2013 07:07:18 GMT

    [ https://issues.apache.org/jira/browse/TAP5-2220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13818382#comment-13818382
] 

Geoff Callender commented on TAP5-2220:
---------------------------------------

I suspect the solution is to add 3 lines to forms.js#gatherParameters…

        if (type === "radio" && field.checked() === false) {
          return;
        }


> RadioGroup goes wrong in AJAX submit: gets set to first value
> -------------------------------------------------------------
>
>                 Key: TAP5-2220
>                 URL: https://issues.apache.org/jira/browse/TAP5-2220
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Geoff Callender
>            Priority: Blocker
>
> Using T5.4 alpha-23.
> A non-AJAX submit of a RadioGroup works just fine…
>         <t:form t:id="inputs">
>             <t:RadioGroup t:id="radiooo" value="radioSelectedValue">
>                 <t:Radio t:id="radioH" value="literal:H" label="High" type="radio"/><t:label
for="radioH"/><br/>
>                 <t:Radio t:id="radioM" value="literal:M" label="Medium" type="radio"/><t:label
for="radioM"/><br/>
>                 <t:Radio t:id="radioL" value="literal:L" label="Low" type="radio"/><t:label
for="radioL"/>
>             </t:RadioGroup>
>             
>             <input type="submit" value="Submit"/>
>         </t:form>
> …but when you turn it into an AJAX submit, it always sets the RadioGroup value to the
first Radio's value (which is "H" in this example)…
>     <t:zone t:id="zzz">
>         <t:form t:id="inputs" zone="^">
>             <t:RadioGroup t:id="radiooo" value="radioSelectedValue">
>                 <t:Radio t:id="radioH" value="literal:H" label="High" type="radio"/><t:label
for="radioH"/><br/>
>                 <t:Radio t:id="radioM" value="literal:M" label="Medium" type="radio"/><t:label
for="radioM"/><br/>
>                 <t:Radio t:id="radioL" value="literal:L" label="Low" type="radio"/><t:label
for="radioL"/>
>             </t:RadioGroup>
>             
>             <input type="submit" value="Submit"/>
>         </t:form>
>     </t:zone>



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message