Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread smallufo
But if I implement this Window-like panel by extending Border I have no way to notify the collapse/expand events to the containing content . In my previous implementation , the AbstractPullDownPanel defines two methods invisible()/visible() for successor to override , if they want to handle the

Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread Igor Vaynberg
add(new link(collapseOrExpand) { onclick() { expanded=!expanded; updateState(expanded); Border.this.visitChildren(new IVisitor() { public int onComponent(Component c) { if (c instanceof ExpandCollapseListener) {

Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread Timo Rantalaiho
On Wed, 04 Feb 2009, smallufo wrote: When traversalling the nodes , it cannot find any Component that implements ExpandCollapseListener. But the Panel that wrapped by the Border indeed implements ExpandCollapseListener PulldownBorder.this.visitChildren(new IVisitor() ... Here is

Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread smallufo
2009/2/4 Igor Vaynberg igor.vaynb...@gmail.com PulldownBorder border = new PulldownBorder(border , Test Title , true); border.setTransparentResolver(true); add(border); ^ that is all wrong you should create a border and to it add a panel that will be expanded/collapsed. so the panel

Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread Igor Vaynberg
PulldownBorder border = new PulldownBorder(border , Test Title , true); border.setTransparentResolver(true); add(border); ^ that is all wrong you should create a border and to it add a panel that will be expanded/collapsed. so the panel that is the content should be inside the border.

Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread smallufo
Thank you for such a practical IVisitor tutorial. But I have another problem : When traversalling the nodes , it cannot find any Component that implements ExpandCollapseListener. But the Panel that wrapped by the Border indeed implements ExpandCollapseListener Can you check where goes wrong ?