SlideShare a Scribd company logo
1 of 39
Download to read offline
Wicket 6
?
Quickstart
Auf geht‘s
Unmanaged aber nicht
einsam
Managed
Weblayer
Glue
ORM
Management
Security
...
Wicket
Weblayer
API
Servlet 2.5 Container
<application>.war
WicketFilter
WebApplication
Aufbau
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;

}

}
enabling component-
oriented, programmatic
manipulation of markup*
*http://wicket.apache.org/meet/vision.html
Good
old
Java+ HTML
Component.java
Component
Component.html
Component.properties
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
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>

<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>
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">
Keine
Logik
Template
im
Inheritance
UserUpdatePanel
MyUserUpdatePanel
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
MyUserUpdatePanel UserUpdatePanel Object
Got my stuff?
MyUserUpdatePanel UserUpdatePanel Object Application
Markup
Properties
...
...
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)
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());

}

};


...


}

}
• Entkopplung Beschaffung /Verwendung!
• Lazy!
• Chainable!
• Leicht testbar
IModel
Behavior
• AttributeAppender/AttributeModifier!
• AjaxSelfUpdatingBehavior!
• AjaxEventBehavior!
• ...
Component! Behavior.add( )
Alles zusammen
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);

}

});

}

}
Praxis!!!
AJAX
• Seit Wicket 6: JQuery!!
• TransparenteVerwendung!
• Maßgeblicher Bestandteil des Wicket-Kerns!
• Einfach über Behaviors erweiterbar!
• Weiterführung der Komponentisierung
NoScript>
AjaxFallbackButton!
AjaxFallbackDefaultDataTable!
AjaxFallbackHeadersToolbar!
AjaxFallbackLink!
...
AJAX
Kopplung
Callbacks
Events
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
Ajax Default Event
...
@Override

public void onEvent(IEvent<?> event) {

if(event.getPayload() instanceof AjaxRequestTarget) {

((AjaxRequestTarget)event.getPayload()).add(this);

}

}

...
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());

}
Ressourcen
• JavaScript!
• CSS!
• Bilder!
• PDF!
• ...
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()));

}
!
...
Und weiter?
• Optimierung der verwendeten Ressourcen!
• Kontrolle der URL!
• Dependency Management!
• JavaScript ResourceBundles!
• Übersteuern vonVersionen
http://code.google.com/p/wicket-guide/
Wicket-Guide
GET IT!

More Related Content

What's hot

What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2Santosh Singh Paliwal
 
Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development 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_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limitsDroidcon Berlin
 
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012Atlassian
 
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleMathias Seguy
 
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenTutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenSony Suci
 
important struts interview questions
important struts interview questionsimportant struts interview questions
important struts interview questionssurendray
 
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 ...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 ApplicationsIntegrating Security Roles into Microsoft Silverlight Applications
Integrating Security Roles into Microsoft Silverlight ApplicationsDan Wahlin
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Matt Raible
 
Code to DI For - Dependency Injection for Modern Applications
Code to DI For - Dependency Injection for Modern ApplicationsCode to DI For - Dependency Injection for Modern Applications
Code to DI For - Dependency Injection for Modern ApplicationsCaleb Jenkins
 
Spring Framework - Data Access
Spring Framework - Data AccessSpring Framework - Data Access
Spring Framework - Data AccessDzmitry Naskou
 
What's Coming in Spring 3.0
What's Coming in Spring 3.0What's Coming in Spring 3.0
What's Coming in Spring 3.0Matt Raible
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOSMake School
 
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"GeeksLab Odessa
 
Binding business data to vaadin components
Binding business data to vaadin componentsBinding business data to vaadin components
Binding business data to vaadin componentsPeter Lehto
 
Behavioral pattern 4
Behavioral pattern 4Behavioral pattern 4
Behavioral pattern 4Naga Muruga
 
Android ui layouts ,cntls,webservices examples codes
Android ui layouts ,cntls,webservices examples codesAndroid ui layouts ,cntls,webservices examples codes
Android ui layouts ,cntls,webservices examples codesAravindharamanan S
 

What's hot (20)

What is the difference between struts 1 vs struts 2
What is the difference between struts 1 vs struts 2What 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 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_limitsAndroid 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 2012Using 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 GoogleGoogle 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) kerenTutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
 
important struts interview questions
important struts interview questionsimportant 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 ...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 ApplicationsIntegrating Security Roles into Microsoft Silverlight Applications
Integrating Security Roles into Microsoft Silverlight Applications
 
Data binding w Androidzie
Data binding w AndroidzieData binding w Androidzie
Data binding w Androidzie
 
Eclipse Tricks
Eclipse TricksEclipse Tricks
Eclipse Tricks
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating 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 ApplicationsCode to DI For - Dependency Injection for Modern Applications
Code to DI For - Dependency Injection for Modern Applications
 
Spring Framework - Data Access
Spring Framework - Data AccessSpring Framework - Data Access
Spring Framework - Data Access
 
What's Coming in Spring 3.0
What's Coming in Spring 3.0What's Coming in Spring 3.0
What's Coming in Spring 3.0
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOS
 
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"
 
Binding business data to vaadin components
Binding business data to vaadin componentsBinding business data to vaadin components
Binding business data to vaadin components
 
Behavioral pattern 4
Behavioral pattern 4Behavioral pattern 4
Behavioral pattern 4
 
Android ui layouts ,cntls,webservices examples codes
Android ui layouts ,cntls,webservices examples codesAndroid ui layouts ,cntls,webservices examples codes
Android ui layouts ,cntls,webservices examples codes
 

Viewers also liked

Guide To Successful Graduation at Apache
Guide To Successful Graduation at ApacheGuide To Successful Graduation at Apache
Guide To Successful Graduation at ApacheMartijn Dashorst
 
Keep your Wicket application in production
Keep your Wicket application in productionKeep your Wicket application in production
Keep your Wicket application in productionMartijn Dashorst
 
Wicket 10 years and beyond
Wicket   10 years and beyond Wicket   10 years and beyond
Wicket 10 years and beyond Martijn Dashorst
 
Tapestry: State of the Union
Tapestry: State of the UnionTapestry: State of the Union
Tapestry: State of the UnionHoward Lewis Ship
 
Who Automates the Automators? (Quis Automatiet Ipsos Automates?)
Who Automates the Automators? (Quis Automatiet Ipsos Automates?)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 - vJUG24The Art of Angular in 2016 - vJUG24
The Art of Angular in 2016 - vJUG24Matt Raible
 
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016Matt Raible
 
Java Serialization Deep Dive
Java Serialization Deep DiveJava Serialization Deep Dive
Java Serialization Deep DiveMartijn Dashorst
 
Apache Wicket: Web Applications With Just Java
Apache Wicket: Web Applications With Just JavaApache Wicket: Web Applications With Just Java
Apache Wicket: Web Applications With Just JavaMartijn Dashorst
 
Architecting Applications Using Apache Wicket Java2 Days 2009
Architecting Applications Using Apache Wicket   Java2 Days 2009Architecting Applications Using Apache Wicket   Java2 Days 2009
Architecting Applications Using Apache Wicket Java2 Days 2009Mystic Coders, LLC
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworksMD Sayem Ahmed
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016Matt Raible
 
The Art of Angular in 2016 - Devoxx UK 2016
The Art of Angular in 2016 - Devoxx UK 2016The Art of Angular in 2016 - Devoxx UK 2016
The Art of Angular in 2016 - Devoxx UK 2016Matt Raible
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016Matt Raible
 
Wicket with Spring Boot on Azure
Wicket with Spring Boot on AzureWicket with Spring Boot on Azure
Wicket with Spring Boot on AzureHiroto Yamakawa
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015Matt Raible
 
Java Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video TutorialJava Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video TutorialMarcus Biel
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015Matt Raible
 
Apache Wicket: 10 jaar en verder - Martijn Dashorst
Apache Wicket: 10 jaar en verder - Martijn DashorstApache Wicket: 10 jaar en verder - Martijn Dashorst
Apache Wicket: 10 jaar en verder - Martijn DashorstNLJUG
 

Viewers also liked (20)

Guide To Successful Graduation at Apache
Guide To Successful Graduation at ApacheGuide To Successful Graduation at Apache
Guide To Successful Graduation at Apache
 
Presentazione java7
Presentazione java7Presentazione java7
Presentazione java7
 
Keep your Wicket application in production
Keep your Wicket application in productionKeep your Wicket application in production
Keep your Wicket application in production
 
Wicket 10 years and beyond
Wicket   10 years and beyond Wicket   10 years and beyond
Wicket 10 years and beyond
 
Tapestry: State of the Union
Tapestry: State of the UnionTapestry: 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?)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 - vJUG24The 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 2016Get 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 DiveJava Serialization Deep Dive
Java Serialization Deep Dive
 
Apache Wicket: Web Applications With Just Java
Apache Wicket: Web Applications With Just JavaApache 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 2009Architecting 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 frameworksA 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 2016Get 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 2016The 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 2016Get 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 AzureWicket 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 2015Get 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 TutorialJava 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 2015Get 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 DashorstApache Wicket: 10 jaar en verder - Martijn Dashorst
Apache Wicket: 10 jaar en verder - Martijn Dashorst
 

Similar to Wicket 6

Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6Michael Plöd
 
Introduction to Spring MVC
Introduction to Spring MVCIntroduction to Spring MVC
Introduction to Spring MVCRichard Paul
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's NewTed Pennings
 
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...solit
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
Wicket KT part 2
Wicket KT part 2Wicket KT part 2
Wicket KT part 2stuq
 
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин  - Sculpt! Your! Tests!Тарас Олексин  - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!DataArt
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web APIhabib_786
 
Breaking free from static abuse in test automation frameworks and using Sprin...
Breaking free from static abuse in test automation frameworks and using Sprin...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 FrameworkApache Wicket Web Framework
Apache Wicket Web FrameworkLuther 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...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
 
Enterprise Guice 20090217 Bejug
Enterprise Guice 20090217 BejugEnterprise Guice 20090217 Bejug
Enterprise Guice 20090217 Bejugrobbiev
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
Wicket Security Presentation
Wicket Security PresentationWicket Security Presentation
Wicket Security Presentationmrmean
 
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache IgniteNeues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache IgniteQAware GmbH
 

Similar to Wicket 6 (20)

Codemotion appengine
Codemotion appengineCodemotion appengine
Codemotion appengine
 
Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6
 
Unit testing with mock libs
Unit testing with mock libsUnit testing with mock libs
Unit testing with mock libs
 
Introduction to Spring MVC
Introduction to Spring MVCIntroduction to Spring MVC
Introduction to Spring MVC
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
 
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
Solit 2013, Автоматизация тестирования сложных систем: mixed mode automated t...
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
Spring Security.ppt
Spring Security.pptSpring Security.ppt
Spring Security.ppt
 
Wicket KT part 2
Wicket KT part 2Wicket KT part 2
Wicket KT part 2
 
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин  - Sculpt! Your! Tests!Тарас Олексин  - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
 
ERRest
ERRestERRest
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...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 FrameworkApache 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...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 - StencilJSHuman Talks - StencilJS
Human Talks - StencilJS
 
Enterprise Guice 20090217 Bejug
Enterprise Guice 20090217 BejugEnterprise Guice 20090217 Bejug
Enterprise Guice 20090217 Bejug
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Wicket Security Presentation
Wicket Security PresentationWicket Security Presentation
Wicket Security Presentation
 
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache IgniteNeues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
 

More from codepitbull

Mögen die Tests mit dir sein
Mögen die Tests mit dir seinMögen die Tests mit dir sein
Mögen die Tests mit dir seincodepitbull
 
Vert.x kubernetes
Vert.x kubernetesVert.x kubernetes
Vert.x kubernetescodepitbull
 
DDD and reactive frameworks
DDD and reactive frameworksDDD and reactive frameworks
DDD and reactive frameworkscodepitbull
 
Fast data und IoT
Fast data  und IoTFast data  und IoT
Fast data und IoTcodepitbull
 
Reactive Microservices mit Vert.x 3
Reactive Microservices mit Vert.x 3Reactive Microservices mit Vert.x 3
Reactive Microservices mit Vert.x 3codepitbull
 
Continuous load testing
Continuous load testingContinuous load testing
Continuous load testingcodepitbull
 
Reactive streams
Reactive streamsReactive streams
Reactive streamscodepitbull
 
Eventsourcing ftw
Eventsourcing ftwEventsourcing ftw
Eventsourcing ftwcodepitbull
 
Vertx for worlddomination
Vertx for worlddominationVertx for worlddomination
Vertx for worlddominationcodepitbull
 

More from codepitbull (12)

Mögen die Tests mit dir sein
Mögen die Tests mit dir seinMögen die Tests mit dir sein
Mögen die Tests mit dir sein
 
Homeoffice
HomeofficeHomeoffice
Homeoffice
 
Vert.x kubernetes
Vert.x kubernetesVert.x kubernetes
Vert.x kubernetes
 
DDD and reactive frameworks
DDD and reactive frameworksDDD and reactive frameworks
DDD and reactive frameworks
 
Fast data und IoT
Fast data  und IoTFast data  und IoT
Fast data und IoT
 
Reactive Microservices mit Vert.x 3
Reactive Microservices mit Vert.x 3Reactive Microservices mit Vert.x 3
Reactive Microservices mit Vert.x 3
 
Continuous load testing
Continuous load testingContinuous load testing
Continuous load testing
 
Reactive streams
Reactive streamsReactive streams
Reactive streams
 
Eventsourcing ftw
Eventsourcing ftwEventsourcing ftw
Eventsourcing ftw
 
MongoDB
MongoDBMongoDB
MongoDB
 
Vertx for worlddomination
Vertx for worlddominationVertx for worlddomination
Vertx for worlddomination
 
Event loop
Event loopEvent loop
Event loop
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 

Wicket 6

  • 2. ?
  • 4.
  • 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
  • 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>
  • 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
  • 19.
  • 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( )
  • 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);
 }
 });
 }
 }
  • 28. AJAX • Seit Wicket 6: JQuery!! • TransparenteVerwendung! • Maßgeblicher Bestandteil des Wicket-Kerns! • Einfach über Behaviors erweiterbar! • Weiterführung der Komponentisierung
  • 29.
  • 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
  • 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