My favorites | Sign in
Project Home Downloads Wiki Issues
Search
for
UserGuide  
ExtBuilder User Guide
Featured, Phase-Deploy
Updated Feb 4, 2010 by hujun.na...@gmail.com

Introduction

ExtBuilder is an eclipse plugin can help developer work out good style Ext javascript code without typing code.

Installation

Eclipse 3.x

  1. make sure you eclipse version is 3.2,3.3 or 3.4 with GEF installed.
  2. download archived update site from http://code.google.com/p/extbuilder/downloads/list
  3. Click Help->Software Updates->Find and Install...->Search for new features to install,Click Next
  4. Click New Archived Site-> Browse to extbuilder_update.zip and click Open.
  5. Click OK and follow the instructions to install.
  6. Restart you eclipse

Apatana

  1. Install Apatanta as a plugin to Eclipse.
  2. 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.

Starting

Kick start

  1. Click Windows->Preferences..->ExtJs Builder
  2. Click Browse button to select your Ext home directory.
  1. Click File->New, then select Web->ExtJs Page. a wizard dialog will appear.
  2. Click Next
  3. Input the namespace you want
  4. Input class name you want, extbuilder create one class in one file, just like Java
  5. Input the file name, default is the class name
  6. Select super class, default is Ext.Panel, you also can create a window by select Ext.Window
  7. Click Finish.
  8. 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.

Overview

Before 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 to

Set Properties

Ext 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 Layout

There are two panels, one parent, one child.
  1. Create a new Ext page
  2. Set the root panel's tilte to 'ParentPanel'
  3. Add a Panel to page root panel component
  4. Set the child panel's title to 'ChildPanel'
  5. Click the parent panel on outline view
  6. Set the parent panel's layout to 'Border'
  7. Click the child panel on outline view
  8. 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

  1. Create a new Ext page
  2. Add a FormPanel to root panel
  3. Set the FormPanel's layout to 'column'
  4. Add two Panels to FormPanel, set columnWidth to '.5'
  5. Set these two Panels's layout to 'form'
  6. Add 4 TextField to these Two Panel, each have two
Then you get a two column form panel

Toolbar

Each Ext Panel has two toolbars, tbar and bbar.
  1. Click one Panel of Outline view.
  2. Click Properties view, scroll to tbar or bbar property
  3. Click the right side button '...' to show Toolbar Settings Dialog
  4. In Toolbar Settings Dialog, click Add Button(+) to add Button,Separator,Spacer,Fill,TextItem and MenuButton. Menu editing is not ready in current version.
  5. Change the text toolbar text, by default, the handler is as "onButtonTextClick". Of course, you can change the handler function name.
  6. 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
      }

Buttons

Each 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.

Grid

ExtBuilder 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.
  1. Click '...' button to show Store Settings Dialog
  2. Select MemoryProxy in Basic Page
  3. Click Sample button to generate some random data
  4. Click OK button to save store settings.
  5. Add loadData function in class
  6.     loadData : function() {
    		this.store1.load();
        }
here store1 is the component name of store.
  1. Add code in class constructor function
  2.      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.

Columns

Tree

Listeners

Extension

Comment by uusam.w...@gmail.com, Nov 18, 2008

good job, we are looking forward! :)

Comment by omer.daw...@gmail.com, Nov 24, 2008

Nice work. This is exactly what is needed to rapidly develop ExtJS applications.

Comment by luiguang...@163.com, Dec 25, 2008

very good

Comment by erhu...@gmail.com, Dec 28, 2008

thank you ,very good

Comment by qingshui...@gmail.com, Dec 30, 2008

Very Good !!!

Comment by lxcs...@163.com, Jan 6, 2009

FormPanel? how show???

Comment by simon...@gmail.com, Jan 19, 2009

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.

Comment by le.c...@gmail.com, Jan 22, 2009

good job, this is a killer, keep going !

Comment by sshzhan...@163.com, Feb 2, 2009

After we generate the codes, How run it in IE? Thanks.

Comment by manuelra...@gmail.com, Feb 19, 2009

how to show panel in my web ?????

Comment by Axiome...@gmail.com, Mar 1, 2009

I am looking forward! thank you!

Comment by dragon28...@126.com, Mar 19, 2009

Thank you very much!Well done!

Comment by jhaij1...@gmail.com, Mar 20, 2009

very good!! i like you

Comment by xyzrou...@gmail.com, Mar 25, 2009

how to show panel in my web ?????

Comment by tofst...@gmail.com, Mar 27, 2009

thank you... really good job...

congratulations...

Comment by yunshichen@gmail.com, Apr 8, 2009

A very good plugin, thanks for your hard work.

Comment by isky...@gmail.com, Apr 10, 2009

非常棒哦

Comment by juvens...@gmail.com, Apr 12, 2009

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

Comment by Gilpin...@gmail.com, Apr 12, 2009

在software updates显示安装成功.但是在Window->Preferences里面看不到ExtJsBuilder?选项. 不知道出了什么问题??? 环境: Eclipse 3.4.2 with GEF installed

Comment by tanxian...@gmail.com, Apr 13, 2009

good job!It's very useful!

Comment by sigmawid...@gmail.com, Apr 27, 2009

hujun.nanjing,我是国产龙博ajax框架,这个框架和extjs类似,我们现在也希望有一个这样的eclipse插件。希望你看到后能联系我。我的联系方式在龙博的官网上有,谢谢

Comment by jianfeng...@gmail.com, May 5, 2009

extjs 框架 作为开发人员 最主要是欣赏他的风格和设计理念,让我用一个看上去差不多但是理念不能认同或者不了解的其他框架是不可能的,我还不如学flex去呢

Comment by jianfeng...@gmail.com, May 5, 2009

原来龙博也是小东开发的啊 sigma

Comment by bullet...@gmail.com, May 14, 2009

非常好的一个插件,不过在formpanl添加tbar再删除的时候 显示有些不太正常 ,

Comment by fmyzyw...@gmail.com, May 14, 2009

以前装过一次用不了。。。

Comment by hasbun.c...@gmail.com, May 29, 2009

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 ???

Comment by tide...@gmail.com, Jul 19, 2009

我倒,官网在哪里哦?

Comment by everton....@gmail.com, Jul 27, 2009

I´m live in Brazil. A very good plugin and job, thanks for your work.

Comment by priva....@gmail.com, Aug 13, 2009

Hi,

I tried to install it on Eclipse 3.5 but nothing is rendered in "UI Editor" !?

Sam.

Comment by jack.liao1983@gmail.com, Aug 29, 2009

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/

Comment by jack.liao1983@gmail.com, Aug 29, 2009

hi hujun, it's not a open source project? What a pity...

looking forward the source.

Thanks!

Best regards

Comment by zjr...@qq.com, Sep 12, 2009

确实是好东西啊。。。。

Comment by joel.mac...@gmail.com, Feb 15, 2010
Comment by joel.mac...@gmail.com, Feb 15, 2010
Comment by dawid.va...@gmail.com, Apr 11, 2010

Sam / Jack,

I have the same problem under Eclipse 3.5, nothing renders on the UI and I have GEF installed. Any pointers?

Comment by joaz...@gmail.com, May 18, 2010

Thanks, you save our day, are you working for the Extjs 3.0 ?

Comment by fmbiset, Sep 13, 2010

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.

Comment by mstf.che...@gmail.com, Oct 21, 2010

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 ?

Comment by fomba_co...@yahoo.com, Feb 23, 2011

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?

Comment by e03...@gmail.com, Jul 29, 2011

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


Sign in to add a comment
Powered by Google Project Hosting