-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Hi,
I am fairly new to ZK, and currently developing a custom component . The component itself is working as intended, it sort of looks like this:
<xcomponent title="test">
<tabbox>
<tabs>
<tab label="Test">
</tabs>
<tabpanels>
<tabpanel> Panel </tabpanel>
</tabpanel>
</tabbox>
</xcomponent>
What I'd like to do know is to take whatever is inside <xcomponent> </xcomponent>, put that into a Popup and open that whenever the user clicks on the component.
Therefore I've written the following piece of JAVA Code:
popup = new Popup();
popup.setId(this.getUuid());
popup.setWidth("890px");
for(Iterator<Component> it=this.getChildren().iterator(); it.hasNext();) {
Component xy = (Component)it.next().clone();
xy.setParent(popup);
}
popup.setParent(this);
This works pretty well actually, but when I use a TabBox with orientation=left or right, an error gets thrown.
TypeError: n is undefined in zul.tab.wpd Line 1123
As I am fairly new to this framework, is this even the right approach? What could I do better instead? The complete Java Class can be found here: pastebin.com/tkEW5G1L
Thanks for you help in advance,
Frank
2 | No.2 Revision |
Hi,
I am fairly new to ZK, and currently developing a custom component . The component itself is working as intended, it sort of looks like this:
<xcomponent title="test">
<tabbox>
<tabs>
<tab label="Test">
</tabs>
<tabpanels>
<tabpanel> Panel </tabpanel>
</tabpanel>
</tabbox>
</xcomponent>
What I'd like to do know is to take whatever is inside <xcomponent> </xcomponent>, put that into a Popup and open that whenever the user clicks on the component.
Therefore I've written the following piece of JAVA Code:
popup = new Popup();
popup.setId(this.getUuid());
popup.setWidth("890px");
for(Iterator<Component> it=this.getChildren().iterator(); it.hasNext();) {
Component xy = (Component)it.next().clone();
xy.setParent(popup);
}
popup.setParent(this);
}
popup.setParent(this);
This works pretty well actually, but when I use a TabBox with orientation=left or right, an error gets thrown.
TypeError: n is undefined in zul.tab.wpd Line 1123
As I am fairly new to this framework, is this even the right approach? What could I do better instead? The complete Java Class can be found here: pastebin.com/tkEW5G1L
Thanks for you help in advance,
Frank