Top Banner
红红红 红红 红红红红红红红红红红 红红红 红红红红红红红 () : 176 红 红红红红红红 西 11 红红 3 红 红红(86)-0571-89939888 Wicket introduction 2008-10-29 Davey.wu
27

Wicket introduction

Jan 02, 2016

Download

Documents

gail-fowler

Wicket introduction. 2008-10-29 Davey.wu. Agenda. What is wicket Why wicket Wicket Components Ajax Behavior Wicket Validate Wicket Tester Other. What is wicket: Hello World. Create web with just java + html. Just java + html = wicket. Example: Hello, world. What is wicket. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Wicket introduction

红杉树(中国)信息技术有限公司公司 地址:杭州市天目山路 176 号西湖数源软件园 11 号楼 3 层 电话: (86)-0571-89939888

Wicket introduction

2008-10-29

Davey.wu

Page 2: Wicket introduction

Agenda

• What is wicket

• Why wicket

• Wicket Components

• Ajax Behavior

• Wicket Validate

• Wicket Tester

• Other

Page 3: Wicket introduction

What is wicket: Hello World

• Create web with just java + html.

• Just java + html = wicket.

• Example: Hello, world

Page 4: Wicket introduction

What is wicket

Page 5: Wicket introduction

What is wicket

• Apache web framework.

• Like Swing Style.

• Component oriented.

• Model-3,Pull against push.

• Rule-based, no xml configuration.

Page 6: Wicket introduction

Why wicket

• Just java + html

• Object oriented component model easy to reused, maintain/extend, test

• Very complete framework

Ajax, security, redirect after post, input valid&feedback,popups,i18n…

Page 7: Wicket introduction

Why wicket

• Compare several Framework

Table Page example (JSF, FreeMarker, JSP)

problems Merge logic into normal HTML, hard to read & maintain

Hard to refactoring.

Hard to work with designers.

Page 8: Wicket introduction

Why Wicket: vs. webwork

• Compare with Webwork

• Google trends

Page 9: Wicket introduction

Why Wicket: Login Demo

• Page Redirect: RequestCycle.get().setResponsePage(…)

• Login Form's action value action="?wicket:interface=:0:loginForm::IFormSubmitListener::“

parse

will do

Page 10: Wicket introduction

Core Concepts

• Application

• Session

• RequestCycle

• Models

• Components

• Behaviors

Page 11: Wicket introduction

Core Concepts

• Models

Page 12: Wicket introduction

Wicket Components

Page 13: Wicket introduction

Wicket Components

Page 14: Wicket introduction

Wicket Components

• Some Special Demo

wizard

window panel

tab panel

tree,treetable

Page 15: Wicket introduction

Wicket Components

• Creating your own components: using a Panel

Page 16: Wicket introduction

Ajax Behavior

• AjaxLink

Page 17: Wicket introduction

Ajax Behavior

• Ajax behaviors are those that can receive Ajax requests.

Page 18: Wicket introduction

Ajax Behavior

• Creating your own Ajax components: using ajax behaior

components.add( Ibehavior)

add js, markup etc.

Page 19: Wicket introduction

Wicket Validate:Server

• FeedbackPanel

• Validation

Page 20: Wicket introduction

Wicket Validate:Server

• Required

• NumberValidator

• Customized Validator: PatronCodeValidator

Page 21: Wicket introduction

Wicket Validate:Client

• Wicket without client validation, but you can add JS behavior.

• Integrate with JQuery Validation.

Page 22: Wicket introduction

Wicket test

• Easy to Test: WicketTester

• JDave: Wicket module

Page 23: Wicket introduction

Other

• Wicket + Spring

• Wicket Security

Page 24: Wicket introduction

• relation

Pull Vs Push

• Pull vs. Push

• http://java.sun.com/blueprints/patterns/MVC-detailed.html

• http://www.theserverside.com/patterns/thread.tss?thread_id=22143

view model

Page 25: Wicket introduction

Resources

• Wicket: http://wicket.apache.org/

• Wicket Stuff: http://wicketstuff.org/confluence/display/STUFFWEB/Home

• Eclipse plugin: http://code.google.com/p/loom-t5/

Page 26: Wicket introduction

Resources

Page 27: Wicket introduction

Q & A

Q & A