0

custom window in custom panel: acts as normal window: onCreate not performed

asked 2009-07-14 16:15:23 +0800

barema gravatar image barema
69 1

in a zk-page, i use a custom panel (extending Panel)
<panel use="com.mything.MyPanel">
next to that I have a class MyWindow extending Window, having an onCreate() override.

public void onCreate(){
this.setTitle("test");
}

in MyPanel's onCreate(), I would like to add an instance of MyWindow to the panelchildren:

Panelchildren panelchildren=new Panelchildren();
MyWindow win=new MyWindow();
panelchildren.appendChild(win);
this.appendChild(panelchildren);

...

But it seems not to work: I would have to call the onCreate method myself to get the desired behaviour.
It works perfect if I set the title after instantiating, or calling the onCreate method.
Any ideas why / how to fix this ?

Regards,
Bart

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-07-14 21:17:33 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

This is working for me in the ZK editor

<panel title="testPanel">
<panelchildren>
<window>
<button label="Button"></button>
</window>
</panelchildren>
</panel>

But it seems not to work: 

what seems not to work?

Yes, you must set a titel that you can see an empty panel.

Stephan

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-07-14 16:15:23 +0800

Seen: 172 times

Last updated: Jul 14 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More