You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2011/03/27 22:01:20 UTC
svn commit: r1086012 - in /wicket/trunk/wicket-core/src:
main/java/org/apache/wicket/markup/resolver/
test/java/org/apache/wicket/markup/resolver/issue3559/
Author: jdonnerstag
Date: Sun Mar 27 20:01:19 2011
New Revision: 1086012
URL: http://svn.apache.org/viewvc?rev=1086012&view=rev
Log:
fixed WICKET-3559 Autolink (AutolinkBookmarkablePageLink) already rendered problem
Added:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.java
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.java
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.java
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MyTest.java
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.java
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.java
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/WicketApplication.java
Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java
Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java?rev=1086012&r1=1086011&r2=1086012&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java (original)
+++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java Sun Mar 27 20:01:19 2011
@@ -841,7 +841,7 @@ public final class AutoLinkResolver impl
{
tag.setAutoComponentTag(true);
}
- tag.setId(autoId);
+ // tag.setId(autoId);
// get the reference resolver
ITagReferenceResolver referenceResolver = tagNameToTagReferenceResolvers.get(tagName);
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.html?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.html (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.html Sun Mar 27 20:01:19 2011
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <body>
+ <h1>Wicket AutolinkBookmarkablePageLink Test</h1>
+ <div wicket:id="menu"></div>
+ <wicket:child />
+</body>
+</html>
\ No newline at end of file
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.java?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.java (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/BasePage.java Sun Mar 27 20:01:19 2011
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.resolver.issue3559;
+
+import org.apache.wicket.markup.html.WebPage;
+
+/**
+ *
+ */
+public class BasePage extends WebPage
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct.
+ */
+ public BasePage()
+ {
+ add(new MenuPanel("menu"));
+ }
+}
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.html?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.html (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.html Sun Mar 27 20:01:19 2011
@@ -0,0 +1,3 @@
+<wicket:extend>
+ <div wicket:id="panel"></div>
+</wicket:extend>
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.java?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.java (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/HomePage.java Sun Mar 27 20:01:19 2011
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.resolver.issue3559;
+
+/**
+ *
+ */
+public final class HomePage extends BasePage
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct.
+ */
+ public HomePage()
+ {
+ add(new SimplePanel("panel"));
+ }
+}
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.html?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.html (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.html Sun Mar 27 20:01:19 2011
@@ -0,0 +1,6 @@
+<wicket:panel>
+ <wicket:link>
+ <div><a href="HomePage.html">Home Page</a></div>
+ <div><a href="SimplePage.html">Simple Page</a></div>
+ </wicket:link>
+</wicket:panel>
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.java?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.java (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.java Sun Mar 27 20:01:19 2011
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.resolver.issue3559;
+
+import org.apache.wicket.markup.html.panel.Panel;
+
+/**
+ *
+ */
+public class MenuPanel extends Panel
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct.
+ *
+ * @param id
+ */
+ public MenuPanel(String id)
+ {
+ super(id);
+ }
+}
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MyTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MyTest.java?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MyTest.java (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/MyTest.java Sun Mar 27 20:01:19 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.resolver.issue3559;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.WicketTestCase;
+
+/**
+ * issue-3559
+ */
+public class MyTest extends WicketTestCase
+{
+ /**
+ *
+ */
+ public void test1()
+ {
+ tester.startPage(HomePage.class);
+ Page page = tester.getLastRenderedPage();
+ assertNotNull(page);
+ String doc = tester.getLastResponseAsString();
+ assertNotNull(doc);
+
+ tester.startPage(SimplePage.class);
+ page = tester.getLastRenderedPage();
+ assertNotNull(page);
+ doc = tester.getLastResponseAsString();
+ assertNotNull(doc);
+
+ tester.startPage(HomePage.class);
+ page = tester.getLastRenderedPage();
+ assertNotNull(page);
+ doc = tester.getLastResponseAsString();
+ assertNotNull(doc);
+ }
+}
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.html?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.html (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.html Sun Mar 27 20:01:19 2011
@@ -0,0 +1,3 @@
+<wicket:extend>
+ <h1>Simple Page</h1>
+</wicket:extend>
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.java?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.java (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePage.java Sun Mar 27 20:01:19 2011
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.resolver.issue3559;
+
+/**
+ *
+ */
+public final class SimplePage extends BasePage
+{
+ private static final long serialVersionUID = 1L;
+}
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.html?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.html (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.html Sun Mar 27 20:01:19 2011
@@ -0,0 +1,6 @@
+<wicket:head>
+ <link rel="stylesheet" href="SimplePanel.css" />
+</wicket:head>
+<wicket:panel>
+ <h1 class="panel">Simple Panel</h1>
+</wicket:panel>
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.java?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.java (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/SimplePanel.java Sun Mar 27 20:01:19 2011
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.resolver.issue3559;
+
+import org.apache.wicket.markup.html.panel.Panel;
+
+/**
+ *
+ */
+public class SimplePanel extends Panel
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ * @param id
+ */
+ public SimplePanel(String id)
+ {
+ super(id);
+ }
+}
Added: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/WicketApplication.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/WicketApplication.java?rev=1086012&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/WicketApplication.java (added)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/resolver/issue3559/WicketApplication.java Sun Mar 27 20:01:19 2011
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.resolver.issue3559;
+
+import org.apache.wicket.protocol.http.WebApplication;
+
+/**
+ *
+ */
+public class WicketApplication extends WebApplication
+{
+ @Override
+ public Class<HomePage> getHomePage()
+ {
+ return HomePage.class;
+ }
+}