0

Error with using a Tabbox in a custom component

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

fbaus1 gravatar image fbaus1
1

updated 2014-04-30 15:17:07 +0800

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

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-04-30 16:18:13 +0800

sitansu gravatar image sitansu
2254 13
http://java91.blogspot.in...

updated 2014-04-30 16:21:53 +0800

I thing you problem is you are not end tab tag <tab/> and </tabpanels>:

  <tabbox>
    <tabs>
      <tab label="Test"/>
   </tabs>
   <tabpanels>
     <tabpanel> Panel </tabpanel>
   </tabpanels>
 </tabbox>

Suppose you are getting any issue please create zkfidle and give a link.

http://zkfiddle.org/

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

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

Seen: 8 times

Last updated: Apr 30 '14

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