remove border.settransparentresolver(true);

instead of
add(listViewContainer.add(listView));
do
border.add(listViewContainer.add(listView));

now your component hierarchy is proper, things are actually inside the
border - which is how the border is meant to be used.

your main problem was this line:
listViewContainer.setVisible(defaultExpanded)
^ you never reset this to visible when the border is expanded, simply
removing this line will work since you are now using the border

there is a problem with component use check when it comes to doing
this sort of visibility
https://issues.apache.org/jira/browse/WICKET-2079
so simply disable it in your application.init()
getDebugSettings().setComponentUseCheck(false);

and now you have a working collapsible border.

-igor

On Wed, Feb 4, 2009 at 2:56 PM, smallufo <[email protected]> wrote:
> I don't know if the problem has any relation to WICKET-1789
> https://issues.apache.org/jira/browse/WICKET-1789
> But I have a very similar situation :
> My problem traces back to WICKET-1712
> https://issues.apache.org/jira/browse/WICKET-1712
> I want to create a component which can "Expand" and "Collapse" its content ,
> just like a window.
> I originally inheritd Panel to implement it , but Igor Vaynberg told me that
> is wrong , the correct way is to use a Border.
> But several days passed by , I still cannot finish the component ,
> I am stuck to the situation very much like WICKET-1789 :
> That the border fails to render if its contents are not visible by default.
> According to WICKET-1789 , it says 1.3.5 has fixed the problem , but I still
> have this problem.
> The attachment is my quickstart code , which draws two panels in one page ,
> one panel is default expand , another is default collapsed.
> The "default_expanded" panel can successfully collapse and expand again and
> again.
> But the "default_collapsed" panel just has no response ....
> I tried every way I can think , but still find no solution.
> Can somebody help me check the code , telling me where goes wrong .
> Thanks a lot.
> --
> smallufo
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to