Author: ivaynberg
Date: Fri Feb  5 04:12:57 2010
New Revision: 906806

URL: http://svn.apache.org/viewvc?rev=906806&view=rev
Log:
WICKET-2510
Issue: WICKET-2510

Modified:
    wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs
    wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.ui.prefs
    
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java
    
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java
    
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java

Modified: 
wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs?rev=906806&r1=906805&r2=906806&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs 
(original)
+++ wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs 
Fri Feb  5 04:12:57 2010
@@ -1,4 +1,4 @@
-#Thu Feb 04 17:57:52 PST 2010
+#Wed Aug 26 08:15:28 PDT 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -96,15 +96,15 @@
 
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_assignment=0
 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=20
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
 
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
 
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
 
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=64
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=80
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
 
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
 
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=64
 
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
@@ -145,9 +145,9 @@
 org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
 org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
 org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.line_length=100
 org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation=1
 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
 org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
 
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
@@ -162,9 +162,6 @@
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do
 not insert
 
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do
 not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do 
not insert
 
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
@@ -333,21 +330,19 @@
 
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do
 not insert
 
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do
 not insert
 
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do
 not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
 org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
 org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
 org.eclipse.jdt.core.formatter.lineSplit=100
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
 
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=2
 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
 org.eclipse.jdt.core.formatter.tabulation.char=tab
 org.eclipse.jdt.core.formatter.tabulation.size=4
 org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=false
 org.eclipse.jdt.core.incompatibleJDKLevel=ignore
 org.eclipse.jdt.core.incompleteClasspath=error

Modified: wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.ui.prefs
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.ui.prefs?rev=906806&r1=906805&r2=906806&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.ui.prefs 
(original)
+++ wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.ui.prefs Fri 
Feb  5 04:12:57 2010
@@ -1,4 +1,4 @@
-#Thu Feb 04 17:57:52 PST 2010
+#Wed Aug 01 11:37:07 CEST 2007
 comment_clear_blank_lines=false
 comment_format_comments=true
 comment_format_header=true
@@ -11,7 +11,7 @@
 comment_separate_root_tags=true
 eclipse.preferences.version=1
 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_Wicket
+formatter_profile=_wicket
 formatter_settings_version=11
 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
 org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" 
encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" 
context\="gettercomment_context" deleted\="false" description\="Comment for 
getter method" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" 
name\="gettercomment">/**\r\n * Gets ${bare_field_name}.\r\n * @return 
${bare_field_name}\r\n */</template><template autoinsert\="false" 
context\="settercomment_context" deleted\="false" description\="Comment for 
setter method" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" 
name\="settercomment">/**\r\n * Sets ${bare_field_name}.\r\n * @param ${param} 
${bare_field_name}\r\n */</template><template autoinsert\="false" 
context\="constructorcomment_context" deleted\="false" description\="Comment 
for created constructors" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" 
name\="constructorcomment">/**\r\n * Construct.\r\n
  * ${tags}\r\n */</template><template autoinsert\="false" 
context\="filecomment_context" deleted\="false" description\="Comment for 
created Java files" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" 
name\="filecomment"/><template autoinsert\="false" 
context\="typecomment_context" deleted\="false" description\="Comment for 
created types" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" 
name\="typecomment">/**\r\n * @author ${user}\r\n * ${tags}\r\n 
*/</template><template autoinsert\="true" context\="fieldcomment_context" 
deleted\="false" description\="Comment for fields" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" 
name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" 
context\="methodcomment_context" deleted\="false" description\="Comment for 
non-overriding methods" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" 
name\="methodcomment">/**\r\n * ${tags}
 \r\n */</template><template autoinsert\="false" 
context\="overridecomment_context" deleted\="false" description\="Comment for 
overriding methods" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" 
name\="overridecomment">/**\r\n * ${see_to_overridden}\r\n 
*/</template><template autoinsert\="false" context\="newtype_context" 
deleted\="false" description\="Newly created files" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\r\n * 
Licensed to the Apache Software Foundation (ASF) under one or more\r\n * 
contributor license agreements.  See the NOTICE file distributed with\r\n * 
this work for additional information regarding copyright ownership.\r\n * The 
ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the 
"License"); you may not use this file except in compliance with\r\n * the 
License.  You may obtain a copy of the License at\r\n *\r\n *      
http\://www.apache.org/licenses/LICENSE-2.0\r\
 n *\r\n * Unless required by applicable law or agreed to in writing, 
software\r\n * distributed under the License is distributed on an "AS IS" 
BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.\r\n * See the License for the specific language governing permissions 
and\r\n * limitations under the License.\r\n 
*/\r\n${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template
 autoinsert\="false" context\="catchblock_context" deleted\="false" 
description\="Code in new catch blocks" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">throw 
new RuntimeException(${exception_var});</template><template autoinsert\="false" 
context\="methodbody_context" deleted\="false" description\="Code in created 
method stubs" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" 
name\="methodbody">${body_statement}</template><template autoinsert\="false" 
context\="c
 onstructorbody_context" deleted\="false" description\="Code in created 
constructor stubs" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" 
name\="constructorbody">${body_statement}</template><template 
autoinsert\="true" context\="getterbody_context" deleted\="false" 
description\="Code in created getters" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" 
name\="getterbody">return ${field};</template><template autoinsert\="true" 
context\="setterbody_context" deleted\="false" description\="Code in created 
setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" 
name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" 
context\="classbody_context" deleted\="false" description\="Code in new class 
type bodies" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.classbody" 
name\="classbody">\r\n</template><template autoinsert\="true" 
context\="interfacebody_context" deleted\="false" 
 description\="Code in new interface type bodies" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" 
name\="interfacebody">\r\n</template><template autoinsert\="true" 
context\="enumbody_context" deleted\="false" description\="Code in new enum 
type bodies" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" 
name\="enumbody">\r\n</template><template autoinsert\="true" 
context\="annotationbody_context" deleted\="false" description\="Code in new 
annotation type bodies" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" 
name\="annotationbody">\r\n</template><template autoinsert\="true" 
context\="delegatecomment_context" deleted\="false" description\="Comment for 
delegate methods" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" 
name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n 
*/</template></templates>

Modified: 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java?rev=906806&r1=906805&r2=906806&view=diff
==============================================================================
--- 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java
 (original)
+++ 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java
 Fri Feb  5 04:12:57 2010
@@ -70,7 +70,7 @@
                asb.append(" for (var i = 0 ; i < inputNodes.length ; i ++) 
{\n");
                asb.append(" var inputNode = inputNodes[i];\n");
                asb.append(" if (!inputNode.type) continue;\n");
-               asb.append(" if (!(inputNode.id.indexOf(markupId+'-')===0)) 
continue;\n");
+               asb.append(" if 
(!(inputNode.className.indexOf('wicket-'+markupId)===0)) continue;\n");
                asb.append(" var inputType = inputNode.type.toLowerCase();\n");
                asb.append(" if (inputType == 'checkbox' || inputType == 
'radio') {\n");
                asb.append(" Wicket.Event.add(inputNode, 'click', 
callbackScript);\n");

Modified: 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java?rev=906806&r1=906805&r2=906806&view=diff
==============================================================================
--- 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java
 (original)
+++ 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java
 Fri Feb  5 04:12:57 2010
@@ -25,6 +25,7 @@
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.protocol.http.portlet.PortletRequestContext;
+import org.apache.wicket.util.string.Strings;
 
 
 /**
@@ -140,21 +141,6 @@
                return group;
        }
 
-       /** {...@inheritdoc} */
-       @Override
-       protected void onBeforeRender()
-       {
-               // 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
-               final String prefix = getGroup().getMarkupId() + "-";
-               if (!getMarkupId().startsWith(prefix))
-               {
-                       setMarkupId(prefix + getMarkupId());
-               }
-               super.onBeforeRender();
-       }
-
-
        /**
         * @see Component#onComponentTag(ComponentTag)
         * @param tag
@@ -243,6 +229,20 @@
                {
                        tag.put(ATTR_DISABLED, ATTR_DISABLED);
                }
+
+               // put group id into the class so we can easily identify all 
radios belonging to the group
+               final String marker = "wicket-" + getGroup().getMarkupId();
+               String clazz = tag.getAttribute("class");
+               if (Strings.isEmpty(clazz))
+               {
+                       clazz = marker;
+               }
+               else
+               {
+                       clazz = clazz + " " + marker;
+               }
+               tag.put("class", clazz);
+
        }
 
        /**

Modified: 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java?rev=906806&r1=906805&r2=906806&view=diff
==============================================================================
--- 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java
 (original)
+++ 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java
 Fri Feb  5 04:12:57 2010
@@ -23,6 +23,7 @@
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.protocol.http.portlet.PortletRequestContext;
+import org.apache.wicket.util.string.Strings;
 
 /**
  * Component representing a single radio choice in a 
org.apache.wicket.markup.html.form.RadioGroup.
@@ -121,22 +122,6 @@
        }
 
        /**
-        * @see org.apache.wicket.Component#onBeforeRender()
-        */
-       @Override
-       protected void onBeforeRender()
-       {
-               // 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
-               final String prefix = getGroup().getMarkupId() + "-";
-               if (!getMarkupId().startsWith(prefix))
-               {
-                       setMarkupId(prefix + getMarkupId());
-               }
-               super.onBeforeRender();
-       }
-
-       /**
         * 
         * @return The associated radio group Component
         */
@@ -228,6 +213,20 @@
                {
                        tag.put(ATTR_DISABLED, ATTR_DISABLED);
                }
+
+               // put group id into the class so we can easily identify all 
radios belonging to the group
+               final String marker = "wicket-" + getGroup().getMarkupId();
+               String clazz = tag.getAttribute("class");
+               if (Strings.isEmpty(clazz))
+               {
+                       clazz = marker;
+               }
+               else
+               {
+                       clazz = clazz + " " + marker;
+               }
+               tag.put("class", clazz);
+
        }
 
        /**


Reply via email to