Revision history [back]

click to hide/show revision 1
initial version

asked 2014-04-30 15:16:39 +0800

fbaus1 gravatar image fbaus1

Error with using a Tabbox in a custom component

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

Error with using a Tabbox in a custom component

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

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