Wicket NEXT Johan Compagner
Who is Johan Compagner Senior Java Developer at Servoy 10+ years of Java experience Swing and the Web (Struts/Tapestry) Core Wicket developer since September 2004
Agenda Wicket 1.4 (GENERICS!!) Wicket 1.5 (or 2.0) Q&A
Wicket 1.4  Generics Model<T> Component<T> MetaData<T>
Model<T> class IModel<T> { T getObject() void setObject(T) } Model<String> model = new Model<String>(“Wicket”); String str = model.getObject(); // no cast.
Component<T> Why the need to generify Component? IModel parameter in constructor. public  Component(String id, IModel<T> model) set/getModel() methods public   Component<T>   setModel(IModel<T> model) public   final  IModel<T> getModel() getModelObject() public   final   T getModelObject()
Component<T> TextField<Double> tf = new TextField<Double>(“txt”,Double.class) Double.class still needed for converter.. Also makes it more clear what components really want like ListView: ListView<T>  extends  AbstractRepeater<List<T>> public  ListView(String id, IModel<List<T>> model) And my personal favorite: public  DropDownChoice(String id,IModel<T> model,  IModel<List<T>> choices, IChoiceRenderer<T> renderer) public  ListMultipleChoice(String id, IModel<Collection<T>> model, IModel<List<T>> choices, IChoiceRenderer<T> renderer)
Wicket 1.4 what more.. A little bit more generics here and there MetaData without generics: MetaDataKey  PERMISSION  =  new  MetaDataKey(Permission. class ); Permission p = (Permission)session.getMetaData(PERMISSION); With generics: MetaDataKey<Permission>  PERMISSIONS  =  new  MetaDataKey<Permission>(); Permission p = session.getMetaData(PERMISSION); Varargs..  MarkupContainer.add(Component... childs) Component.add(IBehavior... behavior) Some API breakage compared to 1.3 to fix some bugs and cleanup some API. So no drop in replacement!
Wicket 1.4, WHEN!?! NOW!!! (or almost, start commit now!)  At least in svn (trunk)  Or snapshot release (if bambo works out) Not a release yet in a few weeks first milestone build.
Wicket 1.5/2.0 Don't hold me responsible if some of the next mentioned features don't make it!
Inheritance Improvement Multiply extend/child area's <html><body> This is in the super markup.<wicket:child />This is in the super markup. </body></html> <html><body> This is in the child markup. <wicket:extend>This is in the child markup.</wicket:extend> This is in the child markup. </body></html> <html><body> This is in the super markup. This is in the child markup. This is in the super markup. </body></html>
Inheritance Improvement <html><body> This is in the super markup.<wicket:child name=”child1”/> This is in the super markup.<wicket:child name=”child2”/> </body></html> <html><body> This is in the child markup. <wicket:extend name=”child1”>This is in the child1 markup.</wicket:extend> This is in the child markup. <wicket:extend name=”child2”>This is in the child2 markup.</wicket:extend> </body></html> <html><body> This is in the super markup. This is in the child1 markup. This is in the super markup. This is in the child2 markup. </body></html>
Inheritance Improvement Childs can come from different sub pages. Can have multiply childs itself again.
ProxyModel A Model based on invocation recording. Generates string expressions for the existing PropertyModel SafePropertyModel<Person> p = new SafePropertyModel<Person>(new Person()); TextField field = new TextField(&quot;name&quot;, p.bind(p.toProperty().getFirstName()));
ProxyModel Generates byte code that is a Macro SafePropertyModel<Person> p = new SafePropertyModel<Person>(new Person()); TextField field = new TextField(&quot;name&quot;, p.bind(p.toProperty().getAddress().getCity()));  class Macro implements IPropertyInvoker { void setObject(Object rootObject, Object value) { Address address = ((Person)rootObject).getAddress(); if (address != null) address.setCity((City)value); } Object getObject(Object rootObject) { Address address = ((Person)rootObject).getAddress(); if (address != null) return address.getCity(); return null; } Almost no state to keep, the state is a class that is shared Build on top of commons-proxy (and needs proxy/codegen classes) Most likely not in core but in a separate project.
Validators/Behaviors Validator should also be able to contribute to the markup. Class MyLengthValidator implements IContributeBehaviorValidator { void  validate(IValidatable validatable) { String str = validatable.getValue(); if (str.length() > length) error(); } IBehavior  getBehavior() { return SimpleAttributeModifier(“maxlength”,length); } }
Wicket 1.5/2.0 Window support (PageMap replacement) A sub session for every tab in a browser. More URL improvements So that it becomes easier to use any URL encoding for everything (stateless forms etc) CompoundAjaxBehavior More then 1 action under 1 event. Development Mode dashboard widget Combination of InspectorBug and AjaxDebug Resource/IResourceStream cleanup
Wicket Testing WicketTester improved or replaced completely. JDave/Hamcrest style testing
Wicket Security Swarm/Wasp moved to Apache
Q/A Do you guys want even more?

More Related Content

PDF
Apache Wicket Web Framework
KEY
Wicket 2010
PPT
Wicket Introduction
PPTX
Apache Wicket
PDF
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
PDF
Web Components for Java Developers
PDF
Developing Modern Java Web Applications with Java EE 7 and AngularJS
PPT
Java EE and Spring Side-by-Side
Apache Wicket Web Framework
Wicket 2010
Wicket Introduction
Apache Wicket
Wicket Presentation @ AlphaCSP Java Web Frameworks Playoff 2008
Web Components for Java Developers
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Java EE and Spring Side-by-Side

What's hot (20)

PDF
Vaadin Flow - JavaLand 2018
PDF
How to Build ToDo App with Vue 3 + TypeScript
PDF
Vaadin DevDay 2017 - Web Components
PDF
Vaadin Components @ Angular U
PDF
Vaadin Components
PDF
Html5 with Vaadin and Scala
PDF
Building an HTML5 Video Player
PDF
Web Components Everywhere
PDF
How to build a chat application with react js, nodejs, and socket.io
PDF
Getting Started with React-Nathan Smith
PDF
webcomponents (Jfokus 2015)
PDF
Vaadin Introduction, 7.3 edition
PPT
Os Johnson
PDF
API Technical Writing
PPTX
Dsc Charusat Learning React Part 1
PDF
Rails + Webpack
PDF
Vaadin DevDay 2017 - DI your UI
PPTX
React js - The Core Concepts
PDF
Vaadin 8 with Spring Framework
ODP
OpenWebBeans/Web Beans
Vaadin Flow - JavaLand 2018
How to Build ToDo App with Vue 3 + TypeScript
Vaadin DevDay 2017 - Web Components
Vaadin Components @ Angular U
Vaadin Components
Html5 with Vaadin and Scala
Building an HTML5 Video Player
Web Components Everywhere
How to build a chat application with react js, nodejs, and socket.io
Getting Started with React-Nathan Smith
webcomponents (Jfokus 2015)
Vaadin Introduction, 7.3 edition
Os Johnson
API Technical Writing
Dsc Charusat Learning React Part 1
Rails + Webpack
Vaadin DevDay 2017 - DI your UI
React js - The Core Concepts
Vaadin 8 with Spring Framework
OpenWebBeans/Web Beans
Ad

Similar to Wicket Next (1.4/1.5) (20)

ODP
ActiveWeb: Chicago Java User Group Presentation
PPT
Introduction to Spec#
PPT
Jsfsunum
PPT
ODP
Developing and testing ajax components
PPT
Spring Capitulo 05
PPT
Object Oreinted Approach in Coldfusion
PPT
&lt;img src="xss.com">
PPT
PPT
Wookie Meetup
PPT
Wookie Meetup
PPT
Migration testing framework
PPT
Система рендеринга в Magento
PPT
닷넷 개발자를 위한 패턴이야기
PPT
Javascript: Ajax & DOM Manipulation v1.2
PPTX
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
PPT
Strutsjspservlet
PPT
Struts,Jsp,Servlet
PPT
Strutsjspservlet
PPT
Lecture 5 - Comm Lab: Web @ ITP
ActiveWeb: Chicago Java User Group Presentation
Introduction to Spec#
Jsfsunum
Developing and testing ajax components
Spring Capitulo 05
Object Oreinted Approach in Coldfusion
&lt;img src="xss.com">
Wookie Meetup
Wookie Meetup
Migration testing framework
Система рендеринга в Magento
닷넷 개발자를 위한 패턴이야기
Javascript: Ajax & DOM Manipulation v1.2
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Strutsjspservlet
Struts,Jsp,Servlet
Strutsjspservlet
Lecture 5 - Comm Lab: Web @ ITP
Ad

Recently uploaded (20)

PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
CloudStack 4.21: First Look Webinar slides
PDF
August Patch Tuesday
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPT
Geologic Time for studying geology for geologist
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Five Habits of High-Impact Board Members
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Hindi spoken digit analysis for native and non-native speakers
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Architecture types and enterprise applications.pdf
PPTX
The various Industrial Revolutions .pptx
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
Modernising the Digital Integration Hub
PDF
Hybrid model detection and classification of lung cancer
Web Crawler for Trend Tracking Gen Z Insights.pptx
Group 1 Presentation -Planning and Decision Making .pptx
CloudStack 4.21: First Look Webinar slides
August Patch Tuesday
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Getting started with AI Agents and Multi-Agent Systems
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Geologic Time for studying geology for geologist
Univ-Connecticut-ChatGPT-Presentaion.pdf
Five Habits of High-Impact Board Members
WOOl fibre morphology and structure.pdf for textiles
A novel scalable deep ensemble learning framework for big data classification...
Hindi spoken digit analysis for native and non-native speakers
Module 1.ppt Iot fundamentals and Architecture
Final SEM Unit 1 for mit wpu at pune .pptx
Architecture types and enterprise applications.pdf
The various Industrial Revolutions .pptx
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Modernising the Digital Integration Hub
Hybrid model detection and classification of lung cancer

Wicket Next (1.4/1.5)

  • 1. Wicket NEXT Johan Compagner
  • 2. Who is Johan Compagner Senior Java Developer at Servoy 10+ years of Java experience Swing and the Web (Struts/Tapestry) Core Wicket developer since September 2004
  • 3. Agenda Wicket 1.4 (GENERICS!!) Wicket 1.5 (or 2.0) Q&A
  • 4. Wicket 1.4 Generics Model<T> Component<T> MetaData<T>
  • 5. Model<T> class IModel<T> { T getObject() void setObject(T) } Model<String> model = new Model<String>(“Wicket”); String str = model.getObject(); // no cast.
  • 6. Component<T> Why the need to generify Component? IModel parameter in constructor. public Component(String id, IModel<T> model) set/getModel() methods public Component<T> setModel(IModel<T> model) public final IModel<T> getModel() getModelObject() public final T getModelObject()
  • 7. Component<T> TextField<Double> tf = new TextField<Double>(“txt”,Double.class) Double.class still needed for converter.. Also makes it more clear what components really want like ListView: ListView<T> extends AbstractRepeater<List<T>> public ListView(String id, IModel<List<T>> model) And my personal favorite: public DropDownChoice(String id,IModel<T> model, IModel<List<T>> choices, IChoiceRenderer<T> renderer) public ListMultipleChoice(String id, IModel<Collection<T>> model, IModel<List<T>> choices, IChoiceRenderer<T> renderer)
  • 8. Wicket 1.4 what more.. A little bit more generics here and there MetaData without generics: MetaDataKey PERMISSION = new MetaDataKey(Permission. class ); Permission p = (Permission)session.getMetaData(PERMISSION); With generics: MetaDataKey<Permission> PERMISSIONS = new MetaDataKey<Permission>(); Permission p = session.getMetaData(PERMISSION); Varargs.. MarkupContainer.add(Component... childs) Component.add(IBehavior... behavior) Some API breakage compared to 1.3 to fix some bugs and cleanup some API. So no drop in replacement!
  • 9. Wicket 1.4, WHEN!?! NOW!!! (or almost, start commit now!) At least in svn (trunk) Or snapshot release (if bambo works out) Not a release yet in a few weeks first milestone build.
  • 10. Wicket 1.5/2.0 Don't hold me responsible if some of the next mentioned features don't make it!
  • 11. Inheritance Improvement Multiply extend/child area's <html><body> This is in the super markup.<wicket:child />This is in the super markup. </body></html> <html><body> This is in the child markup. <wicket:extend>This is in the child markup.</wicket:extend> This is in the child markup. </body></html> <html><body> This is in the super markup. This is in the child markup. This is in the super markup. </body></html>
  • 12. Inheritance Improvement <html><body> This is in the super markup.<wicket:child name=”child1”/> This is in the super markup.<wicket:child name=”child2”/> </body></html> <html><body> This is in the child markup. <wicket:extend name=”child1”>This is in the child1 markup.</wicket:extend> This is in the child markup. <wicket:extend name=”child2”>This is in the child2 markup.</wicket:extend> </body></html> <html><body> This is in the super markup. This is in the child1 markup. This is in the super markup. This is in the child2 markup. </body></html>
  • 13. Inheritance Improvement Childs can come from different sub pages. Can have multiply childs itself again.
  • 14. ProxyModel A Model based on invocation recording. Generates string expressions for the existing PropertyModel SafePropertyModel<Person> p = new SafePropertyModel<Person>(new Person()); TextField field = new TextField(&quot;name&quot;, p.bind(p.toProperty().getFirstName()));
  • 15. ProxyModel Generates byte code that is a Macro SafePropertyModel<Person> p = new SafePropertyModel<Person>(new Person()); TextField field = new TextField(&quot;name&quot;, p.bind(p.toProperty().getAddress().getCity())); class Macro implements IPropertyInvoker { void setObject(Object rootObject, Object value) { Address address = ((Person)rootObject).getAddress(); if (address != null) address.setCity((City)value); } Object getObject(Object rootObject) { Address address = ((Person)rootObject).getAddress(); if (address != null) return address.getCity(); return null; } Almost no state to keep, the state is a class that is shared Build on top of commons-proxy (and needs proxy/codegen classes) Most likely not in core but in a separate project.
  • 16. Validators/Behaviors Validator should also be able to contribute to the markup. Class MyLengthValidator implements IContributeBehaviorValidator { void validate(IValidatable validatable) { String str = validatable.getValue(); if (str.length() > length) error(); } IBehavior getBehavior() { return SimpleAttributeModifier(“maxlength”,length); } }
  • 17. Wicket 1.5/2.0 Window support (PageMap replacement) A sub session for every tab in a browser. More URL improvements So that it becomes easier to use any URL encoding for everything (stateless forms etc) CompoundAjaxBehavior More then 1 action under 1 event. Development Mode dashboard widget Combination of InspectorBug and AjaxDebug Resource/IResourceStream cleanup
  • 18. Wicket Testing WicketTester improved or replaced completely. JDave/Hamcrest style testing
  • 19. Wicket Security Swarm/Wasp moved to Apache
  • 20. Q/A Do you guys want even more?