[ 
https://issues.apache.org/jira/browse/WICKET-3121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922938#action_12922938
 ] 

Jean-Francois Larouche commented on WICKET-3121:
------------------------------------------------

Well i have to thank you on this!

While creating the little app, i realised that there was 2 component of type 
RadioChoice with the same wicket:id.

One in the fragment the other outside.

Wicket was not complaining about it but i guess there was some sort of getById 
when you create the ModalWindow. So he was getting the first
Radio group instead of the one added to the Fragment.

thanks, It helped me a lot!

> Overriden method not called on Class RadioChoice inside a Modal Window.
> -----------------------------------------------------------------------
>
>                 Key: WICKET-3121
>                 URL: https://issues.apache.org/jira/browse/WICKET-3121
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.12
>         Environment: Java 1.6.0_21, eclipse, tomcat 5.5.
>            Reporter: Jean-Francois Larouche
>
> This is a very weird bug.
> We have a Radio Choice inside a Fragment that is a Popup window.
> Code:
>         final List<String> typeSocieteList = Arrays.asList(new String[] { 
> TypeSociete.CLIENT.getCode(), TypeSociete.FOURNISSEUR.getCode(), 
> TypeSociete.CLIENT_FOURNISSUER.getCode() });
>         final RadioChoice<String>radioChoiceCodeTypeSociete = new 
> RadioChoice<String>("societeBis.societeTypeSociete.codeTypeSociete", 
> typeSocieteList) {
>             @Override
>             protected boolean isDisabled(final String object, int index, 
> String selected)
>             {
>                 return !typeSocieteList.get(index).equals(object);
>             }
>             @Override
>             protected boolean wantOnSelectionChangedNotifications() {
>                 // TODO Auto-generated method stub
>                 return super.wantOnSelectionChangedNotifications();
>             }
>             
>         };
> At initialisation time, the wantsOnChangeNotification() is called on the 
> anonymous inner class.
> The isDisabled() is not since the ENABLED_IN_HIERARCHY is false (The popup 
> window is not visible at first)
> Code of RadioChoice:
> boolean enabled = isEnabledInHierarchy() && !isDisabled(choice, index, 
> selected);
> When the Popup window is shown, the onComponentBodyTag is called again BUT. 
> None of the overriding methods gets called!!!
> I never saw that. Unless the object instance gets changed somehow?

-- 
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