You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jean-Francois Larouche (JIRA)" <ji...@apache.org> on 2010/10/20 09:07:23 UTC

[jira] Created: (WICKET-3121) Overriden method not called on Class RadioChoice inside a Modal Window.

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.


[jira] Closed: (WICKET-3121) Overriden method not called on Class RadioChoice inside a Modal Window.

Posted by "Jean-Francois Larouche (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Francois Larouche closed WICKET-3121.
------------------------------------------

    Resolution: Not A Problem

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


[jira] Commented: (WICKET-3121) Overriden method not called on Class RadioChoice inside a Modal Window.

Posted by "Jean-Francois Larouche (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (WICKET-3121) Overriden method not called on Class RadioChoice inside a Modal Window.

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922882#action_12922882 ] 

Martin Grigorov commented on WICKET-3121:
-----------------------------------------

Please attach a quickstart application

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