[ 
https://issues.apache.org/jira/browse/TAPESTRY-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578948#action_12578948
 ] 

Howard M. Lewis Ship commented on TAPESTRY-2261:
------------------------------------------------

Here's a hack I'm using for a client:

radioTriggerHack : function(radio, element)
{
    var radio = $(radio);

    $(radio.form).observe("change", function() {

        var elem = $(element)
        
        if (! radio.checked && elem.visible()) { elem.formFragment.hide(); }
    });
}


Basically, observe every change throughout the containing form, and use that as 
an opportunity to check to see if the element is visible but shouldn't be.

This kind of thing could be integrated into tapestry.js, i.e., the FormFragment 
object could add this additional listener if the triggering object's type is 
"radio" (not "checkbox").

> TriggerFragment mixin should work with Radio as well as Checkbox components
> ---------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2261
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2261
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.11
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Currently, it sees the radio being selected, but when a different radio is 
> clicked, it doesn't hide the associated form fragment.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to