Suche senden
Hochladen
Wicket 6
•
0 gefällt mir
•
910 views
C
codepitbull
Folgen
Presentation on Wicket 6 I gave at BedCon 2013.
Weniger lesen
Mehr lesen
Software
Technologie
Melden
Teilen
Melden
Teilen
1 von 39
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Spring mvc my Faviourite Slide
Spring mvc my Faviourite Slide
Daniel Adenew
Android Jetpack: ViewModel and Testing
Android Jetpack: ViewModel and Testing
Yongjun Kim
Vaadin7
Vaadin7
Joonas Lehtinen
Why SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScript
martinlippert
Android Testing
Android Testing
Evan Lin
Struts tutorial
Struts tutorial
OPENLANE
Rambler.iOS #6: App delegate - разделяй и властвуй
Rambler.iOS #6: App delegate - разделяй и властвуй
RAMBLER&Co
Capture image on eye blink
Capture image on eye blink
InnovationM
Weitere ähnliche Inhalte
Was ist angesagt?
What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2
Santosh Singh Paliwal
Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development
Mahmoud Hamed Mahmoud
Android programming -_pushing_the_limits
Android programming -_pushing_the_limits
Droidcon Berlin
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Atlassian
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
Mathias Seguy
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Sony Suci
important struts interview questions
important struts interview questions
surendray
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Frédéric Harper
Integrating Security Roles into Microsoft Silverlight Applications
Integrating Security Roles into Microsoft Silverlight Applications
Dan Wahlin
Data binding w Androidzie
Data binding w Androidzie
The Software House
Eclipse Tricks
Eclipse Tricks
Kaniska Mandal
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
Matt Raible
Code to DI For - Dependency Injection for Modern Applications
Code to DI For - Dependency Injection for Modern Applications
Caleb Jenkins
Spring Framework - Data Access
Spring Framework - Data Access
Dzmitry Naskou
What's Coming in Spring 3.0
What's Coming in Spring 3.0
Matt Raible
Distributing information on iOS
Distributing information on iOS
Make School
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"
GeeksLab Odessa
Binding business data to vaadin components
Binding business data to vaadin components
Peter Lehto
Behavioral pattern 4
Behavioral pattern 4
Naga Muruga
Android ui layouts ,cntls,webservices examples codes
Android ui layouts ,cntls,webservices examples codes
Aravindharamanan S
Was ist angesagt?
(20)
What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2
Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development
Android programming -_pushing_the_limits
Android programming -_pushing_the_limits
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
important struts interview questions
important struts interview questions
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Windows 8 Pure Imagination - 2012-11-25 - Extending Your Game with Windows 8 ...
Integrating Security Roles into Microsoft Silverlight Applications
Integrating Security Roles into Microsoft Silverlight Applications
Data binding w Androidzie
Data binding w Androidzie
Eclipse Tricks
Eclipse Tricks
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
Code to DI For - Dependency Injection for Modern Applications
Code to DI For - Dependency Injection for Modern Applications
Spring Framework - Data Access
Spring Framework - Data Access
What's Coming in Spring 3.0
What's Coming in Spring 3.0
Distributing information on iOS
Distributing information on iOS
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"
Binding business data to vaadin components
Binding business data to vaadin components
Behavioral pattern 4
Behavioral pattern 4
Android ui layouts ,cntls,webservices examples codes
Android ui layouts ,cntls,webservices examples codes
Andere mochten auch
Guide To Successful Graduation at Apache
Guide To Successful Graduation at Apache
Martijn Dashorst
Presentazione java7
Presentazione java7
Andrea Del Bene
Keep your Wicket application in production
Keep your Wicket application in production
Martijn Dashorst
Wicket 10 years and beyond
Wicket 10 years and beyond
Martijn Dashorst
Tapestry: State of the Union
Tapestry: State of the Union
Howard Lewis Ship
Who Automates the Automators? (Quis Automatiet Ipsos Automates?)
Who Automates the Automators? (Quis Automatiet Ipsos Automates?)
Martijn Dashorst
The Art of Angular in 2016 - vJUG24
The Art of Angular in 2016 - vJUG24
Matt Raible
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Matt Raible
Java Serialization Deep Dive
Java Serialization Deep Dive
Martijn Dashorst
Apache Wicket: Web Applications With Just Java
Apache Wicket: Web Applications With Just Java
Martijn Dashorst
Architecting Applications Using Apache Wicket Java2 Days 2009
Architecting Applications Using Apache Wicket Java2 Days 2009
Mystic Coders, LLC
A brief overview of java frameworks
A brief overview of java frameworks
MD Sayem Ahmed
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Matt Raible
The Art of Angular in 2016 - Devoxx UK 2016
The Art of Angular in 2016 - Devoxx UK 2016
Matt Raible
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Matt Raible
Wicket with Spring Boot on Azure
Wicket with Spring Boot on Azure
Hiroto Yamakawa
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
Matt Raible
Java Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video Tutorial
Marcus Biel
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
Matt Raible
Apache Wicket: 10 jaar en verder - Martijn Dashorst
Apache Wicket: 10 jaar en verder - Martijn Dashorst
NLJUG
Andere mochten auch
(20)
Guide To Successful Graduation at Apache
Guide To Successful Graduation at Apache
Presentazione java7
Presentazione java7
Keep your Wicket application in production
Keep your Wicket application in production
Wicket 10 years and beyond
Wicket 10 years and beyond
Tapestry: State of the Union
Tapestry: State of the Union
Who Automates the Automators? (Quis Automatiet Ipsos Automates?)
Who Automates the Automators? (Quis Automatiet Ipsos Automates?)
The Art of Angular in 2016 - vJUG24
The Art of Angular in 2016 - vJUG24
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Java Serialization Deep Dive
Java Serialization Deep Dive
Apache Wicket: Web Applications With Just Java
Apache Wicket: Web Applications With Just Java
Architecting Applications Using Apache Wicket Java2 Days 2009
Architecting Applications Using Apache Wicket Java2 Days 2009
A brief overview of java frameworks
A brief overview of java frameworks
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
The Art of Angular in 2016 - Devoxx UK 2016
The Art of Angular in 2016 - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Wicket with Spring Boot on Azure
Wicket with Spring Boot on Azure
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
Java Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video Tutorial
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
Apache Wicket: 10 jaar en verder - Martijn Dashorst
Apache Wicket: 10 jaar en verder - Martijn Dashorst
Ähnlich wie Wicket 6
Codemotion appengine
Codemotion appengine
Ignacio Coloma
Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6
Michael Plöd
Unit testing with mock libs
Unit testing with mock libs
Valentin Kolesnikov
Introduction to Spring MVC
Introduction to Spring MVC
Richard Paul
Spring 3: What's New
Spring 3: What's New
Ted Pennings
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
solit
比XML更好用的Java Annotation
比XML更好用的Java Annotation
javatwo2011
Spring Security.ppt
Spring Security.ppt
Patiento Del Mar
Wicket KT part 2
Wicket KT part 2
stuq
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!
DataArt
ASP.NET Web API
ASP.NET Web API
habib_786
ERRest
ERRest
WO Community
Breaking free from static abuse in test automation frameworks and using Sprin...
Breaking free from static abuse in test automation frameworks and using Sprin...
Abhijeet Vaikar
Apache Wicket Web Framework
Apache Wicket Web Framework
Luther Baker
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Dan Wahlin
Human Talks - StencilJS
Human Talks - StencilJS
Alexandre Koelsch
Enterprise Guice 20090217 Bejug
Enterprise Guice 20090217 Bejug
robbiev
Bring the fun back to java
Bring the fun back to java
ciklum_ods
Wicket Security Presentation
Wicket Security Presentation
mrmean
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
QAware GmbH
Ähnlich wie Wicket 6
(20)
Codemotion appengine
Codemotion appengine
Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6
Unit testing with mock libs
Unit testing with mock libs
Introduction to Spring MVC
Introduction to Spring MVC
Spring 3: What's New
Spring 3: What's New
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
比XML更好用的Java Annotation
比XML更好用的Java Annotation
Spring Security.ppt
Spring Security.ppt
Wicket KT part 2
Wicket KT part 2
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!
ASP.NET Web API
ASP.NET Web API
ERRest
ERRest
Breaking free from static abuse in test automation frameworks and using Sprin...
Breaking free from static abuse in test automation frameworks and using Sprin...
Apache Wicket Web Framework
Apache Wicket Web Framework
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Human Talks - StencilJS
Human Talks - StencilJS
Enterprise Guice 20090217 Bejug
Enterprise Guice 20090217 Bejug
Bring the fun back to java
Bring the fun back to java
Wicket Security Presentation
Wicket Security Presentation
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Mehr von codepitbull
Mögen die Tests mit dir sein
Mögen die Tests mit dir sein
codepitbull
Homeoffice
Homeoffice
codepitbull
Vert.x kubernetes
Vert.x kubernetes
codepitbull
DDD and reactive frameworks
DDD and reactive frameworks
codepitbull
Fast data und IoT
Fast data und IoT
codepitbull
Reactive Microservices mit Vert.x 3
Reactive Microservices mit Vert.x 3
codepitbull
Continuous load testing
Continuous load testing
codepitbull
Reactive streams
Reactive streams
codepitbull
Eventsourcing ftw
Eventsourcing ftw
codepitbull
MongoDB
MongoDB
codepitbull
Vertx for worlddomination
Vertx for worlddomination
codepitbull
Event loop
Event loop
codepitbull
Mehr von codepitbull
(12)
Mögen die Tests mit dir sein
Mögen die Tests mit dir sein
Homeoffice
Homeoffice
Vert.x kubernetes
Vert.x kubernetes
DDD and reactive frameworks
DDD and reactive frameworks
Fast data und IoT
Fast data und IoT
Reactive Microservices mit Vert.x 3
Reactive Microservices mit Vert.x 3
Continuous load testing
Continuous load testing
Reactive streams
Reactive streams
Eventsourcing ftw
Eventsourcing ftw
MongoDB
MongoDB
Vertx for worlddomination
Vertx for worlddomination
Event loop
Event loop
Kürzlich hochgeladen
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
OnePlan Solutions
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AI
Ivo Andreev
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Inc
robinwilliams8624
Top Software Development Trends in 2024
Top Software Development Trends in 2024
Mind IT Systems
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
Autus Cyber Tech
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
AmeliaSmith90
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
Neo4j
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
Tobias Schneck
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS Calculator
Shane Coughlan
Streamlining Your Application Builds with Cloud Native Buildpacks
Streamlining Your Application Builds with Cloud Native Buildpacks
Vish Abrams
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
elliciumsolutionspun
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptx
IntelliSource Technologies
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
VICTOR MAESTRE RAMIREZ
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdf
Brain Inventory
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Dista
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
VICTOR MAESTRE RAMIREZ
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and Bad
Ivo Andreev
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
Nirav Modi
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Jaydeep Chhasatia
Kürzlich hochgeladen
(20)
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AI
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Inc
Top Software Development Trends in 2024
Top Software Development Trends in 2024
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS Calculator
Streamlining Your Application Builds with Cloud Native Buildpacks
Streamlining Your Application Builds with Cloud Native Buildpacks
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptx
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdf
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and Bad
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Wicket 6
1.
Wicket 6
2.
?
3.
Quickstart
5.
Auf geht‘s
6.
Unmanaged aber nicht einsam Managed Weblayer Glue ORM Management Security ... Wicket Weblayer API
7.
Servlet 2.5 Container <application>.war WicketFilter WebApplication Aufbau
8.
public class WicketApplication
extends AuthenticatedWebApplication { @Override public HomePage getHomePage() { return HomePage.class; } @Override public void init() { super.init(); getSecuritySettings().setAuthorizationStrategy( new AnnotationsRoleAuthorizationStrategy(this)); getMarkupSettings().setAutomaticLinking(true); mountPage("/dummy", PlainLayoutPage.class); } @Override protected Class<? extends AbstractAuthenticatedWebSession> getWebSessionClass() { return UserAuthenticatedWebSession.class; } @Override protected Class<? extends WebPage> getSignInPageClass() { return SignInWithoutRememberMePage.class; } }
9.
enabling component- oriented, programmatic manipulation
of markup* *http://wicket.apache.org/meet/vision.html
10.
Good old Java+ HTML
11.
Component.java Component Component.html Component.properties
12.
UserUpdatePanel.java UserUpdatePanel.properties UserUpdatePanel.html public class UserUpdatePanel
extends Panel{ public static final String PASSWORD = "password"; public static final String PASSWORD_REPEAT = "passwordRepeat"; public static final String USER_UPDATE_FORM = "userUpdateForm"; @Autowired private UserRepository userRepository; public UserUpdatePanel(String id, IModel<User> model) { super(id, model); FormComponent<String> password = new PasswordTextField(PASSWORD); FormComponent<String> passwordRepeat = new PasswordTextField(PASSWORD_REPEAT, Model.of("")); Form<User> userUpdateForm = new Form<User>(USER_UPDATE_FORM, new CompoundPropertyModel<User>(model)) { @Override protected void onSubmit() { userRepository.save(getModelObject()); } }; add(userUpdateForm .add(new TextField<String>("name")) .add(password) .add(passwordRepeat) .add(new AjaxFallbackButton("submit", userUpdateForm) {}) .add(new EqualInputValidator(password, passwordRepeat)) ); } } <!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <head> <meta charset="utf-8"> <title>Wicket Example App</title> </head> <body> <wicket:panel> <form wicket:id="userUpdateForm"> <fieldset> <legend><wicket:message key="userUpdateTitle"/></legend> <label wicket:for="name"><wicket:message key="username"/></label> <input type="text" wicket:id="name"/> <label wicket:for="password"><wicket:message key="password"/></label> <input type="password" wicket:id="password"/> <label wicket:for="passwordRepeat"><wicket:message key="passwordRepeat"/></label> <input type="password" wicket:id="passwordRepeat"/> <p><input type="submit" value="submit" wicket:id="submit"/></p> </fieldset> </form> </wicket:panel> </body> </html> userUpdateTitle=Benutzer anpassen username=Benutzername password=Passwort passwordRepeat=Passwort wiederholen
13.
public class UserUpdatePanel
extends Panel{ public static final String PASSWORD = "password"; public static final String PASSWORD_REPEAT = "passwordRepeat"; public static final String USER_UPDATE_FORM = "userUpdateForm"; @Autowired private UserRepository userRepository; public UserUpdatePanel(String id, IModel<User> model) { super(id, model); FormComponent<String> password = new PasswordTextField(PASSWORD); FormComponent<String> passwordRepeat = new PasswordTextField(PASSWORD_REPEAT, Model.of("")); Form<User> userUpdateForm = new Form<User>(USER_UPDATE_FORM, new CompoundPropertyModel<User>(model)) { @Override protected void onSubmit() { userRepository.save(getModelObject()); } }; add(userUpdateForm .add(new TextField<String>("name")) .add(password) .add(passwordRepeat) .add(new AjaxFallbackButton("submit", userUpdateForm) {}) .add(new EqualInputValidator(password, passwordRepeat)) ); } }
14.
<!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <head> <meta
charset="utf-8"> <title>Wicket Example App</title> </head> <body> <wicket:panel> <form wicket:id="userUpdateForm"> <fieldset> <legend><wicket:message key="userUpdateTitle"/></legend> <input type="text" wicket:id="name"/> <input type="password" wicket:id="password"/> <input type="password" wicket:id="passwordRepeat"/> <p><input type="submit" value="submit" wicket:id="submit"/></p> </fieldset> </form> </wicket:panel> </body> </html>
15.
wicket:extend wicket:child wicket:id wicket:message wicket:remove wicket:head wicket:container wicket:border wicket:body wicket:fragment wicket:panel wicket:link <html xmlns:wicket="http://wicket.apache.org">
16.
Keine Logik Template im
17.
Inheritance UserUpdatePanel MyUserUpdatePanel
18.
public class MyUserUpdatePanel
extends UserUpdatePanel{ public UserUpdatePanel(String id, IModel<User> model) { super(id, model); } } <!DOCTYPE html> <html xmlns:wicket="http://wicket.apache.org"> <head> <meta charset="utf-8"> <title>Wicket Example App</title> </head> <body> <wicket:panel> <form wicket:id="userUpdateForm"> <fieldset> <legend><wicket:message key="userUpdateTitle"/></legend> <input type="text" wicket:id="name"/> <input type="password" wicket:id="password"/> <input type="password" wicket:id="passwordRepeat"/> <p><input type="submit" value="submit" wicket:id="submit"/></p> </fieldset> </form> </wicket:panel> </body> </html> MyUserUpdatePanel.html MyUserUpdatePanel.properties userUpdateTitle=Lustiges Felderraten
20.
MyUserUpdatePanel UserUpdatePanel Object Got
my stuff? MyUserUpdatePanel UserUpdatePanel Object Application Markup Properties ... ...
21.
Datenbeschaffung package de.bootcamp.wicket.web.page; public interface
IModel<T> extends IDetachable { T getObject(); void setObject(final T object); } public UserUpdatePanel(String id, IModel<User> model)
22.
public class UserUpdatePanel
extends Panel{ ! ... public UserUpdatePanel(String id, IModel<User> model) { super(id, model); FormComponent<String> password = new PasswordTextField(PASSWORD, new PropertyModel<String>(model, "password") ); FormComponent<String> passwordRepeat = new PasswordTextField(PASSWORD_REPEAT, Model.of("")); Form<User> userUpdateForm = new Form<User>(USER_UPDATE_FORM, new CompoundPropertyModel<User>(model)) { @Override protected void onSubmit() { userRepository.save(getModelObject()); } }; ... } }
23.
• Entkopplung Beschaffung
/Verwendung! • Lazy! • Chainable! • Leicht testbar IModel
24.
Behavior • AttributeAppender/AttributeModifier! • AjaxSelfUpdatingBehavior! •
AjaxEventBehavior! • ... Component! Behavior.add( )
25.
Alles zusammen
26.
Page public class HomePage
extends WebPage { private static final long serialVersionUID = 1L; @SpringBean private BusinessService businessService; public HomePage(final PageParameters parameters) { super(parameters); IModel<User> userModel = new LoadableDetachableModel<User>() { @Override protected User load() { return businessService.findUserByName("user1"); } }; add(new Label("name", new PropertyModel<String>(userModel,"name"))); add(new MyUserUpdatePanel("userUpdatePanel", userModel)); ! add(new AjaxLink("adminLink") { @Override public void onClick(AjaxRequestTarget target) { setResponsePage(AdminPage.class); } }); } }
27.
Praxis!!!
28.
AJAX • Seit Wicket
6: JQuery!! • TransparenteVerwendung! • Maßgeblicher Bestandteil des Wicket-Kerns! • Einfach über Behaviors erweiterbar! • Weiterführung der Komponentisierung
30.
NoScript> AjaxFallbackButton! AjaxFallbackDefaultDataTable! AjaxFallbackHeadersToolbar! AjaxFallbackLink! ... AJAX
31.
Kopplung Callbacks Events
32.
Component public interface IEventSource { <T>
void send(IEventSink sink, Broadcast broadcast, T payload); } public interface IEventSink { void onEvent(IEvent<?> event); } • Schwache Kopplung! • hohe Flexibilität! • weniger Boilerplate
33.
Ajax Default Event
34.
... @Override public void onEvent(IEvent<?>
event) { if(event.getPayload() instanceof AjaxRequestTarget) { ((AjaxRequestTarget)event.getPayload()).add(this); } } ...
35.
WicketTester private WicketTester wicketTester; @Before public
void setUp() { wicketTester = new WicketTester(); } @After public void tearDown() { wicketTester.destroy(); } @Test public void testCreateTask() throws Exception{ IModel<TaskList> taskListMock = mock(IModel.class); User testUser = new User(); CreateTaskPanel createTaskPanel = new CreateTaskPanel("testPanel", testUser, taskListMock); wicketTester.startComponentInPage(createTaskPanel); wicketTester.assertComponent("testPanel", CreateTaskPanel.class); FormTester formTester = wicketTester.newFormTester("testPanel:taskForm"); formTester.setValue("title", "taskTitle"); formTester.submit(); ArgumentCaptor<Task> taskCaptor = ArgumentCaptor.forClass(Task.class); verify(taskServiceMock).create(taskCaptor.capture()); assertEquals("taskTitle", taskCaptor.getValue().getTitle()); assertEquals(testUser, taskCaptor.getValue().getUser()); }
36.
Ressourcen • JavaScript! • CSS! •
Bilder! • PDF! • ...
37.
public class DataTablesResource
extends JavaScriptResourceReference { private static final Set<HeaderItem> deps; static { HashSet<HeaderItem> items = new HashSet<HeaderItem>(); items.add(JavaScriptHeaderItem.forReference(JQueryResourceReference.get())); deps = Collections.unmodifiableSet(items); } private static final DataTablesResource instance = new DataTablesResource(); private DataTablesResource() { super(DataTablesResource.class, "jquery.dataTables.js"); } public static DataTablesResource get() { return instance; } @Override public Iterable<? extends HeaderItem> getDependencies() { return deps; } } ... ! @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.render(JavaScriptHeaderItem.forReference(DataTablesResource.get())); } ! ...
38.
Und weiter? • Optimierung
der verwendeten Ressourcen! • Kontrolle der URL! • Dependency Management! • JavaScript ResourceBundles! • Übersteuern vonVersionen
39.
http://code.google.com/p/wicket-guide/ Wicket-Guide GET IT!
Jetzt herunterladen