You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jc...@apache.org on 2008/04/09 14:41:15 UTC
svn commit: r646306 - in
/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket:
MarkupContainer.java markup/html/form/FormComponent.java
Author: jcompagner
Date: Wed Apr 9 05:41:13 2008
New Revision: 646306
URL: http://svn.apache.org/viewvc?rev=646306&view=rev
Log:
generics
Modified:
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java?rev=646306&r1=646305&r2=646306&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java Wed Apr 9 05:41:13 2008
@@ -111,7 +111,7 @@
/**
* @see org.apache.wicket.Component#Component(String, IModel)
*/
- public MarkupContainer(final String id, IModel model)
+ public MarkupContainer(final String id, IModel<T> model)
{
super(id, model);
}
@@ -125,7 +125,7 @@
* Thrown if a child with the same id is replaced by the add operation.
* @return This
*/
- public final MarkupContainer add(final Component child)
+ public final MarkupContainer<T> add(final Component child)
{
checkHierarchyChange(child);
@@ -158,7 +158,7 @@
* The child
* @return This
*/
- public final MarkupContainer addOrReplace(final Component child)
+ public final MarkupContainer<T> addOrReplace(final Component child)
{
checkHierarchyChange(child);
@@ -670,7 +670,7 @@
* Thrown if there was no child with the same id.
* @return This
*/
- public final MarkupContainer replace(final Component child)
+ public final MarkupContainer<T> replace(final Component child)
{
checkHierarchyChange(child);
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java?rev=646306&r1=646305&r2=646306&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java Wed Apr 9 05:41:13 2008
@@ -480,7 +480,7 @@
* @see IValidator
* @see IValidatorAddListener
*/
- public final FormComponent add(final IValidator validator)
+ public final FormComponent<T> add(final IValidator validator)
{
if (validator == null)
{
@@ -771,16 +771,16 @@
*
* @return List of validators
*/
- public final List getValidators()
+ public final List<IValidator> getValidators()
{
final int size = validators_size();
if (size == 0)
{
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
else
{
- final List list = new ArrayList(size);
+ final List<IValidator> list = new ArrayList<IValidator>(size);
for (int i = 0; i < size; i++)
{
list.add(validators_get(i));
@@ -964,7 +964,7 @@
* @param labelModel
* @return this for chaining
*/
- public FormComponent setLabel(IModel labelModel)
+ public FormComponent<T> setLabel(IModel labelModel)
{
setLabelInternal(labelModel);
return this;
@@ -1004,7 +1004,7 @@
* True if this component is to be persisted.
* @return this for chaining
*/
- public final FormComponent setPersistent(final boolean persistent)
+ public final FormComponent<T> setPersistent(final boolean persistent)
{
if (supportsPersistence())
{
@@ -1024,7 +1024,7 @@
* @param required
* @return this for chaining
*/
- public final FormComponent setRequired(final boolean required)
+ public final FormComponent<T> setRequired(final boolean required)
{
if (!required && getType() != null && getType().isPrimitive())
{
@@ -1046,7 +1046,7 @@
* @param type
* @return this for chaining
*/
- public final FormComponent setType(Class type)
+ public final FormComponent<T> setType(Class type)
{
typeName = type == null ? null : type.getName();
if (type != null && type.isPrimitive())
@@ -1271,16 +1271,6 @@
protected T convertValue(String[] value) throws ConversionException
{
return (T)(value != null && value.length > 0 && value[0] != null ? trim(value[0]) : null);
- }
-
- /**
- * @see org.apache.wicket.Component#getBehaviors(java.lang.Class)
- */
- @Override
- protected List getBehaviors(Class type)
- {
- // List
- return super.getBehaviors(type);
}
/**