gwt gwt-extcfs14.tistory.com/upload_control/download.blog?fhandle... · agenda • about gwt •...

25
GWT & GWT-ext Sangmin, Lee [email protected] http://www.tuning-java.com 1

Upload: others

Post on 13-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 2: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

Agenda

• About GWT

• About GWT-ext

• Make simple UI with GWT-ext

• History Manager Demo

2

Page 3: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

3

Page 4: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

About GWT

4

Page 5: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

What’s GWT ?

5

Page 6: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

GWT means...

• Google Web Toolkit

• It’s under “Apache 2.0 license”

• You can download library at http://code.google.com/webtoolkit

6

Page 7: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

Advantage of GWT

• Easy to develop AJAX code with Java

• Don’t need to write JavaScript code

• Easy to adapt if you used SWING or SWT

7

Page 8: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

You can develop GWT with..

• Eclipse

• IntelliJ

• Netbeans

• etc...

8

Page 9: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

About GWT-ext

9

Page 10: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

What’s GWT-ext

10

Page 11: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

GWT-ext is...

• GWT-ext is a powerful widget library that provides

• rich widgets like Grid with sort,

• paging

• filtering

11

Page 12: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

Related third party S/W

• GWT

• Ext 2.0.2

• Yahoo UI

• Mapstraction

• PageBus

12

Page 13: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

What’s Ext-JS ?

• Ext JS is a cross-browser JavaScript library for building rich internet applications.

• Ext JS License

• Commercial : Almost condition

• Open Source

• if you are creating an open source application with a license compatible

13

Page 14: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

Advantage of GWT-ext

• Don’t need to set CSS

• Easy to control UI.

• More dynamic UI than GWT

• Can change theme easily

14

Page 15: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

Install reference

• You can see install guide athttp://gwt-ext.com/wiki/index.php?title=Using_Eclipse

or

• You can see "How to install screen cast" athttp://www.gwt-ext.com/screencasts/

15

Page 16: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

Set - Cypal-studio

• Move "Preferences ➜ Cypal Studio" menu

• Set Options

16

Page 17: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

Make simple UI with GWT-ext

17

Page 18: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

1. Make eclipse project

18

Page 19: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

2. Make GWT Module

19

Page 20: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

3. Add libraries

• Set gwtext.jar to build path

• Copy ext libraries

• make "/js/ext" directory under public directory

• copy below files under "/js/ext" directory

• ext-all.js, ext-all-debug.js, ext-core.js, ext-core-debug.js

20

Page 21: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

4. Modify *.gwt.xml file

<module>

  <inherits name='com.google.gwt.user.User'/>

  <inherits name='com.gwtext.GwtExt' />

  <entry-point class='xxx.client.GWTExtSample'/>

  <stylesheet src="js/ext/resources/css/ext-all.css" />

  <script src="js/ext/adapter/ext/ext-base.js" />

  <script src="js/ext/ext-all.js" />

 </module>

21

Page 22: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

5. Write sample codespublic class SampleGWTExt implements EntryPoint {

 public void onModuleLoad() {  Panel mainPanel = new Panel();   mainPanel.setTitle("Hello World!");  mainPanel.setWidth(600);  mainPanel.setHeight(400);

  mainPanel.setFrame(true);  mainPanel.setHtml("<p>This is Sample</p>");  mainPanel.setStyle("margin: 10px 0px 0px 10px;");

  RootPanel.get().add(mainPanel);  }}

22

Page 23: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

6. Run Sample codes

Demo

23

Page 24: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

History Manager Demo

24

Page 25: GWT GWT-extcfs14.tistory.com/upload_control/download.blog?fhandle... · Agenda • About GWT • About GWT-ext • Make simple UI with GWT-ext • History Manager Demo 2

Thank you

25