[Wicket-user] reference from deeply nested links

2007-07-02 Thread Pieter Cogghe
Hi, I've got a bunch of links deeply nested in some listViews, panels, ... . These links should set the ModelObject of a form that resides at top level. Something like this: id=SectionPanel some-listview some-panel another-listview - yet-another - link to edit some content (these classes are

Re: [Wicket-user] reference from deeply nested links

2007-07-02 Thread Janos Cserep
Now I need a reference to the EditForm in the deeply nested links. As there are a lot of seperate classes involved (no nested classes), I can't do something like this: MyPage.this.editPanel.setModelOject(...); findParent(EditPanel.class) or getPage().get(editPanel) j

Re: [Wicket-user] reference from deeply nested links

2007-07-02 Thread Pieter Cogghe
Thanks a lot. Read about findParent before, but forgot about them completely. 2007/7/2, Janos Cserep [EMAIL PROTECTED]: Now I need a reference to the EditForm in the deeply nested links. As there are a lot of seperate classes involved (no nested classes), I can't do something like this:

Re: [Wicket-user] reference from deeply nested links

2007-07-02 Thread Eelco Hillenius
findParent(EditPanel.class) That's a good solution if you want to help keep your code clean. However, having direct references - while it can get messy when you have very deep nestings, means that your code is statically bound, which can be an advantage when you have to refactor or navigate your