You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sergey Derugo (JIRA)" <ji...@apache.org> on 2008/11/06 15:45:50 UTC

[jira] Created: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

MarkupContainer.setEnabled() doesn't enable/disable child components
--------------------------------------------------------------------

                 Key: WICKET-1919
                 URL: https://issues.apache.org/jira/browse/WICKET-1919
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4-M3, 1.3.3
            Reporter: Sergey Derugo
             Fix For: 1.4-RC2


# Create any components that is derived from MarkupContainer, for example, create Panel. 
# Put some components to the Panel, for example, TextInput, Label etc.
# Call panel.setEnabled(false) 

Result: all controls on panel are still disabled.

Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 

Workaround: manually disable all components that are displayed on the panel, for example:
public void setEnabledForChildren(boolean enabled) {
        setEnabledRecursive(this, enabled);
    }

    private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
        Iterator<? extends Component> iterator = container.iterator();
        while (iterator.hasNext()) {
            Component component = iterator.next();
            component.setEnabled(enabled);

            if (component instanceof MarkupContainer) {
                setEnabledRecursive((MarkupContainer) component, enabled);
            }
        }
    }

I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Closed: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo closed WICKET-1919.
---------------------------------


Accepted

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>            Assignee: Igor Vaynberg
>             Fix For: 1.4-RC2
>
>         Attachments: src.zip
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Updated: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo updated WICKET-1919:
----------------------------------

    Description: 
1. Create any components that is derived from MarkupContainer, for example, create Panel. 
2. Put some components to the Panel, for example, TextInput, Label etc.
3. Call panel.setEnabled(false) 

Result: all controls on panel are still enabled.

Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 

Workaround: manually disable all components that are displayed on the panel, for example:
public void setEnabledForChildren(boolean enabled) {
        setEnabledRecursive(this, enabled);
    }

    private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
        Iterator<? extends Component> iterator = container.iterator();
        while (iterator.hasNext()) {
            Component component = iterator.next();
            component.setEnabled(enabled);

            if (component instanceof MarkupContainer) {
                setEnabledRecursive((MarkupContainer) component, enabled);
            }
        }
    }

I think that MarkupContainer must be responsible for disabling/enabling child components.

  was:
1. Create any components that is derived from MarkupContainer, for example, create Panel. 
2. Put some components to the Panel, for example, TextInput, Label etc.
3. Call panel.setEnabled(false) 

Result: all controls on panel are still disabled.

Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 

Workaround: manually disable all components that are displayed on the panel, for example:
public void setEnabledForChildren(boolean enabled) {
        setEnabledRecursive(this, enabled);
    }

    private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
        Iterator<? extends Component> iterator = container.iterator();
        while (iterator.hasNext()) {
            Component component = iterator.next();
            component.setEnabled(enabled);

            if (component instanceof MarkupContainer) {
                setEnabledRecursive((MarkupContainer) component, enabled);
            }
        }
    }

I think that MarkupContainer must be responsible for disabling/enabling child components.


> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Updated: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo updated WICKET-1919:
----------------------------------

    Attachment:     (was: MyPanel.java)

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>         Attachments: src.zip
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Resolved: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Igor Vaynberg resolved WICKET-1919.
-----------------------------------

    Resolution: Fixed

only fixing this in 1.4

in 1.3 it will alter existing functionality in production systems.

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>            Assignee: Igor Vaynberg
>             Fix For: 1.4-RC2
>
>         Attachments: src.zip
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Updated: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo updated WICKET-1919:
----------------------------------

    Attachment: PanelTestPage.html

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>         Attachments: MyPanel.html, MyPanel.java, PanelTestPage.html
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Commented: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

Posted by "Sergey Derugo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645487#action_12645487 ] 

Sergey Derugo commented on WICKET-1919:
---------------------------------------

In the attachment [^src.zip] you can find simple test case

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>         Attachments: src.zip
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Assigned: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Igor Vaynberg reassigned WICKET-1919:
-------------------------------------

    Assignee: Igor Vaynberg

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>            Assignee: Igor Vaynberg
>             Fix For: 1.4-RC2
>
>         Attachments: src.zip
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Updated: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo updated WICKET-1919:
----------------------------------

    Attachment: MyPanel.java

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>         Attachments: MyPanel.html, MyPanel.java, PanelTestPage.html
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Updated: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo updated WICKET-1919:
----------------------------------

    Attachment:     (was: PanelTestPage.html)

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>         Attachments: src.zip
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Updated: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo updated WICKET-1919:
----------------------------------

    Attachment: MyPanel.html

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>         Attachments: MyPanel.html, MyPanel.java, PanelTestPage.html
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Updated: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo updated WICKET-1919:
----------------------------------

    Attachment:     (was: MyPanel.html)

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>         Attachments: src.zip
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Issue Comment Edited: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

Posted by "Sergey Derugo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645487#action_12645487 ] 

xsergey edited comment on WICKET-1919 at 11/6/08 7:02 AM:
----------------------------------------------------------------

In the attachment(src.zip) you can find simple test case

      was (Author: xsergey):
    In the attachment [^src.zip] you can find simple test case
  
> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>         Attachments: src.zip
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Updated: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo updated WICKET-1919:
----------------------------------

    Attachment: src.zip

> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>         Attachments: src.zip
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still enabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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


[jira] Updated: (WICKET-1919) MarkupContainer.setEnabled() doesn't enable/disable child components

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

Sergey Derugo updated WICKET-1919:
----------------------------------

    Description: 
1. Create any components that is derived from MarkupContainer, for example, create Panel. 
2. Put some components to the Panel, for example, TextInput, Label etc.
3. Call panel.setEnabled(false) 

Result: all controls on panel are still disabled.

Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 

Workaround: manually disable all components that are displayed on the panel, for example:
public void setEnabledForChildren(boolean enabled) {
        setEnabledRecursive(this, enabled);
    }

    private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
        Iterator<? extends Component> iterator = container.iterator();
        while (iterator.hasNext()) {
            Component component = iterator.next();
            component.setEnabled(enabled);

            if (component instanceof MarkupContainer) {
                setEnabledRecursive((MarkupContainer) component, enabled);
            }
        }
    }

I think that MarkupContainer must be responsible for disabling/enabling child components.

  was:
# Create any components that is derived from MarkupContainer, for example, create Panel. 
# Put some components to the Panel, for example, TextInput, Label etc.
# Call panel.setEnabled(false) 

Result: all controls on panel are still disabled.

Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 

Workaround: manually disable all components that are displayed on the panel, for example:
public void setEnabledForChildren(boolean enabled) {
        setEnabledRecursive(this, enabled);
    }

    private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
        Iterator<? extends Component> iterator = container.iterator();
        while (iterator.hasNext()) {
            Component component = iterator.next();
            component.setEnabled(enabled);

            if (component instanceof MarkupContainer) {
                setEnabledRecursive((MarkupContainer) component, enabled);
            }
        }
    }

I think that MarkupContainer must be responsible for disabling/enabling child components.


> MarkupContainer.setEnabled() doesn't enable/disable child components
> --------------------------------------------------------------------
>
>                 Key: WICKET-1919
>                 URL: https://issues.apache.org/jira/browse/WICKET-1919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.4-M3
>            Reporter: Sergey Derugo
>             Fix For: 1.4-RC2
>
>
> 1. Create any components that is derived from MarkupContainer, for example, create Panel. 
> 2. Put some components to the Panel, for example, TextInput, Label etc.
> 3. Call panel.setEnabled(false) 
> Result: all controls on panel are still disabled.
> Notes: after some investigation I found that MarkupContainer doesn't override setEnabled and therefore it cannot enable/disable components stored in the container. 
> Workaround: manually disable all components that are displayed on the panel, for example:
> public void setEnabledForChildren(boolean enabled) {
>         setEnabledRecursive(this, enabled);
>     }
>     private void setEnabledRecursive(MarkupContainer container, boolean enabled) {
>         Iterator<? extends Component> iterator = container.iterator();
>         while (iterator.hasNext()) {
>             Component component = iterator.next();
>             component.setEnabled(enabled);
>             if (component instanceof MarkupContainer) {
>                 setEnabledRecursive((MarkupContainer) component, enabled);
>             }
>         }
>     }
> I think that MarkupContainer must be responsible for disabling/enabling child components.

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