30. Projects
• core
• extensions
Wicket
Welcome to
Apache Wick
et
Home
With proper
Introduction mark-up/logic
separation, a
makes devel
Planet Wick POJO data mo
oping web-ap
et del, and a ref
ps simple an
brittle code reshing lack
d enjoyable
for powerful,
Community again. Swap of XML, Apach
reusable comp the boilerplate e Wicket
onents writte , complex de
n with plain
Check the fea bugging and
News Java and HTML
ture list .
Read some Wi
cket buzz, so
Getting Star me Wicket blo
Find out why
•
ted gs or Planet
you should us Wicket
e Wicket
Check out so
me selected
examples in
Examples Take a look
ioc (spring, guice)
detail or see
at our live co them and ma
mponent ref
Getting Wick Go and down ny more in live
erence
et load Wicket. action
Components
Wicket is rel
eased under
QuickStart the Apache Lic
ense, Version
2.0.
Commun ity meetings
Documentatio
n
The Wicket co
mmunity is a
Wiki very active co
But for those mmunity. Th
that prefer fac e mailing list
e to face me
Blogs s and the irc
etings, severa
•
channel are
l community proof of that.
Reference members ha
ve organized
Where meetups.
London, The
Vision
date/time
United Kingd
om When
JavaDocs Amsterdam, The first Tuesd
The Netherla
nds ay of every mo
Antwerp, Belgi nth
Nov. 30th, 20
um
Releases 07
Copenhagen JavaPolis'07
, Denmark (dec 12th-14
Wicket 1.3-r th)
Linz/Hagenbe
c to be determi
rg, Austria ned
Wicket 1.2 Stockholm, Sw to be determi
eden ned
Wicket 1.1 Rio de Janeir Januari
o, Brazil
Wicket 1.0 Minneapolis/ to be determi
Seattle, USA
•
ned
Tool suppor to be determi
If you are int ned
t
velocity
erested in att
ending one of
you want to these events
organize such
IDE plugins , please add
a meetup yo yourself to the
urself, add it appropriate
to the comm
News event, or if
unity meetups
Developers page
Apache Wick
Reporting bu et 1.3.0-rc1
gs
is released!
Writing docs
Nov 11, 2007
Building
This release
is the first in
•
a series of rel
ease candidate
s until we fee
l confident to
auth-roles
finalize Wicke
t 1.3. This
46. Component
• encapsulate the programmatic manipulation
of markup
• can receive an event (onClick, onSubmit)
• know how and where to render itself
47. Component
• Ultimate super class wicket.Component
Label ListView
MultiLineLabel Loop
TextField PagingNavigator
PasswordTextField ImageMap
Image Button
Link Ajax…
Tree Sorting, paging repeaters
BookmarkablePageLink Wizard
JasperReports DatePicker
48. Component + Markup
• Component has wicket:id
• Markup has same wicket:id
• Hierarchy must match
<h1 wicket:id=“msg”>Gets replaced</h1>
new Label(“msg”, “Hello, World!”);
49. Component: Link
<a href=”#” wicket:id=”link”>Click</a>
Link link = new Link(“link”) {
@Override public void onClick() {
// do something
setResponsePage(new NewPage());
}
};
50. Component: AjaxLink
<a href=”#” wicket:id=”link”>Click</a>
someComponent.setOutputMarkupId(true);
AjaxLink link = new AjaxLink(“link”) {
public void onClick(AjaxRequestTarget t) {
// do something
t.addComponent(someComponent);
t.appendJavaScript(“Effects.fade(‘foo’);”);
}
};
51. Component + Markup
• Some components
have own markup file
• Put Java, markup and
supporting files in
same package on class
path
58. Models
• Models bind your POJO’s to Wicket
components
PropertyModel
Label
value
(name)
expression
Person
PropertyModel
Label name
value
(zipcode) zipcode
expression
birthdate
PropertyModel
Label
value
(birthdate)
expression
59. Java lazy binding sucks
• Doesn’t update:
new Label(“name”, person.getName())
• Null checks necessary:
new Label(“street”,
person.getAddress().getStreet())
60. Models
• PropertyModel:
new PropertyModel(p, “name)
new PropertyModel(p, “address.street”)
• CompoundPropertyModel:
setModel(new CompoundPropertyModel(p));
add(new Label(“name”));
add(new Label(“address.street”));
62. Roadmap
4/22/07 4/22-4/30 couple of weeks somewhere in june
wicket 1.2.6 wicket 1.2.7
wicket 1.3.0 wicket 1.3.0
wicket 1.3.0 wicket 1.3.1
beta rc
wicket x.y
alpha Jav
a
1.5
ap n
in pro eed
cu v s
ba al
to fro
rP m
M
C