From 185d5c51ffb6b89a318761dc9a7c0d6063eadd46 Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Fri, 3 Feb 2012 23:41:18 -0600 Subject: [PATCH 01/15] Backport from 1.5.0.7 to 1.4.0.7 --- pom.xml | 2 +- wicket-source-demo/pom.xml | 38 ++++-- .../ftlines/wicketsource/demo/HomePage.java | 4 +- .../net/ftlines/wicketsource/demo/Start.java | 111 +++++++----------- wicket-source/pom.xml | 6 +- .../AttributeModifyingComponentVisitor.java | 2 +- .../ftlines/wicketsource/WicketSource.java | 7 +- .../wicketsource/WicketSourceFilter.java | 3 +- 8 files changed, 81 insertions(+), 92 deletions(-) diff --git a/pom.xml b/pom.xml index 1e8429d..695b53f 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.5.0.7-SNAPSHOT + 1.4.0.7-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 654cac9..92e905a 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,17 +3,16 @@ net.ftlines.wicket-source wicket-source-parent - 1.5.0.7-SNAPSHOT + 1.4.0.7-SNAPSHOT ../pom.xml - net.ftlines.wicket-source wicket-source-demo war Wicket Source Demo Wicket Quick-Start project demonstrating use of Wicket-Source - 1.5.0 - 7.5.0.v20110901 + 1.4.0 + 6.1.25 @@ -26,7 +25,7 @@ org.apache.wicket - wicket-core + wicket ${wicket.version} @@ -39,12 +38,12 @@ org.slf4j slf4j-log4j12 - 1.6.2 + 1.4.2 log4j log4j - 1.2.16 + 1.2.14 @@ -56,12 +55,25 @@ - - org.eclipse.jetty.aggregate - jetty-all-server - ${jetty.version} - provided - + + org.mortbay.jetty + jetty + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-util + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-management + ${jetty.version} + provided + + diff --git a/wicket-source-demo/src/main/java/net/ftlines/wicketsource/demo/HomePage.java b/wicket-source-demo/src/main/java/net/ftlines/wicketsource/demo/HomePage.java index c44fb78..630c555 100644 --- a/wicket-source-demo/src/main/java/net/ftlines/wicketsource/demo/HomePage.java +++ b/wicket-source-demo/src/main/java/net/ftlines/wicketsource/demo/HomePage.java @@ -6,6 +6,7 @@ import net.ftlines.wicketsource.demo.BookDataTable.BookDataProvider; import org.apache.wicket.Component; +import org.apache.wicket.PageParameters; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; @@ -20,7 +21,6 @@ import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; -import org.apache.wicket.request.mapper.parameter.PageParameters; /** * The main home page of this application @@ -99,7 +99,7 @@ public LinkedTitlePanel(String id, IModel rowModel) { ExternalLink link = new ExternalLink("link", new PropertyModel(rowModel, "url"), - new PropertyModel(rowModel, "title")); + new PropertyModel(rowModel, "title")); add(link); } diff --git a/wicket-source-demo/src/test/java/net/ftlines/wicketsource/demo/Start.java b/wicket-source-demo/src/test/java/net/ftlines/wicketsource/demo/Start.java index 16e7c89..c63e6c9 100644 --- a/wicket-source-demo/src/test/java/net/ftlines/wicketsource/demo/Start.java +++ b/wicket-source-demo/src/test/java/net/ftlines/wicketsource/demo/Start.java @@ -1,76 +1,49 @@ package net.ftlines.wicketsource.demo; -import org.apache.wicket.util.time.Duration; -import org.eclipse.jetty.http.ssl.SslContextFactory; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.bio.SocketConnector; -import org.eclipse.jetty.server.ssl.SslSocketConnector; -import org.eclipse.jetty.util.resource.Resource; -import org.eclipse.jetty.webapp.WebAppContext; +import org.mortbay.jetty.Connector; +import org.mortbay.jetty.Server; +import org.mortbay.jetty.bio.SocketConnector; +import org.mortbay.jetty.webapp.WebAppContext; -public class Start { - public static void main(String[] args) throws Exception { - int timeout = (int) Duration.ONE_HOUR.getMilliseconds(); - - Server server = new Server(); - SocketConnector connector = new SocketConnector(); - - // Set some timeout options to make debugging easier. - connector.setMaxIdleTime(timeout); - connector.setSoLingerTime(-1); - connector.setPort(8080); - server.addConnector(connector); - - // check if a keystore for a SSL certificate is available, and - // if so, start a SSL connector on port 8443. By default, the - // quickstart comes with a Apache Wicket Quickstart Certificate - // that expires about half way september 2021. Do not use this - // certificate anywhere important as the passwords are available - // in the source. - - Resource keystore = Resource.newClassPathResource("/keystore"); - if (keystore != null && keystore.exists()) { - connector.setConfidentialPort(8443); - - SslContextFactory factory = new SslContextFactory(); - factory.setKeyStoreResource(keystore); - factory.setKeyStorePassword("wicket"); - factory.setTrustStore(keystore); - factory.setKeyManagerPassword("wicket"); - SslSocketConnector sslConnector = new SslSocketConnector(factory); - sslConnector.setMaxIdleTime(timeout); - sslConnector.setPort(8443); - sslConnector.setAcceptors(4); - server.addConnector(sslConnector); - System.out.println("SSL access to the quickstart has been enabled on port 8443"); - System.out.println("You can access the application using SSL on https://localhost:8443"); - System.out.println(); - } - - WebAppContext bb = new WebAppContext(); - bb.setServer(server); - bb.setContextPath("/"); - bb.setWar("src/main/webapp"); - - // START JMX SERVER - // MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); - // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer); - // server.getContainer().addEventListener(mBeanContainer); - // mBeanContainer.start(); - - server.setHandler(bb); +public class Start { - try { - System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP"); - server.start(); - System.in.read(); - System.out.println(">>> STOPPING EMBEDDED JETTY SERVER"); - server.stop(); - server.join(); - } catch (Exception e) { - e.printStackTrace(); - System.exit(1); + public static void main(String[] args) throws Exception { + Server server = new Server(); + SocketConnector connector = new SocketConnector(); + + // Set some timeout options to make debugging easier. + connector.setMaxIdleTime(1000 * 60 * 60); + connector.setSoLingerTime(-1); + connector.setPort(8080); + server.setConnectors(new Connector[] { connector }); + + WebAppContext bb = new WebAppContext(); + bb.setServer(server); + bb.setContextPath("/"); + bb.setWar("src/main/webapp"); + + // START JMX SERVER + // MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); + // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer); + // server.getContainer().addEventListener(mBeanContainer); + // mBeanContainer.start(); + + server.addHandler(bb); + + try { + System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP"); + server.start(); + System.in.read(); + System.out.println(">>> STOPPING EMBEDDED JETTY SERVER"); + // while (System.in.available() == 0) { + // Thread.sleep(5000); + // } + server.stop(); + server.join(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(100); + } } - } } diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 31b10e8..54cba9f 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.5.0.7-SNAPSHOT + 1.4.0.7-SNAPSHOT ../pom.xml wicket-source @@ -20,7 +20,7 @@ - 1.5.0 + 1.4.0 UTF-8 @@ -29,7 +29,7 @@ org.apache.wicket wicket ${wicket.version} - pom + jar diff --git a/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingComponentVisitor.java b/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingComponentVisitor.java index ce17b84..01c85b2 100644 --- a/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingComponentVisitor.java +++ b/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingComponentVisitor.java @@ -25,7 +25,7 @@ public class AttributeModifyingComponentVisitor implements Serializable, ICompon * Creates a visitor */ public AttributeModifyingComponentVisitor() { - wicketSourceAttribute = new AttributeModifier("wicketSource", new SourceModel()); + wicketSourceAttribute = new AttributeModifier("wicketSource", true, new SourceModel()); } /** diff --git a/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSource.java b/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSource.java index bcd0f3f..b5b355e 100644 --- a/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSource.java +++ b/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSource.java @@ -16,8 +16,11 @@ public class WicketSource { */ public static void configure(Application application) { - application.getComponentInstantiationListeners().add(new AttributeModifyingInstantiationListener()); - application.getComponentPostOnBeforeRenderListeners().add(new AttributeModifyingComponentVisitor()); + application.addComponentInstantiationListener(new AttributeModifyingInstantiationListener()); + application.addPostComponentOnBeforeRenderListener(new AttributeModifyingComponentVisitor()); +// Below is 1.5 syntax for diff convenience. +// application.getComponentInstantiationListeners().add(new AttributeModifyingInstantiationListener()); +// application.getComponentPostOnBeforeRenderListeners().add(new AttributeModifyingComponentVisitor()); } } diff --git a/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSourceFilter.java b/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSourceFilter.java index 67eb81e..c70c1c8 100644 --- a/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSourceFilter.java +++ b/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSourceFilter.java @@ -16,7 +16,8 @@ public class WicketSourceFilter { /** The notification method where instantiation listeners are called. */ - private static final String NOTIFY_COMPONENT_INSTANTIATION_LISTENERS = "org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation"; + private static final String NOTIFY_COMPONENT_INSTANTIATION_LISTENERS = "org.apache.wicket.Application.notifyComponentInstantiationListeners"; +// private static final String NOTIFY_COMPONENT_INSTANTIATION_LISTENERS = "org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation"; /** When we hit this as the component origin, we know we won't get anything useful out of it. */ private static final String WICKET_PAGE_ON_RENDER = "org.apache.wicket.Page.onRender"; /** When we hit this as the component origin, we know we won't get anything useful out of it. */ From 2785818027cf514c7f9beacc458f5fdfdb8ecaf2 Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 02:57:40 -0600 Subject: [PATCH 02/15] [maven-release-plugin] prepare release wicket-source-parent-1.4.0.7 --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 695b53f..667e832 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 92e905a..1ac2e1a 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 54cba9f..623fe09 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 ../pom.xml wicket-source From 44e81cacd29e903addb5b1f1ad93779fb801a0c6 Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 02:57:45 -0600 Subject: [PATCH 03/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 667e832..ac48577 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.8-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 1ac2e1a..6822fc4 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.8-SNAPSHOT ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 623fe09..2b00a7a 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.8-SNAPSHOT ../pom.xml wicket-source From 06b684f008129ca7c90b23457792589337b859c3 Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:04:07 -0600 Subject: [PATCH 04/15] version reset --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index ac48577..695b53f 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.8-SNAPSHOT + 1.4.0.7-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 6822fc4..92e905a 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.8-SNAPSHOT + 1.4.0.7-SNAPSHOT ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 2b00a7a..54cba9f 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.8-SNAPSHOT + 1.4.0.7-SNAPSHOT ../pom.xml wicket-source From 5d206dd4f1a5fea07226c3facde321c2b95b084e Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:04:54 -0600 Subject: [PATCH 05/15] [maven-release-plugin] prepare release wicket-source-parent-1.4.0.7 --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 695b53f..667e832 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 92e905a..1ac2e1a 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 54cba9f..623fe09 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 ../pom.xml wicket-source From d7a891e03e972d8f7b0623a1a090260dd781ab2f Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:05:00 -0600 Subject: [PATCH 06/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 667e832..ac48577 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.8-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 1ac2e1a..6822fc4 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.8-SNAPSHOT ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 623fe09..2b00a7a 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.8-SNAPSHOT ../pom.xml wicket-source From e3212e4fd6b2f9cca9da59f0d0d9b0819b668c8c Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:24:50 -0600 Subject: [PATCH 07/15] version fix --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index ac48577..695b53f 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.8-SNAPSHOT + 1.4.0.7-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 6822fc4..92e905a 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.8-SNAPSHOT + 1.4.0.7-SNAPSHOT ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 2b00a7a..54cba9f 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.8-SNAPSHOT + 1.4.0.7-SNAPSHOT ../pom.xml wicket-source From 2a22aa7571ae4f35016afdf9d3a8bbf938b462fc Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:25:23 -0600 Subject: [PATCH 08/15] [maven-release-plugin] prepare release wicket-source-parent-1.4.0.7 --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 695b53f..667e832 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 92e905a..1ac2e1a 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 54cba9f..623fe09 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 ../pom.xml wicket-source From 5084a58fc98aac7a29a2ae0cfb39b162eef3dc33 Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:26:37 -0600 Subject: [PATCH 09/15] version fix --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 667e832..695b53f 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.7-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 1ac2e1a..92e905a 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.7-SNAPSHOT ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 623fe09..54cba9f 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.7-SNAPSHOT ../pom.xml wicket-source From b4fa975924d4231f720467b6bcc3c41c632b1bd4 Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:27:32 -0600 Subject: [PATCH 10/15] [maven-release-plugin] prepare release wicket-source-parent-1.4.0.7 --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 695b53f..667e832 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 92e905a..1ac2e1a 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 54cba9f..623fe09 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7-SNAPSHOT + 1.4.0.7 ../pom.xml wicket-source From e586f8fc35ba24ce1ec7301bf06c99cf4a646c34 Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:27:37 -0600 Subject: [PATCH 11/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 667e832..ac48577 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.8-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 1ac2e1a..6822fc4 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.8-SNAPSHOT ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 623fe09..2b00a7a 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.7 + 1.4.0.8-SNAPSHOT ../pom.xml wicket-source From c65dde973eafcf667f2f59de1615681b6c35f590 Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:45:37 -0600 Subject: [PATCH 12/15] Version update to 1.4.18 for wicket, which also catches up some other lib versions in the pom. --- pom.xml | 2 +- wicket-source-demo/pom.xml | 4 ++-- wicket-source/pom.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index ac48577..8e25664 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.8-SNAPSHOT + 1.4.18.7-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 6822fc4..fdbf00c 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.8-SNAPSHOT + 1.4.18.7-SNAPSHOT ../pom.xml wicket-source-demo @@ -11,7 +11,7 @@ Wicket Source Demo Wicket Quick-Start project demonstrating use of Wicket-Source - 1.4.0 + 1.4.18 6.1.25 diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 2b00a7a..fd98e3b 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.0.8-SNAPSHOT + 1.4.18.7-SNAPSHOT ../pom.xml wicket-source @@ -20,7 +20,7 @@ - 1.4.0 + 1.4.18 UTF-8 From 4e6967e9ac4488564d06f885b6bb3ea150576c8b Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:48:36 -0600 Subject: [PATCH 13/15] [maven-release-plugin] prepare release wicket-source-parent-1.4.18.7 --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 8e25664..48be9a7 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.18.7-SNAPSHOT + 1.4.18.7 pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index fdbf00c..9020eff 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.18.7-SNAPSHOT + 1.4.18.7 ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index fd98e3b..84897ce 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.18.7-SNAPSHOT + 1.4.18.7 ../pom.xml wicket-source From 4698d71275701cc2b31b810ce7bcb626d2f2ac18 Mon Sep 17 00:00:00 2001 From: Jenny Brown Date: Sat, 4 Feb 2012 03:48:41 -0600 Subject: [PATCH 14/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- wicket-source-demo/pom.xml | 2 +- wicket-source/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 48be9a7..ebadbb9 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.18.7 + 1.4.18.8-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 9020eff..63f2c6d 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.18.7 + 1.4.18.8-SNAPSHOT ../pom.xml wicket-source-demo diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index 84897ce..f30f3b5 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.18.7 + 1.4.18.8-SNAPSHOT ../pom.xml wicket-source From db191620be581e766cb3928ec6d3a8d11fc2b042 Mon Sep 17 00:00:00 2001 From: Kenkichi Mahara Date: Mon, 20 May 2013 18:14:41 +0900 Subject: [PATCH 15/15] Support for Wicket 1.3.7 --- pom.xml | 2 +- wicket-source-demo/pom.xml | 4 ++-- wicket-source/pom.xml | 8 +++++--- .../AttributeModifyingComponentVisitor.java | 14 +++++++------ ...tributeModifyingInstantiationListener.java | 20 +++++++++---------- .../net/ftlines/wicketsource/SourceModel.java | 6 ++++-- .../ftlines/wicketsource/WicketSource.java | 6 +++--- 7 files changed, 33 insertions(+), 27 deletions(-) diff --git a/pom.xml b/pom.xml index ebadbb9..b663258 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.18.8-SNAPSHOT + 1.3.7.0-SNAPSHOT pom Wicket-source displays component instantiation location in an html attribute, speeding the modification of existing wicket pages. The only module required for maven dependency in your app is wicket-source itself, although a demo app is included. Wicket Source With Plugins diff --git a/wicket-source-demo/pom.xml b/wicket-source-demo/pom.xml index 63f2c6d..f0cecc4 100644 --- a/wicket-source-demo/pom.xml +++ b/wicket-source-demo/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.18.8-SNAPSHOT + 1.3.7.0-SNAPSHOT ../pom.xml wicket-source-demo @@ -11,7 +11,7 @@ Wicket Source Demo Wicket Quick-Start project demonstrating use of Wicket-Source - 1.4.18 + 1.3.7 6.1.25 diff --git a/wicket-source/pom.xml b/wicket-source/pom.xml index f30f3b5..7e030e3 100644 --- a/wicket-source/pom.xml +++ b/wicket-source/pom.xml @@ -3,7 +3,7 @@ net.ftlines.wicket-source wicket-source-parent - 1.4.18.8-SNAPSHOT + 1.3.7.0-SNAPSHOT ../pom.xml wicket-source @@ -20,7 +20,7 @@ - 1.4.18 + 1.3.7 UTF-8 @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-source-plugin - 2.1.2 + 2.1.2 attach-sources @@ -48,6 +48,7 @@ + diff --git a/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingComponentVisitor.java b/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingComponentVisitor.java index 01c85b2..c2679d3 100644 --- a/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingComponentVisitor.java +++ b/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingComponentVisitor.java @@ -7,18 +7,20 @@ import org.apache.wicket.application.IComponentOnBeforeRenderListener; /** - * Sticks the wicket component name into an html attribute on the tag, which + * Sticks the wicket component name into an html attribute on the tag, which * makes it easier to find using the Firebug or Chrome Dev Tools * "Inspect Element" menu item. * - * This outputs more than just container classes (such as panels); it also + * This outputs more than just container classes (such as panels); it also * tags images, labels, and links. Some of that is noise but some may be useful * in locating a component in the source. - * + * * @author Jenny Brown * */ public class AttributeModifyingComponentVisitor implements Serializable, IComponentOnBeforeRenderListener { + private static final long serialVersionUID = 1L; + private final AttributeModifier wicketSourceAttribute; /** @@ -35,7 +37,7 @@ public void onBeforeRender(Component component) { component.add(wicketSourceAttribute); } - - - + + + } diff --git a/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingInstantiationListener.java b/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingInstantiationListener.java index 7e05e88..dd24c2c 100644 --- a/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingInstantiationListener.java +++ b/wicket-source/src/main/java/net/ftlines/wicketsource/AttributeModifyingInstantiationListener.java @@ -9,10 +9,10 @@ * Notes the creation location of components and saves that metadata in the component metadata area. * This is the precursor step to using a {@link AttributeModifyingComponentVisitor} for writing out an * HTML wicketsource="net.simsa.photo.web.MainMenuPanel:35" style of attribute. - * - * This uses a similar approach to line-precise-reporting-on-new-component and is likely to be + * + * This uses a similar approach to line-precise-reporting-on-new-component and is likely to be * equally slow, so turn it on only in debug/development mode, not production. - * + * * @author Jenny Brown * */ @@ -21,24 +21,24 @@ public class AttributeModifyingInstantiationListener implements IComponentInstan * This is an alternative to Component.CONSTRUCTED_AT_KEY which is package-private and thus internal to wicket. * If wicket eventually exposes the markup exception from creation time, we can use that directly instead. */ - static MetaDataKey CONSTRUCTED_AT_KEY = new MetaDataKey() { + static MetaDataKey CONSTRUCTED_AT_KEY = new MetaDataKey(InstantiationLocation.class) { private static final long serialVersionUID = 1L; }; - + /** * Indicates that the component's source location could not be determined, * probably because this is an internal wicket enclosure or similar * automatically generated component. - * + * * @author Jenny Brown - * + * */ static class UnsupportedComponentException extends Exception { public UnsupportedComponentException(String message) { super(message); } - } - + } + /** * When a component is instantiated, record the source location as part of its metadata. */ @@ -47,7 +47,7 @@ public void onInstantiation(Component component) if (component instanceof org.apache.wicket.markup.html.internal.Enclosure) { return; // nothing to see here; bail out early to save time. } - + try { component.setMetaData(CONSTRUCTED_AT_KEY, new InstantiationLocation(component)); } catch (UnsupportedComponentException ie) { diff --git a/wicket-source/src/main/java/net/ftlines/wicketsource/SourceModel.java b/wicket-source/src/main/java/net/ftlines/wicketsource/SourceModel.java index 5627b3e..70e6282 100644 --- a/wicket-source/src/main/java/net/ftlines/wicketsource/SourceModel.java +++ b/wicket-source/src/main/java/net/ftlines/wicketsource/SourceModel.java @@ -8,15 +8,17 @@ * @author Jenny Brown * */ -public class SourceModel extends ComponentModel +public class SourceModel extends ComponentModel { + private static final long serialVersionUID = 1L; + /** * @return package:file.java:lineNumber from InstantiationLocation.generateSourceLocationAttribute as a String */ @Override protected String getObject(Component component) { - InstantiationLocation loc = component.getMetaData(AttributeModifyingInstantiationListener.CONSTRUCTED_AT_KEY); + InstantiationLocation loc = (InstantiationLocation) component.getMetaData(AttributeModifyingInstantiationListener.CONSTRUCTED_AT_KEY); return loc == null ? null : loc.generateSourceLocationAttribute(); } } diff --git a/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSource.java b/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSource.java index b5b355e..25af3c1 100644 --- a/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSource.java +++ b/wicket-source/src/main/java/net/ftlines/wicketsource/WicketSource.java @@ -3,7 +3,7 @@ import org.apache.wicket.Application; /** - * Preferred entry point for app-developer use in initializing WicketSource, as + * Preferred entry point for app-developer use in initializing WicketSource, as * compatibility can be maintained across wicket versions. * @author Jenny Brown * @@ -17,10 +17,10 @@ public class WicketSource { public static void configure(Application application) { application.addComponentInstantiationListener(new AttributeModifyingInstantiationListener()); - application.addPostComponentOnBeforeRenderListener(new AttributeModifyingComponentVisitor()); + application.addComponentOnBeforeRenderListener(new AttributeModifyingComponentVisitor()); // Below is 1.5 syntax for diff convenience. // application.getComponentInstantiationListeners().add(new AttributeModifyingInstantiationListener()); // application.getComponentPostOnBeforeRenderListeners().add(new AttributeModifyingComponentVisitor()); } - + }