Re: Linb in other js framework

48 views
Skip to first unread message

Jack Lee

unread,
Apr 17, 2013, 10:02:33 AM4/17/13
to li...@googlegroups.com
In this case, you need use reLayout function

com.getUIComponents().reLayout(true);


On Wednesday, April 17, 2013 5:48:41 PM UTC+8, Maxim Anikin wrote:
Hi!

Is it possible to use linb as part of application written on other js framework?

I reconfigure my extjs project and install all needed linb runtime in it. So it's possible to open jsLinb UI Builder at new browser window and create linb forms in it. Also it's possible to view resulting compiled forms at my main project window (linb.Com.load('MyApp', function(com){linb('loading').remove();};,'ru', true)). Now I want to view linb forms inside my application as part of large panel with a lot of extjs element. I create a stand-alone panel for linb form and I'm sure that it renders with required size.

Firstly, UI Builder form. It works great because UI Builder has UIBuilder.html as main page, so it's possible just to put it inside iframe and use relative path to project's UIBuilder.html.

Secondly, custom linb form. I can't figure out how to build it inside my extjs panel (panel is just a <div> element). As I mentioned it works with main window (I think linb form renders on Window object). I use linb.Com.show('MyApp', parent) function, but parent has to be linb.Com or linb.DOM to use (parent || linb("body")).append(self.getUIComponents(),subId) inside that linb.Com.show method. Then I try to add DOM element inside my panel : get linb('MyApp') and add this object to DOM element, but it doesn't render good:
<div id="function (value, ignoreCache){ var t,i,cache=linb.$cache.profileMap; if(typeof value == 'string') return this.each(function(o){ if((i=o.id)!==value) ... and many lines after that.

As I see different solutions:
1. Redefine a default area on some non-linb object for rendering linb forms. As I understand, by default it renders on linb('body') and Window object. It will be great solution.
2. Somehow generate a proper html and use it (it's possible to use both full html page (with <html> tag) with iframe or just one or several <div>). Standard DOM element is acceptable too. Not bad solution too.
3. Patch linb.Com.show method or implement append method in my extjs panel that - not good idea I think =).

Thanks for your help or ideas.


Reply all
Reply to author
Forward
0 new messages