Author: ivaynberg Date: Tue Apr 7 17:19:15 2009 New Revision: 762862 URL: http://svn.apache.org/viewvc?rev=762862&view=rev Log: fix markup id from going crazy on repeating renders
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java?rev=762862&r1=762861&r2=762862&view=diff ============================================================================== --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java Tue Apr 7 17:19:15 2009 @@ -146,7 +146,11 @@ { // prefix markup id of this radio with its group's id // this will make it easier to identify all radios that belong to a specific group - setMarkupId(getGroup().getMarkupId() + "-" + getMarkupId()); + final String prefix = getGroup().getMarkupId() + "-"; + if (!getMarkupId().startsWith(prefix)) + { + setMarkupId(prefix + getMarkupId()); + } super.onBeforeRender(); }