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

Juergen Donnerstag commented on WICKET-2625:
--------------------------------------------

Why does it make sense to cache it anyway? Shouldn't the visibility be much 
rather a function of the MarkupContainer that implements the tab?

> WICKET-2478 correction are break
> --------------------------------
>
>                 Key: WICKET-2625
>                 URL: https://issues.apache.org/jira/browse/WICKET-2625
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket-extensions
>    Affects Versions: 1.4.4
>            Reporter: Pedro Santos
>
> By increasing the array before checking with 1 the code will work when user 
> add only one tab to component...
> The applied solution break the correction made for the issue WICKET-2478
> I propose:
> ++            if (tabsVisibilityCache == null || tabsVisibilityCache.length 
> != tabs.size())
>               {
>                       tabsVisibilityCache = new Boolean[tabs.size()];
>               }
> --            if (tabsVisibilityCache.length < tabIndex + 1)
> --            {
> --                    Boolean[] resized = new Boolean[tabIndex + 1];
> --                    System.arraycopy(tabsVisibilityCache, 0, resized, 0, 
> tabsVisibilityCache.length);
> --                    tabsVisibilityCache = resized;
> --            }

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