Author: ivaynberg Date: Fri Jul 20 10:28:35 2007 New Revision: 558064 URL: http://svn.apache.org/viewvc?view=rev&rev=558064 Log: markupfragmentfinder still uses the hack where it treats numeric only ids specially for repeaters. until that is fixed we have to generate ids that are numeric for repeater children.
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java?view=diff&rev=558064&r1=558063&r2=558064 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java Fri Jul 20 10:28:35 2007 @@ -1217,7 +1217,15 @@ // if (markupId == null) // { // if not in the markup, generate one + markupId = getId() + page.getAutoIndex(); + // make sure id is compliant with w3c requirements (starts with a letter) + char c = markupId.charAt(0); + if (!Character.isLetter(c)) + { + markupId = "id" + markupId; + } + // } setMetaData(MARKUP_ID_KEY, markupId); Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java?view=diff&rev=558064&r1=558063&r2=558064 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java Fri Jul 20 10:28:35 2007 @@ -112,7 +112,7 @@ // We prepend the id's with the text 'id' so they will generate valid // markup id's if needed. - return "id"+String.valueOf(childIdCounter); + return String.valueOf(childIdCounter); } /**