> the fact remains that getvariation() call from webpage constructor is
a
> bug we need to fix.
Yeah, that's my numero uno motivation at this point also.
> further we already have listener methods you can use - onattach and
> ondetach
>
> what you want can be just as easily accomplished on every component
>
> class mypage extends webpage {
> private boolean initted=false;
>
> public void onattach() {
> super.onattach();
> if (!initted) {
> initted=true;
> // perform one time initialization
> }
> }
> }
Wow, if I had used onAttach I could have made my source changes a whole
lot quicker (maybe) and only limited to one class:
WebApp.java
private boolean initted=false;
protected void init() {
}
private void commonInit() {
...
init(); // override this to add children etc.,
}
public void onattach() {
super.onattach();
if (!initted) {
initted=true;
// perform one time initialization
commonInit();
}
}
+remove calls to commonInit from WebPage constructors.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user