How to Load UI module to Tabs UI?

Develop and Deploy Cross-Browser Web Apps .

How to Load UI module to Tabs UI?

Postby wahono77 » Fri Apr 26, 2013 10:32 am

I try cross link between class, but I don't get success.
My plan is load a module and render it to tabs panel, and from module I can activate specific tabs item.

I attached simple test case, please help me to learn cross link in CrossUI.

Thanks
Attachments
Acosys.zip
(5.2 KiB) Downloaded 209 times
wahono77
 
Posts: 90
Joined: Sat Apr 13, 2013 6:04 am

Re: How to Load UI module to Tabs UI?

Postby linb » Fri Apr 26, 2013 2:10 pm

linb
Site Admin
 
Posts: 102
Joined: Thu Apr 25, 2013 6:51 am

Re: How to Load UI module to Tabs UI?

Postby wahono77 » Fri Apr 26, 2013 2:42 pm

I've play with this examples for a day, but I can't try it with Tabs. :D
wahono77
 
Posts: 90
Joined: Sat Apr 13, 2013 6:04 am

Re: How to Load UI module to Tabs UI?

Postby wahono77 » Fri Apr 26, 2013 3:04 pm

I try with this :
[code2=javascript] host.ctl_tabs6.addPanel([{"id":"tab1", "caption":"tab 1"}],[],this.getUIComponents());[/code2]

The module loaded but I got error : Uncaught TypeError: Cannot read property 'style' of null
What is correct parameter for addPanel?
wahono77
 
Posts: 90
Joined: Sat Apr 13, 2013 6:04 am

Re: How to Load UI module to Tabs UI?

Postby linb » Sat Apr 27, 2013 12:49 am

See attached please
Attachments
Acosys.rar
(2.94 KiB) Downloaded 223 times
linb
Site Admin
 
Posts: 102
Joined: Thu Apr 25, 2013 6:51 am

Re: How to Load UI module to Tabs UI?

Postby wahono77 » Sat Apr 27, 2013 1:41 am

Thanks, but it doesn't add new tabs, how to use tabs.addPanel?
wahono77
 
Posts: 90
Joined: Sat Apr 13, 2013 6:04 am

Re: How to Load UI module to Tabs UI?

Postby wahono77 » Sat Apr 27, 2013 1:53 am

I got it!

_ctl_sbutton1_onclick : function (profile, e, src, value) {
var uictrl = profile.boxing();
var host = this;
linb.ComFactory.getCom('App.tab1',function() {
host.ctl_tabs6.insertItems([{"id":"customer", "caption":"Customer"}]);
host.ctl_tabs6.append(this,"customer");
});
}

CrossUI library has a thousand way to do something, :D
But I need answer for tabs.addPanel, I don't found it in samples
wahono77
 
Posts: 90
Joined: Sat Apr 13, 2013 6:04 am

Re: How to Load UI module to Tabs UI?

Postby linb » Sat Apr 27, 2013 3:14 am

linb
Site Admin
 
Posts: 102
Joined: Thu Apr 25, 2013 6:51 am

Re: How to Load UI module to Tabs UI?

Postby wahono77 » Sat Apr 27, 2013 8:33 am

In code snipse I found it too, but para variable is filled with getPanelPara. I try to know what's content of getPanelPara, but I can't.

I try to convert para variable to string, but I got it as "object".
Another problem with me to learn library concept is, every array property use JSON to set it, and I should write it manually. Where can I get information what's properties can I set to a items array?

thanks
wahono77
 
Posts: 90
Joined: Sat Apr 13, 2013 6:04 am

Re: How to Load UI module to Tabs UI?

Postby linb » Sat Apr 27, 2013 8:43 am

You can set a breakpoint and monitor "getPanelPara" var in chrome's dev window, or firefox's firebug .
linb
Site Admin
 
Posts: 102
Joined: Thu Apr 25, 2013 6:51 am

Next

Return to CrossUI for Web Apps

Who is online

Users browsing this forum: No registered users and 0 guests

cron