IntroductionExtBuilder is an eclipse plugin can help developer work out good style Ext javascript code without typing code. InstallationEclipse 3.x
- make sure you eclipse version is 3.2,3.3 or 3.4 with GEF installed.
- download archived update site from http://code.google.com/p/extbuilder/downloads/list
- Click Help->Software Updates->Find and Install...->Search for new features to install,Click Next
- Click New Archived Site-> Browse to extbuilder_update.zip and click Open.
- Click OK and follow the instructions to install.
- Restart you eclipse
Apatana
- Install Apatanta as a plugin to Eclipse.
- Install ExtBuilder to Eclipse
Note: Apatana Studio removed some build-in plugins from Eclipse, such as GEF,icu,JDT,etc. If you definitely want to use Apatana Studio without eclipse, please install these plguins first.
StartingKick start- Click Windows->Preferences..->ExtJs Builder
- Click Browse button to select your Ext home directory.
- Click File->New, then select Web->ExtJs Page. a wizard dialog will appear.
- Click Next
- Input the namespace you want
- Input class name you want, extbuilder create one class in one file, just like Java
- Input the file name, default is the class name
- Select super class, default is Ext.Panel, you also can create a window by select Ext.Window
- Click Finish.
- Then there are two files created in Package Explorer, for example: CorpSelectPanel.ext and CorpSelectPanel.js. The first file is used by extbuilder, the second file is the script file for you.
OverviewBefore you start to editing a Ext page, make sure you opened Outline View and Properties View. If not, please click Window->Show View to open these two views.
Editor View
It’s a multi-pages editor contains a source code editor and a UI editor.
In source code editor, you can see the real code extbuilder generate for you. Please focus the initUIComponents function.
In UI editor, you can see one palette at left side and a embedded browser at right side. With the embedded browser, you can preview the code generated by ExtBuilder.
Outline View
The outline view is a component tree view. You can select specific component in the view.
Properties View
The most important view you have to deal. In this view, you can set the configuration of one component.
For example:
For a Panel component, you may set the title property to ‘MyPanel’, the layout property to ‘Border’, the width property to ‘100’, etc.
For a GridPanel component, you may set the store property and columns property.
All you change make to a component take effect immediately. Both the code editor and UI editor will change. It’s a good way to watch your settings how change the UI to your wanted style.
Drag Components
In UI editor, you can see a palette with some components in several folders.
Now extbuilder supports most components in latest Ext 2.2
You could click one component, such as a Panel then move the mouse to outline view, there must be a component named panel, it's the root component of one panel class. Click the mouse again, then the root panel component now have a child panel.
In the way, you can use any components and organize the component tree as you wish.
Although you may think drag a component and drop it to a canvas is better, but that means ExtBuilder need to implement all Ext components drawing,behavior and layout in Java code. From my opinion, this way is the fastest way to build a GUI page.
How toSet PropertiesExt component have many properties. ExtBuilder divide these properties into two categories: common properties and advanced properties. By default, only common properties are shown,you can show advanced properties by click the Advanced button at the top toolbar of Properties View.
Properties can be string, integer,drop down list. Some special properties like store, toolbar,buttons,columns Model will pop up a dialog for user set.
Set LayoutThere are two panels, one parent, one child.
- Create a new Ext page
- Set the root panel's tilte to 'ParentPanel'
- Add a Panel to page root panel component
- Set the child panel's title to 'ChildPanel'
- Click the parent panel on outline view
- Set the parent panel's layout to 'Border'
- Click the child panel on outline view
- Set the child panel's region to 'center'
Because Ext border layout require a center region component, so when you set the layout to 'border', and not set the child panel's region to 'center', you may see some error message in browser, it's not a bug of ExtBuilder.
FormPanel- Create a new Ext page
- Add a FormPanel to root panel
- Set the FormPanel's layout to 'column'
- Add two Panels to FormPanel, set columnWidth to '.5'
- Set these two Panels's layout to 'form'
- Add 4 TextField to these Two Panel, each have two
Then you get a two column form panel
ToolbarEach Ext Panel has two toolbars, tbar and bbar.
- Click one Panel of Outline view.
- Click Properties view, scroll to tbar or bbar property
- Click the right side button '...' to show Toolbar Settings Dialog
- In Toolbar Settings Dialog, click Add Button(+) to add Button,Separator,Spacer,Fill,TextItem and MenuButton. Menu editing is not ready in current version.
- Change the text toolbar text, by default, the handler is as "onButtonTextClick". Of course, you can change the handler function name.
- Then switch to Source code Editor, see what happened.
tbar : new Ext.Toolbar([{
handler : function(button, event) {
this.onButtonClick(button, event);
}.createDelegate(this),
text : "button"
}])Look at this code block, I use a little trick. Because ExtBuilder need to show preview page for users, some javascript errors will make the preview page as blank page. So I have to make it runs fine when renderer ext components.
You may need to write your own event handler function in your class.
For example:
...,
onButtonClick : function(button, event){
// your code here
} ButtonsEach Panel has one buttons property. Just same as Toolbar buttons editing except the component can add here is only Ext.Button.
You can use buttonAlign to align button at left,right or center.
GridExtBuilder support three grid panels. GridPanel,PagingGridPanel and EditorGridPanel.
PagingGridPanel is a gridpanel with paging toolbar on bottom.
Store
Store can take data from remote(HttpProxy) or local(MemoryProxy). Here is a example we use MemoryProxy to build grid.
- Click '...' button to show Store Settings Dialog
- Select MemoryProxy in Basic Page
- Click Sample button to generate some random data
- Click OK button to save store settings.
- Add loadData function in class
loadData : function() {
this.store1.load();
}
here store1 is the component name of store.
- Add code in class constructor function
system.CorpSelectPanel = function(config) {
Ext.applyIf(this, config);
this.initUIComponents();
system.CorpSelectPanel.superclass.constructor.call(this);
//load store data here
this.loadData();
};
Now, you can see the data at preview page.
ColumnsTreeListenersExtension
|
good job, we are looking forward! :)
Nice work. This is exactly what is needed to rapidly develop ExtJS applications.
very good
thank you ,very good
Very Good !!!
FormPanel? how show???
Great work.
I have a question, you said: " In the way, you can use any components and organize the component tree as you wish."
But how can I use components not in the components palette? Such as a component developed by the extbuilder? Thanks.
good job, this is a killer, keep going !
After we generate the codes, How run it in IE? Thanks.
how to show panel in my web ?????
I am looking forward! thank you!
Thank you very much!Well done!
very good!! i like you
how to show panel in my web ?????
thank you... really good job...
congratulations...
A very good plugin, thanks for your hard work.
非常棒哦
hi, hujun.nanjing: How can I contact you? I want to download the source code but didn't find out a link. I also have some personal questions for you, can you give me a reply? thanks
在software updates显示安装成功.但是在Window->Preferences里面看不到ExtJsBuilder?选项. 不知道出了什么问题??? 环境: Eclipse 3.4.2 with GEF installed
good job!It's very useful!
hujun.nanjing,我是国产龙博ajax框架,这个框架和extjs类似,我们现在也希望有一个这样的eclipse插件。希望你看到后能联系我。我的联系方式在龙博的官网上有,谢谢
extjs 框架 作为开发人员 最主要是欣赏他的风格和设计理念,让我用一个看上去差不多但是理念不能认同或者不了解的其他框架是不可能的,我还不如学flex去呢
原来龙博也是小东开发的啊 sigma
非常好的一个插件,不过在formpanl添加tbar再删除的时候 显示有些不太正常 ,
以前装过一次用不了。。。
I have trouble to install because dependence of org.apache.xerces. but not found xerces as alone package, what's flavour installation of eclipse include xerces by default ???
我倒,官网在哪里哦?
I´m live in Brazil. A very good plugin and job, thanks for your work.
Hi,
I tried to install it on Eclipse 3.5 but nothing is rendered in "UI Editor" !?
Sam.
to Sam, Maybe you forget to install GEF, as the writer said, 'make sure you eclipse version is 3.2,3.3 or 3.4 with GEF installed.' more info about GEF, please refer to: http://www.eclipse.org/gef/
hi hujun, it's not a open source project? What a pity...
looking forward the source.
Thanks!
Best regards
确实是好东西啊。。。。
very good http://www.llevon.com.br
very good http://www.linuxmonsters.com.br
Sam / Jack,
I have the same problem under Eclipse 3.5, nothing renders on the UI and I have GEF installed. Any pointers?
Thanks, you save our day, are you working for the Extjs 3.0 ?
Hi, Im having the same problem as Sam and dawid. I have eclipse 3.6 with ext builder 0.9.1 and GEF 3.6. Also Ext 3.2.1. Any clues why it doesnt show anything in the UI editor?
Thanks in advanced.
that is really perfect app. thanks for sharing with humanity :) But ı couldn't access my db via store panel using php :( Can u give me any suggest ?
Hi, Im having the same problem as Sam and dawid and others. I have eclipse 3.6 with ext builder 0.9.1 and GEF 3.6. Also Ext 3.2.1. Any clues why it doesnt show anything in the UI editor?
Hi, for those who not seeing any thing in UI editor download sencha SDK from http://www.sencha.com/products/extjs/. Extract and give it as the ExtJs?? Directory in eclipse preferences. Hope this will solve it