You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2008/09/15 06:47:49 UTC
svn commit: r695343 - in /wicket/trunk/wicket/src:
main/java/org/apache/wicket/ test/java/org/apache/wicket/
Author: ivaynberg
Date: Sun Sep 14 21:47:45 2008
New Revision: 695343
URL: http://svn.apache.org/viewvc?rev=695343&view=rev
Log:
WICKET-1818
Added:
wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.html (with props)
wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.java (with props)
wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPageExpectedResult.html (with props)
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupContainerTest.java
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java?rev=695343&r1=695342&r2=695343&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java Sun Sep 14 21:47:45 2008
@@ -1504,6 +1504,7 @@
markupId = Strings.replaceAll(markupId, "_", "__").toString();
markupId = markupId.replace('.', '_');
markupId = markupId.replace('-', '_');
+ markupId = markupId.replace(' ', '_');
return markupId;
}
@@ -2786,6 +2787,7 @@
setMetaData(MARKUP_ID_KEY, null);
return;
}
+
generatedMarkupId = -1;
setMetaData(MARKUP_ID_KEY, (String)markupId);
}
Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupContainerTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupContainerTest.java?rev=695343&r1=695342&r2=695343&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupContainerTest.java (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupContainerTest.java Sun Sep 14 21:47:45 2008
@@ -56,4 +56,9 @@
assertEquals(Integer.toString(i++), component.getId());
}
}
+
+ public void testMarkupId() throws Exception
+ {
+ executeTest(MarkupIdTestPage.class, "MarkupIdTestPageExpectedResult.html");
+ }
}
Added: wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.html?rev=695343&view=auto
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.html (added)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.html Sun Sep 14 21:47:45 2008
@@ -0,0 +1 @@
+<span wicket:id="foo bar">test</span>
\ No newline at end of file
Propchange: wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.html
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.java?rev=695343&view=auto
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.java (added)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.java Sun Sep 14 21:47:45 2008
@@ -0,0 +1,32 @@
+/*
+ * 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;
+
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+
+public class MarkupIdTestPage extends WebPage
+{
+
+ public MarkupIdTestPage()
+ {
+ Label label = new Label("foo bar", "test");
+ label.setOutputMarkupId(true);
+ add(label);
+ }
+
+}
Propchange: wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPageExpectedResult.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPageExpectedResult.html?rev=695343&view=auto
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPageExpectedResult.html (added)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPageExpectedResult.html Sun Sep 14 21:47:45 2008
@@ -0,0 +1 @@
+<span id="foo_bar1" wicket:id="foo bar">test</span>
\ No newline at end of file
Propchange: wicket/trunk/wicket/src/test/java/org/apache/wicket/MarkupIdTestPageExpectedResult.html
------------------------------------------------------------------------------
svn:mime-type = text/plain