You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2012/04/04 15:29:08 UTC
[1/2] git commit: Minor improvements: - typo fixes - removal of
deprecated in 1.5.x method - copy userData as well
Updated Branches:
refs/heads/master b76de0183 -> 0cdc22a6a
Minor improvements:
- typo fixes
- removal of deprecated in 1.5.x method
- copy userData as well
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0cdc22a6
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0cdc22a6
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0cdc22a6
Branch: refs/heads/master
Commit: 0cdc22a6a8b38389e742bbcf4cfd26b027262aa2
Parents: a355af3
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Apr 4 15:28:13 2012 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Apr 4 15:28:13 2012 +0200
----------------------------------------------------------------------
.../org/apache/wicket/markup/ComponentTag.java | 31 +++++----------
1 files changed, 10 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/0cdc22a6/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java b/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java
index aa82c4ae..f57ee22 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java
@@ -58,10 +58,10 @@ public class ComponentTag extends MarkupElement
/** True, if attributes have been modified or added */
private final static int MODIFIED = 0x0002;
- /** If true, than the MarkupParser will ignore (remove) it. Temporary working variable */
+ /** If true, then the MarkupParser will ignore (remove) it. Temporary working variable */
private final static int IGNORE = 0x0004;
- /** If true, than the tag contain an automatically created wicket id */
+ /** If true, then the tag contain an automatically created wicket id */
private final static int AUTO_COMPONENT = 0x0008;
/** Some HTML tags are allow to have no close tag, e.g. 'br' */
@@ -70,7 +70,7 @@ public class ComponentTag extends MarkupElement
/** Render the tag as RawMarkup even if no Component can be found */
public final static int RENDER_RAW = 0x0020;
- /** If close tag, than reference to the corresponding close tag */
+ /** If close tag, than reference to the corresponding open tag */
private ComponentTag openTag;
/** The underlying xml tag */
@@ -264,19 +264,6 @@ public class ComponentTag extends MarkupElement
}
/**
- * Please use {@link #getAttribute(String)} instead
- *
- * @param name
- * @return The attribute
- * @deprecated since 1.5
- */
- @Deprecated
- public final String getString(String name)
- {
- return getAttribute(name);
- }
-
- /**
* Get the tag's component id
*
* @return The component id attribute of this tag
@@ -443,8 +430,11 @@ public class ComponentTag extends MarkupElement
}
if (behaviors != null)
{
- dest.behaviors = new ArrayList<Behavior>(behaviors.size());
- dest.behaviors.addAll(behaviors);
+ dest.behaviors = new ArrayList<Behavior>(behaviors);
+ }
+ if (userData != null)
+ {
+ dest.userData = new HashMap<String, Object>(userData);
}
}
@@ -507,7 +497,7 @@ public class ComponentTag extends MarkupElement
*/
private void checkIdAttribute(String key)
{
- if ((key != null) && (key.equalsIgnoreCase("id")))
+ if ("id".equalsIgnoreCase(key))
{
log.warn("Please use component.setMarkupId(String) to change the tag's 'id' attribute.");
}
@@ -696,7 +686,6 @@ public class ComponentTag extends MarkupElement
* if true, wicket:id are removed from output
* @param namespace
* Wicket's namespace to use
- * @param escapeAttributeValue
*/
public final void writeOutput(final Response response, final boolean stripWicketAttributes,
final String namespace)
@@ -941,7 +930,7 @@ public class ComponentTag extends MarkupElement
* @param component
* The component that is about to be rendered
* @param markupStream
- * The current amrkup stream
+ * The current markup stream
*/
public void onBeforeRender(final Component component, final MarkupStream markupStream)
{