[JAVA-13854] Half list moved (#12598)

* [JAVA-13854] added parent module

* [JAVA-13854] moved apache-tapestry(submodule) to web-modules(parent)

* [JAVA-13854] moved bootique(submodule) to web-modules(parent)

* [JAVA-13854] moved dropwizard(submodule) to web-modules(parent)

* [JAVA-13854] moved blade(submodule) to web-modules(parent)

* [JAVA-13854] moved java-lite(submodule) to web-modules(parent)

* [JAVA-13854] moved jooby(submodule) to web-modules(parent)

* [JAVA-13854] moved linkrest(submodule) to web-modules(parent)

* [JAVA-13854] moved ninja(submodule) to web-modules(parent)

* [JAVA-13854] moved ratpack(submodule) to web-modules(parent)

* [JAVA-13854] moved resteasy(submodule) to web-modules(parent)

* [JAVA-13854] moved restx(submodule) to web-modules(parent)

* [JAVA-13854] moved spark-java(submodule) to web-modules(parent)

* [JAVA-13854] moved vraptor(submodule) to web-modules(parent)

* [JAVA-13854] delete modules that were moved

* [JAVA-13854]

* [JAVA-13854]

* [JAVA-13854] delete ninja submodule  + moved raml(submodule) to web-modules(parent)

* [JAVA-13854] moved gwt(submodule) to web-modules(parent)

* [JAVA-13854] moved jakarta-ee(submodule) to web-modules(parent)

* [JAVA-13854] moved javax-servlets(submodule) to web-modules(parent)

* [JAVA-13854] moved javax-servlets-2(submodule) to web-modules(parent)

* [JAVA-13854] moved jee-7(submodule) to web-modules(parent)

* [JAVA-13854] moved play-framework(not a module) to web-modules

* [JAVA-13854] fix failing test

* [JAVA-13854] moved struts-2(submodule) to web-modules(parent)

* [JAVA-13854] moved wicket(submodule) to web-modules(parent)

* [JAVA-13854] deleted modules that were moved to web-modules

* JAVA-13854 Removed moved modules from the main pom.xml

Co-authored-by: panagiotiskakos <panagiotis.kakos@libra-is.com>
Co-authored-by: Dhawal Kapil <dhawalkapil@gmail.com>
This commit is contained in:
panos-kakos
2022-08-21 10:14:00 +01:00
committed by GitHub
parent 842a71ad92
commit 0b9549bd3e
755 changed files with 768 additions and 755 deletions
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<head>
<meta charset="utf-8" />
<title>Wicket Intro Examples</title>
<style type="text/css" media="screen">
<!--
body {
margin: 0px
}
#horizon {
text-align: center;
position: absolute;
top: 50%;
left: 0px;
width: 100%;
height: 1px;
overflow: visible;
visibility: visible;
display: block
}
#content {
font-family: Verdana, Geneva, Arial, sans-serif;
margin-left: -250px;
position: absolute;
top: -35px;
left: 50%;
width: 500px;
height: 70px;
visibility: visible
}
-->
</style>
</head>
<body>
<div id="horizon">
<div id="content">
<div>
<h3>Wicket Introduction Examples:</h3>
<wicket:link>
<a href="helloworld/HelloWorld.html">Hello World!</a>
<br />
<br />
<a href="cafeaddress/CafeAddress.html">Cafes</a>
</wicket:link>
</div>
</div>
</div>
</body>
</html>
@@ -0,0 +1,9 @@
package com.baeldung.wicket.examples;
import org.apache.wicket.markup.html.WebPage;
public class HelloWorld extends WebPage {
private static final long serialVersionUID = 1L;
}
@@ -0,0 +1,26 @@
package com.baeldung.wicket.examples;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.protocol.http.WebApplication;
import com.baeldung.wicket.examples.cafeaddress.CafeAddress;
public class HelloWorldApplication extends WebApplication {
/**
* @see org.apache.wicket.Application#getHomePage()
*/
@Override
public Class<? extends WebPage> getHomePage() {
return HelloWorld.class;
}
/**
* @see org.apache.wicket.Application#init()
*/
@Override
public void init() {
super.init();
mountPage("/examples/helloworld", HelloWorld.class);
mountPage("/examples/cafes", CafeAddress.class);
}
}
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<head>
<meta charset="utf-8" />
<title>Cafes</title>
</head>
<body>
<div style="width: 800px; margin: 0 auto;">
<select wicket:id="cafes"></select>
<p>
Address: <span wicket:id="address">address</span>
</p>
</div>
</body>
</html>
@@ -0,0 +1,67 @@
package com.baeldung.wicket.examples.cafeaddress;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class CafeAddress extends WebPage {
private String selectedCafe;
private Address address;
private Map<String, Address> cafeNamesAndAddresses = new HashMap<>();
public CafeAddress(final PageParameters parameters) {
super(parameters);
initCafes();
ArrayList<String> cafeNames = new ArrayList<>(cafeNamesAndAddresses.keySet());
selectedCafe = cafeNames.get(0);
address = new Address(cafeNamesAndAddresses.get(selectedCafe).getAddress());
final Label addressLabel = new Label("address", new PropertyModel<String>(this.address, "address"));
addressLabel.setOutputMarkupId(true);
final DropDownChoice<String> cafeDropdown = new DropDownChoice<>("cafes", new PropertyModel<>(this, "selectedCafe"), cafeNames);
cafeDropdown.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
String name = (String) cafeDropdown.getDefaultModel().getObject();
address.setAddress(cafeNamesAndAddresses.get(name).getAddress());
target.add(addressLabel);
}
});
add(addressLabel);
add(cafeDropdown);
}
private void initCafes() {
this.cafeNamesAndAddresses.put("Linda's Cafe", new Address("35 Bower St."));
this.cafeNamesAndAddresses.put("Old Tree", new Address("2 Edgware Rd."));
}
class Address implements Serializable {
private String sAddress = "";
public Address(String address) {
this.sAddress = address;
}
String getAddress() {
return this.sAddress;
}
void setAddress(String address) {
this.sAddress = address;
}
}
}
@@ -0,0 +1,5 @@
<html>
<body>
<span wicket:id="hello"></span>
</body>
</html>
@@ -0,0 +1,10 @@
package com.baeldung.wicket.examples.helloworld;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
public class HelloWorld extends WebPage {
public HelloWorld() {
add(new Label("hello", "Hello World!"));
}
}
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>
@@ -0,0 +1,23 @@
package com.baeldung.wicket.examples;
import org.apache.wicket.util.tester.WicketTester;
import org.junit.Before;
import org.junit.Test;
public class HomePageIntegrationTest {
private WicketTester tester;
@Before
public void setUp() {
tester = new WicketTester(new HelloWorldApplication());
}
@Test
public void whenPageInvoked_thanRenderedOK() {
//start and render the test page
tester.startPage(HelloWorld.class);
//assert rendered page class
tester.assertRenderedPage(HelloWorld.class);
}
}
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>CafeAddress</display-name>
<!--
There are three means to configure Wickets configuration mode and they
are tested in the order given.
1) A system property: -Dwicket.configuration
2) servlet specific <init-param>
3) context specific <context-param>
The value might be either "development" (reloading when templates change) or
"deployment". If no configuration is found, "development" is the default. -->
<filter>
<filter-name>wicket.examples</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>com.baeldung.wicket.examples.HelloWorldApplication</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>wicket.examples</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>