You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2008/06/29 07:51:39 UTC
svn commit: r672603 [10/18] - in /wicket/trunk:
testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/
testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app2/
wicket-auth-roles/src/main/java/org/apache/w...
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/StringHeaderContributor.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/StringHeaderContributor.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/StringHeaderContributor.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/StringHeaderContributor.java Sat Jun 28 22:50:41 2008
@@ -161,7 +161,7 @@
* @see org.apache.wicket.behavior.AbstractBehavior#detach(org.apache.wicket.Component)
*/
@Override
- public void detach(Component< ? > component)
+ public void detach(Component component)
{
contributor.contribution.detach();
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/ComponentFeedbackMessageFilter.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/ComponentFeedbackMessageFilter.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/ComponentFeedbackMessageFilter.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/ComponentFeedbackMessageFilter.java Sat Jun 28 22:50:41 2008
@@ -29,7 +29,7 @@
private static final long serialVersionUID = 1L;
/** The component to accept feedback messages for */
- private final Component< ? > component;
+ private final Component component;
/**
* Constructor
@@ -37,7 +37,7 @@
* @param component
* The component to filter on
*/
- public ComponentFeedbackMessageFilter(Component< ? > component)
+ public ComponentFeedbackMessageFilter(Component component)
{
this.component = component;
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/ContainerFeedbackMessageFilter.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/ContainerFeedbackMessageFilter.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/ContainerFeedbackMessageFilter.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/ContainerFeedbackMessageFilter.java Sat Jun 28 22:50:41 2008
@@ -28,7 +28,7 @@
{
private static final long serialVersionUID = 1L;
- private final MarkupContainer< ? > container;
+ private final MarkupContainer container;
/**
* Constructor
@@ -36,7 +36,7 @@
* @param container
* The container that message reporters must be a child of
*/
- public ContainerFeedbackMessageFilter(MarkupContainer< ? > container)
+ public ContainerFeedbackMessageFilter(MarkupContainer container)
{
if (container == null)
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessage.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessage.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessage.java Sat Jun 28 22:50:41 2008
@@ -79,7 +79,7 @@
private final Serializable message;
/** The reporting component. */
- private final Component< ? > reporter;
+ private final Component reporter;
/** Whether or not this message has been rendered */
private boolean rendered = false;
@@ -94,7 +94,7 @@
* @param level
* The level of the message
*/
- public FeedbackMessage(final Component< ? > reporter, final Serializable message,
+ public FeedbackMessage(final Component reporter, final Serializable message,
final int level)
{
this.reporter = reporter;
@@ -158,7 +158,7 @@
*
* @return the reporting component.
*/
- public final Component< ? > getReporter()
+ public final Component getReporter()
{
return reporter;
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessages.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessages.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessages.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessages.java Sat Jun 28 22:50:41 2008
@@ -66,7 +66,7 @@
* @param message
* @param level
*/
- public final void add(Component< ? > reporter, String message, int level)
+ public final void add(Component reporter, String message, int level)
{
add(new FeedbackMessage(reporter, message, level));
}
@@ -111,7 +111,7 @@
* @param message
* the actual message
*/
- public final void debug(Component< ? > reporter, String message)
+ public final void debug(Component reporter, String message)
{
add(new FeedbackMessage(reporter, message, FeedbackMessage.DEBUG));
}
@@ -124,7 +124,7 @@
* @param message
* the actual message
*/
- public final void error(Component< ? > reporter, Serializable message)
+ public final void error(Component reporter, Serializable message)
{
add(new FeedbackMessage(reporter, message, FeedbackMessage.ERROR));
}
@@ -137,7 +137,7 @@
* @param message
* the actual message
*/
- public final void fatal(Component< ? > reporter, String message)
+ public final void fatal(Component reporter, String message)
{
add(new FeedbackMessage(reporter, message, FeedbackMessage.FATAL));
}
@@ -150,7 +150,7 @@
* the component to look up whether it registered a message
* @return whether the given component registered a message with this list with level ERROR
*/
- public final boolean hasErrorMessageFor(Component< ? > component)
+ public final boolean hasErrorMessageFor(Component component)
{
return hasMessageFor(component, FeedbackMessage.ERROR);
}
@@ -172,7 +172,7 @@
* the component to look up whether it registered a message
* @return whether the given component registered a message with this list
*/
- public final boolean hasMessageFor(Component< ? > component)
+ public final boolean hasMessageFor(Component component)
{
return messageForComponent(component) != null;
}
@@ -187,7 +187,7 @@
* The level of the message
* @return Whether the given component registered a message with this list with the given level
*/
- public final boolean hasMessageFor(Component< ? > component, int level)
+ public final boolean hasMessageFor(Component component, int level)
{
final FeedbackMessage message = messageForComponent(component);
return message != null && message.isLevel(level);
@@ -201,7 +201,7 @@
* @param message
* The actual message
*/
- public final void info(Component< ? > reporter, String message)
+ public final void info(Component reporter, String message)
{
add(new FeedbackMessage(reporter, message, FeedbackMessage.INFO));
}
@@ -234,7 +234,7 @@
* @return the message that is found for the given component (first match) or null if none was
* found
*/
- public final FeedbackMessage messageForComponent(final Component< ? > component)
+ public final FeedbackMessage messageForComponent(final Component component)
{
for (Iterator<FeedbackMessage> iterator = messages.iterator(); iterator.hasNext();)
{
@@ -333,7 +333,7 @@
* @param message
* the actual message
*/
- public final void warn(Component< ? > reporter, String message)
+ public final void warn(Component reporter, String message)
{
add(new FeedbackMessage(reporter, message, FeedbackMessage.WARNING));
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessagesModel.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessagesModel.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessagesModel.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessagesModel.java Sat Jun 28 22:50:41 2008
@@ -52,7 +52,7 @@
* The component where the page will be get from for which messages will be displayed
* usually the same page as the one feedbackpanel is attached to
*/
- public FeedbackMessagesModel(Component< ? > component)
+ public FeedbackMessagesModel(Component component)
{
if (component == null)
{
@@ -70,7 +70,7 @@
* feedbackpanel is attached to
*
*/
- public FeedbackMessagesModel(Page< ? > page, IFeedbackMessageFilter filter)
+ public FeedbackMessagesModel(Page page, IFeedbackMessageFilter filter)
{
this(page);
setFilter(filter);
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java Sat Jun 28 22:50:41 2008
@@ -89,7 +89,7 @@
* about the tags origin is lost. In some cases like wicket:head and wicket:link this
* information however is required.
*/
- private WeakReference<Class<? extends Component<?>>> markupClassRef = null;
+ private WeakReference<Class<? extends Component>> markupClassRef = null;
/**
* Tags which are detected to have only an open tag, which is allowed with some HTML tags like
@@ -759,7 +759,7 @@
*
* @return wicketHeaderClass
*/
- public Class<? extends Component<?>> getMarkupClass()
+ public Class<? extends Component> getMarkupClass()
{
return (markupClassRef == null ? null : markupClassRef.get());
}
@@ -772,7 +772,7 @@
* @param wicketHeaderClass
* wicketHeaderClass
*/
- public <C extends Component<?>> void setMarkupClass(Class<C> wicketHeaderClass)
+ public <C extends Component> void setMarkupClass(Class<C> wicketHeaderClass)
{
if (wicketHeaderClass == null)
{
@@ -780,7 +780,7 @@
}
else
{
- markupClassRef = new WeakReference<Class<? extends Component<?>>>(wicketHeaderClass);
+ markupClassRef = new WeakReference<Class<? extends Component>>(wicketHeaderClass);
}
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ContainerInfo.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ContainerInfo.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ContainerInfo.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ContainerInfo.java Sat Jun 28 22:50:41 2008
@@ -43,7 +43,7 @@
* @param container
* The container to create the information from
*/
- public ContainerInfo(final MarkupContainer< ? > container)
+ public ContainerInfo(final MarkupContainer container)
{
this(container.getClass(), container.getLocale(), container.getStyle(), null,
container.getMarkupType());
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java Sat Jun 28 22:50:41 2008
@@ -48,7 +48,7 @@
* @return Key that uniquely identifies any markup that might be associated with this markup
* container.
*/
- public String getCacheKey(final MarkupContainer< ? > container, final Class< ? > clazz)
+ public String getCacheKey(final MarkupContainer container, final Class< ? > clazz)
{
final String classname = clazz.getName();
final Locale locale = container.getLocale();
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/DefaultMarkupResourceStreamProvider.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/DefaultMarkupResourceStreamProvider.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/DefaultMarkupResourceStreamProvider.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/DefaultMarkupResourceStreamProvider.java Sat Jun 28 22:50:41 2008
@@ -61,7 +61,7 @@
* The container the markup should be associated with
* @return A IResourceStream if the resource was found
*/
- public IResourceStream getMarkupResourceStream(final MarkupContainer<?> container,
+ public IResourceStream getMarkupResourceStream(final MarkupContainer container,
Class<?> containerClass)
{
// Get locator to search for the resource
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupCache.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupCache.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupCache.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupCache.java Sat Jun 28 22:50:41 2008
@@ -47,7 +47,7 @@
* reloaded. Whatever is in the cache, it will be ignored
* @return Markup resource
*/
- Markup getMarkup(final MarkupContainer<?> container, final Class<?> clazz,
+ Markup getMarkup(final MarkupContainer container, final Class<?> clazz,
final boolean enforceReload);
/**
@@ -62,7 +62,7 @@
* If true, throw an exception, if markup could not be found
* @return A stream of MarkupElement elements
*/
- MarkupStream getMarkupStream(final MarkupContainer<?> container, final boolean enforceReload,
+ MarkupStream getMarkupStream(final MarkupContainer container, final boolean enforceReload,
final boolean throwException);
/**
@@ -72,7 +72,7 @@
* The container the markup should be associated with
* @return True if this markup container has associated markup
*/
- boolean hasAssociatedMarkup(final MarkupContainer<?> container);
+ boolean hasAssociatedMarkup(final MarkupContainer container);
/**
* Remove the markup associated with the cache key from the cache including all dependent
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupCacheKeyProvider.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupCacheKeyProvider.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupCacheKeyProvider.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupCacheKeyProvider.java Sat Jun 28 22:50:41 2008
@@ -39,5 +39,5 @@
* The container the markup should be associated with
* @return A IResourceStream if the resource was found
*/
- String getCacheKey(final MarkupContainer<?> container, Class<?> containerClass);
+ String getCacheKey(final MarkupContainer container, Class<?> containerClass);
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupResourceStreamProvider.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupResourceStreamProvider.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupResourceStreamProvider.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupResourceStreamProvider.java Sat Jun 28 22:50:41 2008
@@ -47,6 +47,6 @@
* The container the markup should be associated with
* @return A IResourceStream if the resource was found
*/
- IResourceStream getMarkupResourceStream(final MarkupContainer<?> container,
+ IResourceStream getMarkupResourceStream(final MarkupContainer container,
Class<?> containerClass);
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java Sat Jun 28 22:50:41 2008
@@ -203,7 +203,7 @@
* @see org.apache.wicket.markup.IMarkupCache#getMarkupStream(org.apache.wicket.MarkupContainer,
* boolean, boolean)
*/
- public final MarkupStream getMarkupStream(final MarkupContainer<?> container,
+ public final MarkupStream getMarkupStream(final MarkupContainer container,
final boolean enforceReload, final boolean throwException)
{
if (container == null)
@@ -234,7 +234,7 @@
/**
* @see org.apache.wicket.markup.IMarkupCache#hasAssociatedMarkup(org.apache.wicket.MarkupContainer)
*/
- public final boolean hasAssociatedMarkup(final MarkupContainer<?> container)
+ public final boolean hasAssociatedMarkup(final MarkupContainer container)
{
return getMarkup(container, container.getClass(), false) != Markup.NO_MARKUP;
}
@@ -267,7 +267,7 @@
* @see org.apache.wicket.markup.IMarkupCache#getMarkup(org.apache.wicket.MarkupContainer,
* java.lang.Class, boolean)
*/
- public final Markup getMarkup(final MarkupContainer<?> container, final Class<?> clazz,
+ public final Markup getMarkup(final MarkupContainer container, final Class<?> clazz,
final boolean enforceReload)
{
Class<?> containerClass = clazz;
@@ -338,7 +338,7 @@
* @param container
* @return Markup.NO_MARKUP
*/
- protected Markup onMarkupNotFound(final String cacheKey, final MarkupContainer<?> container)
+ protected Markup onMarkupNotFound(final String cacheKey, final MarkupContainer container)
{
if (log.isDebugEnabled())
{
@@ -393,7 +393,7 @@
* @return null, if not found or to enforce reloading the markup
*/
protected Markup getMarkupFromCache(final CharSequence cacheKey,
- final MarkupContainer<?> container)
+ final MarkupContainer container)
{
if (cacheKey != null)
{
@@ -418,7 +418,7 @@
* reloaded. Whatever is in the cache, it will be ignored
* @return The markup
*/
- private final Markup loadMarkup(final MarkupContainer<?> container,
+ private final Markup loadMarkup(final MarkupContainer container,
final MarkupResourceStream markupResourceStream, final boolean enforceReload)
{
String cacheKey = markupResourceStream.getCacheKey();
@@ -478,7 +478,7 @@
* reloaded. Whatever is in the cache, it will be ignored
* @return The markup in the stream
*/
- private final Markup loadMarkupAndWatchForChanges(final MarkupContainer<?> container,
+ private final Markup loadMarkupAndWatchForChanges(final MarkupContainer container,
final MarkupResourceStream markupResourceStream, final boolean enforceReload)
{
final String cacheKey = markupResourceStream.getCacheKey();
@@ -536,7 +536,7 @@
* The MarkupContainer requesting the markup resource stream
* @return IMarkupResourceStreamProvider
*/
- public IMarkupCacheKeyProvider getMarkupCacheKeyProvider(final MarkupContainer<?> container)
+ public IMarkupCacheKeyProvider getMarkupCacheKeyProvider(final MarkupContainer container)
{
if (container instanceof IMarkupCacheKeyProvider)
{
@@ -558,7 +558,7 @@
* @return IMarkupResourceStreamProvider
*/
protected IMarkupResourceStreamProvider getMarkupResourceStreamProvider(
- final MarkupContainer<?> container)
+ final MarkupContainer container)
{
if (container instanceof IMarkupResourceStreamProvider)
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupResourceStream.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupResourceStream.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupResourceStream.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupResourceStream.java Sat Jun 28 22:50:41 2008
@@ -169,7 +169,7 @@
*
* @return The directly associated class
*/
- public Class< ? extends Component< ? >> getMarkupClass()
+ public Class< ? extends Component> getMarkupClass()
{
return Classes.resolveClass(markupClassName);
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupStream.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupStream.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupStream.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupStream.java Sat Jun 28 22:50:41 2008
@@ -224,7 +224,7 @@
*
* @return The component's class
*/
- public final Class< ? extends Component< ? >> getContainerClass()
+ public final Class< ? extends Component> getContainerClass()
{
return markup.getMarkupResourceData().getResource().getMarkupClass();
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/ContainerWithAssociatedMarkupHelper.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/ContainerWithAssociatedMarkupHelper.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/ContainerWithAssociatedMarkupHelper.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/ContainerWithAssociatedMarkupHelper.java Sat Jun 28 22:50:41 2008
@@ -43,14 +43,14 @@
private boolean noMoreWicketHeadTagsAllowed = false;
/** The markup container the helper is associated with */
- private final WebMarkupContainer<?> container;
+ private final WebMarkupContainer container;
/**
* @param container
*/
public ContainerWithAssociatedMarkupHelper(final IHeaderPartContainerProvider container)
{
- this.container = (WebMarkupContainer<?>)container;
+ this.container = (WebMarkupContainer)container;
}
/**
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/HeaderPartContainer.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/HeaderPartContainer.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/HeaderPartContainer.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/HeaderPartContainer.java Sat Jun 28 22:50:41 2008
@@ -28,14 +28,12 @@
*
* @author Juergen Donnerstag
*/
-public final class HeaderPartContainer extends WebMarkupContainer<Void>
- implements
- IComponentResolver
+public final class HeaderPartContainer extends WebMarkupContainer implements IComponentResolver
{
private static final long serialVersionUID = 1L;
/** The panel or bordered page the header part is associated with */
- private final MarkupContainer<?> container;
+ private final MarkupContainer container;
/** <wicket:head scope="...">. A kind of namespace */
private final String scope;
@@ -48,8 +46,7 @@
* @param scope
* The scope of the wicket:head tag
*/
- public HeaderPartContainer(final String id, final MarkupContainer<?> container,
- final String scope)
+ public HeaderPartContainer(final String id, final MarkupContainer container, final String scope)
{
super(id);
this.container = container;
@@ -69,12 +66,12 @@
/**
* @see IComponentResolver#resolve(MarkupContainer, MarkupStream, ComponentTag)
*/
- public final boolean resolve(final MarkupContainer<?> container,
- final MarkupStream markupStream, final ComponentTag tag)
+ public final boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
+ final ComponentTag tag)
{
// The tag must be resolved against the panel and not against the
// page
- Component<?> component = this.container.get(tag.getId());
+ Component component = this.container.get(tag.getId());
if (component != null)
{
component.render(markupStream);
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebComponent.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebComponent.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebComponent.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebComponent.java Sat Jun 28 22:50:41 2008
@@ -31,10 +31,8 @@
* @author Juergen Donnerstag
* @author Eelco Hillenius
*
- * @param <T>
- * The model object type
*/
-public class WebComponent<T> extends Component<T>
+public class WebComponent extends Component
{
private static final long serialVersionUID = 1L;
@@ -49,7 +47,7 @@
/**
* @see Component#Component(String, IModel)
*/
- public WebComponent(final String id, final IModel<T> model)
+ public WebComponent(final String id, final IModel<?> model)
{
super(id, model);
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebMarkupContainer.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebMarkupContainer.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebMarkupContainer.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebMarkupContainer.java Sat Jun 28 22:50:41 2008
@@ -27,10 +27,8 @@
* @author Jonathan Locke
* @author Juergen Donnerstag
*
- * @param <T>
- * The model object type
*/
-public class WebMarkupContainer<T> extends MarkupContainer<T>
+public class WebMarkupContainer extends MarkupContainer
{
private static final long serialVersionUID = 1L;
@@ -45,7 +43,7 @@
/**
* @see org.apache.wicket.Component#Component(String, IModel)
*/
- public WebMarkupContainer(final String id, IModel<T> model)
+ public WebMarkupContainer(final String id, IModel<?> model)
{
super(id, model);
}
@@ -66,8 +64,8 @@
*
* @return WebPage
*/
- public final WebPage< ? > getWebPage()
+ public final WebPage getWebPage()
{
- return (WebPage< ? >)getPage();
+ return (WebPage)getPage();
}
}
\ No newline at end of file
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebMarkupContainerWithAssociatedMarkup.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebMarkupContainerWithAssociatedMarkup.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebMarkupContainerWithAssociatedMarkup.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebMarkupContainerWithAssociatedMarkup.java Sat Jun 28 22:50:41 2008
@@ -25,10 +25,8 @@
*
* @author Juergen Donnerstag
*
- * @param <T>
- * The model object type
*/
-public class WebMarkupContainerWithAssociatedMarkup<T> extends WebMarkupContainer<T>
+public class WebMarkupContainerWithAssociatedMarkup extends WebMarkupContainer
implements
IHeaderPartContainerProvider
{
@@ -48,7 +46,7 @@
/**
* @see org.apache.wicket.Component#Component(String, IModel)
*/
- public WebMarkupContainerWithAssociatedMarkup(final String id, IModel<T> model)
+ public WebMarkupContainerWithAssociatedMarkup(final String id, IModel<?> model)
{
super(id, model);
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java Sat Jun 28 22:50:41 2008
@@ -61,34 +61,28 @@
* @author Eelco Hillenius
* @author Juergen Donnerstag
* @author Gwyn Evans
- *
- * @param <T>
- * The model object type
*/
-public class WebPage<T> extends Page<T> implements INewBrowserWindowListener
+public class WebPage extends Page implements INewBrowserWindowListener
{
/**
* Tries to determine whether this page was opened in a new window or tab. If it is (and this
* checker were able to recognize that), a new page map is created for this page instance, so
* that it will start using it's own history in sync with the browser window or tab.
- *
- * @param <T>
- * The model object type
*/
- private static final class PageMapChecker<T> extends AbstractBehavior
+ private static final class PageMapChecker extends AbstractBehavior
implements
IHeaderContributor
{
private static final long serialVersionUID = 1L;
- private final WebPage<T> webPage;
+ private final WebPage webPage;
/**
* Construct.
*
* @param webPage
*/
- PageMapChecker(WebPage<T> webPage)
+ PageMapChecker(WebPage webPage)
{
this.webPage = webPage;
}
@@ -195,7 +189,7 @@
/**
* @see Page#Page(IModel)
*/
- protected WebPage(final IModel<T> model)
+ protected WebPage(final IModel<?> model)
{
super(model);
commonInit();
@@ -213,7 +207,7 @@
/**
* @see Page#Page(org.apache.wicket.IPageMap, org.apache.wicket.model.IModel)
*/
- protected WebPage(final IPageMap pageMap, final IModel<T> model)
+ protected WebPage(final IPageMap pageMap, final IModel<?> model)
{
super(pageMap, model);
commonInit();
@@ -310,10 +304,10 @@
public void onNewBrowserWindow()
{
// if the browser reports a history of 0 then make a new webpage
- WebPage<?> clonedPage = this;
+ WebPage clonedPage = this;
try
{
- clonedPage = (WebPage<?>)Objects.cloneObject(this);
+ clonedPage = (WebPage)Objects.cloneObject(this);
}
catch (Exception e)
{
@@ -332,7 +326,7 @@
// if automatic multi window support is on, add a page checker instance
if (getApplication().getPageSettings().getAutomaticMultiWindowSupport())
{
- add(new PageMapChecker<T>(this));
+ add(new PageMapChecker(this));
}
}
@@ -399,9 +393,9 @@
super.onAfterRender();
if (Application.DEVELOPMENT.equals(getApplication().getConfigurationType()))
{
- HtmlHeaderContainer header = (HtmlHeaderContainer)visitChildren(new IVisitor<Component<?>>()
+ HtmlHeaderContainer header = (HtmlHeaderContainer)visitChildren(new IVisitor<Component>()
{
- public Object component(Component<?> component)
+ public Object component(Component component)
{
if (component instanceof HtmlHeaderContainer)
{
@@ -431,12 +425,12 @@
// Make sure all Components interested in contributing to the header
// and there attached behaviors are asked.
final HtmlHeaderContainer finalHeader = header;
- visitChildren(new IVisitor<Component<?>>()
+ visitChildren(new IVisitor<Component>()
{
/**
* @see org.apache.wicket.Component.IVisitor#component(org.apache.wicket.Component)
*/
- public Object component(Component<?> component)
+ public Object component(Component component)
{
component.renderHead(finalHeader);
return CONTINUE_TRAVERSAL;
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/basic/Label.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/basic/Label.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/basic/Label.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/basic/Label.java Sat Jun 28 22:50:41 2008
@@ -63,10 +63,8 @@
* </pre>
*
* @author Jonathan Locke
- * @param <T>
- * The model object type
*/
-public class Label<T> extends WebComponent<T>
+public class Label extends WebComponent
{
private static final long serialVersionUID = 1L;
@@ -98,9 +96,11 @@
}
/**
+ * @param id
+ * @param model
* @see org.apache.wicket.Component#Component(String, IModel)
*/
- public Label(final String id, IModel<T> model)
+ public Label(final String id, IModel<?> model)
{
super(id, model);
}
@@ -112,7 +112,7 @@
@Override
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
{
- replaceComponentTagBody(markupStream, openTag, getModelObjectAsString());
+ replaceComponentTagBody(markupStream, openTag, getDefaultModelObjectAsString());
}
/**
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/basic/MultiLineLabel.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/basic/MultiLineLabel.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/basic/MultiLineLabel.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/basic/MultiLineLabel.java Sat Jun 28 22:50:41 2008
@@ -31,11 +31,8 @@
* for sequences of more than one newline.
*
* @author Jonathan Locke
- *
- * @param <T>
- * Model object type
*/
-public class MultiLineLabel<T> extends WebComponent<T>
+public class MultiLineLabel extends WebComponent
{
private static final long serialVersionUID = 1L;
@@ -70,7 +67,7 @@
/**
* @see org.apache.wicket.Component#Component(String, IModel)
*/
- public MultiLineLabel(final String id, IModel<T> model)
+ public MultiLineLabel(final String id, IModel<?> model)
{
super(id, model);
}
@@ -81,7 +78,7 @@
@Override
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
{
- final CharSequence body = Strings.toMultilineMarkup(getModelObjectAsString());
+ final CharSequence body = Strings.toMultilineMarkup(getDefaultModelObjectAsString());
replaceComponentTagBody(markupStream, openTag, body);
}
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/body/BodyTagAttributeModifier.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/body/BodyTagAttributeModifier.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/body/BodyTagAttributeModifier.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/body/BodyTagAttributeModifier.java Sat Jun 28 22:50:41 2008
@@ -48,7 +48,7 @@
/**
* Make sure we don't keep a reference to the component longer than really needed.
*/
- private transient WeakReference<Component< ? >> componentReference;
+ private transient WeakReference<Component> componentReference;
/**
* Create a new attribute modifier with the given attribute name and model to replace with. The
@@ -64,7 +64,7 @@
* The component which created (owns) the modifier
*/
public BodyTagAttributeModifier(final String attribute, final boolean addAttributeIfNotPresent,
- final IModel< ? > replaceModel, final Component< ? > behaviorOwner)
+ final IModel< ? > replaceModel, final Component behaviorOwner)
{
super(attribute, addAttributeIfNotPresent, replaceModel);
init(behaviorOwner);
@@ -82,7 +82,7 @@
* The component which created (owns) the modifier
*/
public BodyTagAttributeModifier(final String attribute, final IModel< ? > replaceModel,
- final Component< ? > behaviorOwner)
+ final Component behaviorOwner)
{
super(attribute, replaceModel);
init(behaviorOwner);
@@ -108,7 +108,7 @@
*/
public BodyTagAttributeModifier(final String attribute, final String pattern,
final boolean addAttributeIfNotPresent, final IModel< ? > replaceModel,
- final Component< ? > behaviorOwner)
+ final Component behaviorOwner)
{
super(attribute, pattern, addAttributeIfNotPresent, replaceModel);
init(behaviorOwner);
@@ -129,7 +129,7 @@
* The component which created (owns) the modifier
*/
public BodyTagAttributeModifier(final String attribute, final String pattern,
- final IModel< ? > replaceModel, final Component< ? > behaviorOwner)
+ final IModel< ? > replaceModel, final Component behaviorOwner)
{
super(attribute, pattern, replaceModel);
init(behaviorOwner);
@@ -141,11 +141,11 @@
* @param behaviorOwner
* The component which creates (owns) the modifier
*/
- private void init(final Component< ? > behaviorOwner)
+ private void init(final Component behaviorOwner)
{
if (behaviorOwner != null)
{
- componentReference = new WeakReference<Component< ? >>(behaviorOwner);
+ componentReference = new WeakReference<Component>(behaviorOwner);
}
}
@@ -161,7 +161,7 @@
{
// Get the owner of the attribute modifier (e.g. the Panel, not the
// Body)
- final Component< ? > behaviorOwner = componentReference.get();
+ final Component behaviorOwner = componentReference.get();
// If case the components memory has been GCed already, than disable
// the attribute modifier and return the attribute value unchanged.
@@ -216,7 +216,7 @@
final Object object = inputStream.readObject();
if (object != null)
{
- componentReference = new WeakReference<Component< ? >>((Component< ? >)object);
+ componentReference = new WeakReference<Component>((Component)object);
}
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/Border.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/Border.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/Border.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/Border.java Sat Jun 28 22:50:41 2008
@@ -104,10 +104,8 @@
* @author Jonathan Locke
* @author Juergen Donnerstag
*
- * @param <T>
- * The model object type
*/
-public abstract class Border<T> extends WebMarkupContainerWithAssociatedMarkup<T>
+public abstract class Border extends WebMarkupContainerWithAssociatedMarkup
implements
IComponentResolver
{
@@ -158,7 +156,7 @@
/**
* @see org.apache.wicket.Component#Component(String, IModel)
*/
- public Border(final String id, final IModel<T> model)
+ public Border(final String id, final IModel<?> model)
{
super(id, model);
@@ -189,7 +187,7 @@
* @deprecated 1.3 please use #getBodyContainer().setVisible(false) instead
*/
@Deprecated
- public Border<T> setBorderBodyVisible(boolean bodyVisible)
+ public Border setBorderBodyVisible(boolean bodyVisible)
{
body.setVisible(false);
return this;
@@ -204,7 +202,7 @@
* true, to enable transparent resolving
* @return this for chaining
*/
- public final Border<T> setTransparentResolver(final boolean enable)
+ public final Border setTransparentResolver(final boolean enable)
{
transparentResolver = enable;
return this;
@@ -224,14 +222,14 @@
* @see org.apache.wicket.markup.resolver.IComponentResolver#resolve(org.apache.wicket.MarkupContainer,
* org.apache.wicket.markup.MarkupStream, org.apache.wicket.markup.ComponentTag)
*/
- public boolean resolve(final MarkupContainer< ? > container, final MarkupStream markupStream,
+ public boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
final ComponentTag tag)
{
// In case of nested Borders, the outer border is no longer able to find
// its body container easily. Thus we need to help resolve it.
// The container is the body component. Get the Border component.
- MarkupContainer< ? > border = container.getParent();
+ MarkupContainer border = container.getParent();
while ((border != null) && !(border instanceof Border))
{
border = border.getParent();
@@ -321,9 +319,7 @@
/**
* The container to be associated with the <wicket:body> tag
*/
- public class BorderBodyContainer extends WebMarkupContainer<Object>
- implements
- IComponentResolver
+ public class BorderBodyContainer extends WebMarkupContainer implements IComponentResolver
{
private static final long serialVersionUID = 1L;
@@ -388,15 +384,15 @@
* @see org.apache.wicket.markup.resolver.IComponentResolver#resolve(org.apache.wicket.MarkupContainer,
* org.apache.wicket.markup.MarkupStream, org.apache.wicket.markup.ComponentTag)
*/
- public boolean resolve(final MarkupContainer< ? > container,
- final MarkupStream markupStream, final ComponentTag tag)
+ public boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
+ final ComponentTag tag)
{
// Usually you add child components to Border instead of Body. Hence
// we need to help Body to properly resolve the children.
String id = tag.getId();
if (!id.equals(BODY_ID))
{
- Component< ? > component = Border.this.get(id);
+ Component component = get(id);
if (component != null)
{
component.render(markupStream);
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/BoxBorder.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/BoxBorder.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/BoxBorder.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/BoxBorder.java Sat Jun 28 22:50:41 2008
@@ -20,10 +20,8 @@
* A very simple border component that draws a thin black line around its children.
*
* @author Jonathan Locke
- * @param <T>
- * The model object type
*/
-public final class BoxBorder<T> extends Border<T>
+public final class BoxBorder extends Border
{
private static final long serialVersionUID = 1L;
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/MarkupComponentBorder.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/MarkupComponentBorder.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/MarkupComponentBorder.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/border/MarkupComponentBorder.java Sat Jun 28 22:50:41 2008
@@ -62,7 +62,7 @@
*
* @see org.apache.wicket.IComponentBorder#renderBefore(org.apache.wicket.Component)
*/
- public void renderBefore(Component< ? > component)
+ public void renderBefore(Component component)
{
final MarkupStream stream = getMarkupStream(component);
final Response response = component.getResponse();
@@ -122,7 +122,7 @@
*
* @see IComponentBorder#renderAfter(org.apache.wicket.Component)
*/
- public void renderAfter(Component< ? > component)
+ public void renderAfter(Component component)
{
final MarkupStream stream = getMarkupStream(component);
final Response response = component.getResponse();
@@ -154,7 +154,7 @@
* @param component
* @return markup stream
*/
- private MarkupStream getMarkupStream(Component< ? > component)
+ private MarkupStream getMarkupStream(Component component)
{
if (markupStream == null)
{
@@ -168,7 +168,7 @@
* @param owner
* @return markup stream
*/
- private MarkupStream findMarkupStream(Component< ? > owner)
+ private MarkupStream findMarkupStream(Component owner)
{
final String markupType = getMarkupType(owner);
@@ -236,12 +236,12 @@
* @param component
* @return markup type
*/
- private String getMarkupType(Component< ? > component)
+ private String getMarkupType(Component component)
{
String extension;
if (component instanceof MarkupContainer)
{
- extension = ((MarkupContainer< ? >)component).getMarkupType();
+ extension = ((MarkupContainer)component).getMarkupType();
}
else
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/debug/PageView.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/debug/PageView.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/debug/PageView.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/debug/PageView.java Sat Jun 28 22:50:41 2008
@@ -50,7 +50,7 @@
*
* @author Juergen Donnerstag
*/
-public final class PageView extends Panel<Object>
+public final class PageView extends Panel
{
/**
* El cheapo data holder.
@@ -92,7 +92,7 @@
* The page to be analyzed
* @see Component#Component(String)
*/
- public PageView(final String id, final Page< ? > page)
+ public PageView(final String id, final Page page)
{
super(id);
@@ -100,7 +100,7 @@
final List<ComponentData> data = new ArrayList<ComponentData>();
// Name of page
- add(new Label<String>("info", page == null ? "[Stateless Page]" : page.toString()));
+ add(new Label("info", page == null ? "[Stateless Page]" : page.toString()));
// Get the components data and fill and sort the list
data.clear();
@@ -129,11 +129,11 @@
{
final ComponentData componentData = listItem.getModelObject();
- listItem.add(new Label<String>("row", Integer.toString(listItem.getIndex() + 1)));
- listItem.add(new Label<String>("path", componentData.path));
- listItem.add(new Label<String>("size", Bytes.bytes(componentData.size).toString()));
- listItem.add(new Label<String>("type", componentData.type));
- listItem.add(new Label<String>("model", componentData.value));
+ listItem.add(new Label("row", Integer.toString(listItem.getIndex() + 1)));
+ listItem.add(new Label("path", componentData.path));
+ listItem.add(new Label("size", Bytes.bytes(componentData.size).toString()));
+ listItem.add(new Label("type", componentData.type));
+ listItem.add(new Label("model", componentData.value));
}
});
}
@@ -145,13 +145,13 @@
* @param page
* @return List of component data objects
*/
- private List<ComponentData> getComponentData(final Page< ? > page)
+ private List<ComponentData> getComponentData(final Page page)
{
final List<ComponentData> data = new ArrayList<ComponentData>();
- page.visitChildren(new IVisitor<Component< ? >>()
+ page.visitChildren(new IVisitor<Component>()
{
- public Object component(final Component< ? > component)
+ public Object component(final Component component)
{
if (!component.getPath().startsWith(PageView.this.getPath()))
{
@@ -172,7 +172,7 @@
try
{
- componentData.value = component.getModelObjectAsString();
+ componentData.value = component.getDefaultModelObjectAsString();
}
catch (Exception e)
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java Sat Jun 28 22:50:41 2008
@@ -496,4 +496,5 @@
}
+
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java Sat Jun 28 22:50:41 2008
@@ -59,7 +59,7 @@
/**
* @see AbstractChoice#AbstractChoice(String, List)
*/
- public AbstractSingleSelectChoice(final String id, final List< ? extends T> choices)
+ public AbstractSingleSelectChoice(final String id, final List<? extends T> choices)
{
super(id, choices);
}
@@ -70,7 +70,7 @@
* @param renderer
* @see AbstractChoice#AbstractChoice(String, List ,IChoiceRenderer)
*/
- public AbstractSingleSelectChoice(final String id, final List< ? extends T> data,
+ public AbstractSingleSelectChoice(final String id, final List<? extends T> data,
final IChoiceRenderer<T> renderer)
{
super(id, data, renderer);
@@ -79,8 +79,7 @@
/**
* @see AbstractChoice#AbstractChoice(String, IModel, List)
*/
- public AbstractSingleSelectChoice(final String id, IModel<T> model,
- final List< ? extends T> data)
+ public AbstractSingleSelectChoice(final String id, IModel<T> model, final List<? extends T> data)
{
super(id, model, data);
}
@@ -93,7 +92,7 @@
* @see AbstractChoice#AbstractChoice(String, IModel, List, IChoiceRenderer)
*/
public AbstractSingleSelectChoice(final String id, IModel<T> model,
- final List< ? extends T> data, final IChoiceRenderer<T> renderer)
+ final List<? extends T> data, final IChoiceRenderer<T> renderer)
{
super(id, model, data, renderer);
}
@@ -101,7 +100,7 @@
/**
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel)
*/
- public AbstractSingleSelectChoice(String id, IModel<List< ? extends T>> choices)
+ public AbstractSingleSelectChoice(String id, IModel<List<? extends T>> choices)
{
super(id, choices);
}
@@ -109,7 +108,7 @@
/**
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel,IModel)
*/
- public AbstractSingleSelectChoice(String id, IModel<T> model, IModel<List< ? extends T>> choices)
+ public AbstractSingleSelectChoice(String id, IModel<T> model, IModel<List<? extends T>> choices)
{
super(id, model, choices);
}
@@ -118,7 +117,7 @@
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
* IModel,IChoiceRenderer)
*/
- public AbstractSingleSelectChoice(String id, IModel<List< ? extends T>> choices,
+ public AbstractSingleSelectChoice(String id, IModel<List<? extends T>> choices,
IChoiceRenderer<T> renderer)
{
super(id, choices, renderer);
@@ -130,7 +129,7 @@
* IModel,IChoiceRenderer)
*/
public AbstractSingleSelectChoice(String id, IModel<T> model,
- IModel<List< ? extends T>> choices, IChoiceRenderer<T> renderer)
+ IModel<List<? extends T>> choices, IChoiceRenderer<T> renderer)
{
super(id, model, choices, renderer);
}
@@ -151,9 +150,9 @@
}
/**
- * Is the <code>null</code> value a valid value? If it is, it means that the null value will
- * be displayed, typically to the user as 'choose one' or something similar. Note that this
- * doesn't say anything about whether a null value (not selecting a value) is permitted; use
+ * Is the <code>null</code> value a valid value? If it is, it means that the null value will be
+ * displayed, typically to the user as 'choose one' or something similar. Note that this doesn't
+ * say anything about whether a null value (not selecting a value) is permitted; use
* {@link #setRequired(boolean)} for that.
*
* @return <code>true</code> when the <code>null</code> value is allowed.
@@ -164,9 +163,9 @@
}
/**
- * Is the <code>null</code> value a valid value? If it is, it means that the null value will
- * be displayed, typically to the user as 'choose one' or something similar. Note that this
- * doesn't say anything about whether a null value (not selecting a value) is permitted; use
+ * Is the <code>null</code> value a valid value? If it is, it means that the null value will be
+ * displayed, typically to the user as 'choose one' or something similar. Note that this doesn't
+ * say anything about whether a null value (not selecting a value) is permitted; use
* {@link #setRequired(boolean)} for that.
*
* @param nullValid
@@ -198,7 +197,7 @@
*/
protected T convertChoiceIdToChoice(String id)
{
- final List< ? extends T> choices = getChoices();
+ final List<? extends T> choices = getChoices();
final IChoiceRenderer<T> renderer = getChoiceRenderer();
for (int index = 0; index < choices.size(); index++)
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSubmitLink.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSubmitLink.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSubmitLink.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSubmitLink.java Sat Jun 28 22:50:41 2008
@@ -31,9 +31,7 @@
* @param <T>
* The model object type
*/
-public abstract class AbstractSubmitLink<T> extends AbstractLink<T>
- implements
- IFormSubmittingComponent
+public abstract class AbstractSubmitLink extends AbstractLink implements IFormSubmittingComponent
{
/**
*
@@ -43,7 +41,7 @@
/**
* Target form or null if the form is parent of the link.
*/
- private Form< ? > form;
+ private Form<?> form;
/**
* If false, all standard processing like validating and model updating is skipped.
@@ -56,7 +54,7 @@
* @param id
* @param model
*/
- public AbstractSubmitLink(String id, IModel<T> model)
+ public AbstractSubmitLink(String id, IModel<?> model)
{
super(id, model);
}
@@ -79,7 +77,7 @@
* @param model
* @param form
*/
- public AbstractSubmitLink(String id, IModel<T> model, Form< ? > form)
+ public AbstractSubmitLink(String id, IModel<?> model, Form<?> form)
{
super(id, model);
this.form = form;
@@ -91,7 +89,7 @@
* @param id
* @param form
*/
- public AbstractSubmitLink(String id, Form< ? > form)
+ public AbstractSubmitLink(String id, Form<?> form)
{
super(id);
this.form = form;
@@ -109,7 +107,7 @@
* defaultFormProcessing
* @return This
*/
- public final AbstractSubmitLink<T> setDefaultFormProcessing(boolean defaultFormProcessing)
+ public final AbstractSubmitLink setDefaultFormProcessing(boolean defaultFormProcessing)
{
if (this.defaultFormProcessing != defaultFormProcessing)
{
@@ -149,7 +147,7 @@
/**
* @see org.apache.wicket.markup.html.form.IFormSubmittingComponent#getForm()
*/
- public Form< ? > getForm()
+ public Form<?> getForm()
{
if (form != null)
{
@@ -157,7 +155,7 @@
}
else
{
- return (Form< ? >)findParent(Form.class);
+ return findParent(Form.class);
}
}
@@ -169,13 +167,12 @@
// TODO: This is a copy & paste from the FormComponent class.
String id = getId();
final PrependingStringBuffer inputName = new PrependingStringBuffer(id.length());
- Component< ? > c = this;
+ Component c = this;
while (true)
{
inputName.prepend(id);
c = c.getParent();
- if (c == null || (c instanceof Form && ((Form< ? >)c).isRootForm()) ||
- c instanceof Page)
+ if (c == null || (c instanceof Form && ((Form<?>)c).isRootForm()) || c instanceof Page)
{
break;
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java Sat Jun 28 22:50:41 2008
@@ -86,8 +86,8 @@
/**
* Should the bound object become <code>null</code> when the input is empty?
*
- * @return <code>true</code> when the value will be set to <code>null</code> when the input
- * is empty.
+ * @return <code>true</code> when the value will be set to <code>null</code> when the input is
+ * empty.
*/
public final boolean getConvertEmptyInputStringToNull()
{
@@ -140,7 +140,7 @@
{
// Set the type, but only if it's not a String (see WICKET-606).
// Otherwise, getConvertEmptyInputStringToNull() won't work.
- Class<?> type = getModelType(getModel());
+ Class<?> type = getModelType(getDefaultModel());
if (!String.class.equals(type))
{
setType(type);
@@ -179,7 +179,7 @@
* the value to set this flag.
* @return this
*/
- public final FormComponent<?> setConvertEmptyInputStringToNull(boolean flag)
+ public final FormComponent setConvertEmptyInputStringToNull(boolean flag)
{
setFlag(FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, flag);
return this;
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Button.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Button.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Button.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Button.java Sat Jun 28 22:50:41 2008
@@ -52,7 +52,7 @@
* @param <T>
* The model object type
*/
-public class Button<T> extends FormComponent<T> implements IFormSubmittingComponent
+public class Button extends FormComponent<String> implements IFormSubmittingComponent
{
private static final long serialVersionUID = 1L;
@@ -87,7 +87,7 @@
* keep it's markup attribute value, don't provide a model, or let it return an empty
* string.
*/
- public Button(final String id, final IModel<T> model)
+ public Button(final String id, final IModel<String> model)
{
super(id, model);
setVersioned(true);
@@ -95,13 +95,13 @@
}
/**
- * Override of the default initModel behaviour. This component <strong>will not</strong> use
- * any compound model a parent, but only a model that is explicitly set.
+ * Override of the default initModel behaviour. This component <strong>will not</strong> use any
+ * compound model a parent, but only a model that is explicitly set.
*
* @see org.apache.wicket.Component#initModel()
*/
@Override
- protected IModel<T> initModel()
+ protected IModel<String> initModel()
{
return null;
}
@@ -111,7 +111,7 @@
* @see org.apache.wicket.markup.html.form.FormComponent#getForm()
*/
@Override
- public Form< ? > getForm()
+ public Form<?> getForm()
{
try
{
@@ -147,7 +147,7 @@
* defaultFormProcessing
* @return This
*/
- public final Button< ? > setDefaultFormProcessing(boolean defaultFormProcessing)
+ public final Button setDefaultFormProcessing(boolean defaultFormProcessing)
{
if (this.defaultFormProcessing != defaultFormProcessing)
{
@@ -199,9 +199,9 @@
}
/**
- * Processes the component tag. A <tt>value</tt> attribute is added with the value of the
- * model object, if available. An <tt>onclick</tt> attribute is added if the subclass
- * specified javascript.
+ * Processes the component tag. A <tt>value</tt> attribute is added with the value of the model
+ * object, if available. An <tt>onclick</tt> attribute is added if the subclass specified
+ * javascript.
*
* <p>
* <b>NOTE</b>. For a <tt><button></tt> the <tt>value</tt> attribute is not rendered,
@@ -220,7 +220,7 @@
try
{
- String value = getModelObjectAsString();
+ String value = getDefaultModelObjectAsString();
if (value != null && !"".equals(value))
{
tag.put("value", value);
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=672603&r1=672602&r2=672603&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 Sat Jun 28 22:50:41 2008
@@ -40,7 +40,7 @@
* @param <T>
* The model object type
*/
-public class Check<T> extends LabeledWebMarkupContainer<T>
+public class Check<T> extends LabeledWebMarkupContainer
{
private static final long serialVersionUID = 1L;
@@ -116,7 +116,7 @@
// check if the model collection of the group contains the model object.
// if it does check the check box.
- Collection<?> collection = group.getModelObject();
+ Collection<?> collection = (Collection<?>)group.getDefaultModelObject();
// check for npe in group's model object
if (collection == null)
@@ -140,7 +140,7 @@
}
}
}
- else if (collection.contains(getModelObject()))
+ else if (collection.contains(getDefaultModelObject()))
{
tag.put("checked", "checked");
}
@@ -195,4 +195,49 @@
setLabelInternal(labelModel);
return this;
}
+
+
+ /**
+ * Gets model
+ *
+ * @return model
+ */
+ @SuppressWarnings("unchecked")
+ public final IModel<T> getModel()
+ {
+ return (IModel<T>)getDefaultModel();
+ }
+
+ /**
+ * Sets model
+ *
+ * @param model
+ */
+ public final void setModel(IModel<T> model)
+ {
+ setDefaultModel(model);
+ }
+
+ /**
+ * Gets model object
+ *
+ * @return model object
+ */
+ @SuppressWarnings("unchecked")
+ public final T getModelObject()
+ {
+ return (T)getDefaultModelObject();
+ }
+
+ /**
+ * Sets model object
+ *
+ * @param object
+ */
+ public final void setModelObject(T object)
+ {
+ setDefaultModelObject(object);
+ }
+
+
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java Sat Jun 28 22:50:41 2008
@@ -77,7 +77,7 @@
{
convertInput();
updateModel();
- onSelectionChanged(getModelObject());
+ onSelectionChanged(getDefaultModelObject());
}
/**
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBoxMultipleChoice.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBoxMultipleChoice.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBoxMultipleChoice.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBoxMultipleChoice.java Sat Jun 28 22:50:41 2008
@@ -314,7 +314,7 @@
public final CheckBoxMultipleChoice<T> setPrefix(final String prefix)
{
// Tell the page that this component's prefix was changed
- final Page<?> page = findPage();
+ final Page page = findPage();
if (page != null)
{
addStateChange(new PrefixChange(this.prefix));
@@ -340,7 +340,7 @@
public final CheckBoxMultipleChoice<T> setSuffix(final String suffix)
{
// Tell the page that this component's suffix was changed
- final Page<?> page = findPage();
+ final Page page = findPage();
if (page != null)
{
addStateChange(new SuffixChange(this.suffix));
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java Sat Jun 28 22:50:41 2008
@@ -48,8 +48,7 @@
* </code>
*
* @see org.apache.wicket.markup.html.form.Check
- * @see org.apache.wicket.markup.html.form.CheckGroupSelector
- * <p>
+ * @see org.apache.wicket.markup.html.form.CheckGroupSelector <p>
* Note: This component does not support cookie persistence
*
* @author Igor Vaynberg
@@ -161,7 +160,7 @@
if (collection == null)
{
collection = getConvertedInput();
- setModelObject(collection);
+ setDefaultModelObject(collection);
}
else
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroupSelector.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroupSelector.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroupSelector.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroupSelector.java Sat Jun 28 22:50:41 2008
@@ -30,7 +30,7 @@
* @author Igor Vaynberg
*
*/
-public class CheckGroupSelector extends LabeledWebMarkupContainer<Void>
+public class CheckGroupSelector extends LabeledWebMarkupContainer
{
/** */
private static final long serialVersionUID = 1L;
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java Sat Jun 28 22:50:41 2008
@@ -79,7 +79,7 @@
/**
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, List)
*/
- public DropDownChoice(final String id, final List< ? extends T> choices)
+ public DropDownChoice(final String id, final List<? extends T> choices)
{
super(id, choices);
}
@@ -88,7 +88,7 @@
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
* List,IChoiceRenderer)
*/
- public DropDownChoice(final String id, final List< ? extends T> data,
+ public DropDownChoice(final String id, final List<? extends T> data,
final IChoiceRenderer<T> renderer)
{
super(id, data, renderer);
@@ -97,7 +97,7 @@
/**
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel, List)
*/
- public DropDownChoice(final String id, IModel<T> model, final List< ? extends T> choices)
+ public DropDownChoice(final String id, IModel<T> model, final List<? extends T> choices)
{
super(id, model, choices);
}
@@ -106,7 +106,7 @@
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel, List,
* IChoiceRenderer)
*/
- public DropDownChoice(final String id, IModel<T> model, final List< ? extends T> data,
+ public DropDownChoice(final String id, IModel<T> model, final List<? extends T> data,
final IChoiceRenderer<T> renderer)
{
super(id, model, data, renderer);
@@ -115,7 +115,7 @@
/**
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel)
*/
- public DropDownChoice(String id, IModel<List< ? extends T>> choices)
+ public DropDownChoice(String id, IModel<List<? extends T>> choices)
{
super(id, choices);
}
@@ -123,7 +123,7 @@
/**
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel,IModel)
*/
- public DropDownChoice(String id, IModel<T> model, IModel<List< ? extends T>> choices)
+ public DropDownChoice(String id, IModel<T> model, IModel<List<? extends T>> choices)
{
super(id, model, choices);
}
@@ -132,7 +132,7 @@
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
* IModel,IChoiceRenderer)
*/
- public DropDownChoice(String id, IModel<List< ? extends T>> choices, IChoiceRenderer<T> renderer)
+ public DropDownChoice(String id, IModel<List<? extends T>> choices, IChoiceRenderer<T> renderer)
{
super(id, choices, renderer);
}
@@ -142,7 +142,7 @@
* @see org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, IModel,
* IModel,IChoiceRenderer)
*/
- public DropDownChoice(String id, IModel<T> model, IModel<List< ? extends T>> choices,
+ public DropDownChoice(String id, IModel<T> model, IModel<List<? extends T>> choices,
IChoiceRenderer<T> renderer)
{
super(id, model, choices, renderer);
@@ -177,7 +177,7 @@
// url that points to this components IOnChangeListener method
CharSequence url = urlFor(IOnChangeListener.INTERFACE);
- Form< ? > form = (Form< ? >)findParent(Form.class);
+ Form<?> form = findParent(Form.class);
if (form != null)
{
RequestContext rc = RequestContext.get();
@@ -224,8 +224,7 @@
* with each selection change, resulting in the model being updated (of just this component) and
* onSelectionChanged being called. This method returns false by default. If you wish to use
* Ajax instead, let {@link #wantOnSelectionChangedNotifications()} return false and add an
- * {@link AjaxFormComponentUpdatingBehavior} to the component using the <tt>onchange</tt>
- * event.
+ * {@link AjaxFormComponentUpdatingBehavior} to the component using the <tt>onchange</tt> event.
*
* @return True if this component's onSelectionChanged event handler should called using
* javascript if the selection changes
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java Sat Jun 28 22:50:41 2008
@@ -70,7 +70,7 @@
* type="submit" value="go"> suffices.
* <p>
* By default, the processing of a form works like this:
- * <li> The submitting component is looked up. An submitting IFormSubmittingComponent (such as a
+ * <li>The submitting component is looked up. An submitting IFormSubmittingComponent (such as a
* button) is nested in this form (is a child component) and was clicked by the user. If an
* IFormSubmittingComponent was found, and it has the defaultFormProcessing field set to false
* (default is true), it's onSubmit method will be called right away, thus no validition is done,
@@ -78,17 +78,17 @@
* respect, nesting an IFormSubmittingComponent with the defaultFormProcessing field set to false
* has the same effect as nesting a normal link. If you want you can call validate() to execute form
* validation, hasError() to find out whether validate() resulted in validation errors, and
- * updateFormComponentModels() to update the models of nested form components. </li>
- * <li> When no submitting IFormSubmittingComponent with defaultFormProcessing set to false was
+ * updateFormComponentModels() to update the models of nested form components.</li>
+ * <li>When no submitting IFormSubmittingComponent with defaultFormProcessing set to false was
* found, this form is processed (method process()). Now, two possible paths exist:
* <ul>
- * <li> Form validation failed. All nested form components will be marked invalid, and onError() is
- * called to allow clients to provide custom error handling code. </li>
- * <li> Form validation succeeded. The nested components will be asked to update their models and
+ * <li>Form validation failed. All nested form components will be marked invalid, and onError() is
+ * called to allow clients to provide custom error handling code.</li>
+ * <li>Form validation succeeded. The nested components will be asked to update their models and
* persist their data is applicable. After that, method delegateSubmit with optionally the
* submitting IFormSubmittingComponent is called. The default when there is a submitting
* IFormSubmittingComponent is to first call onSubmit on that Component, and after that call
- * onSubmit on this form. Clients may override delegateSubmit if they want different behavior. </li>
+ * onSubmit on this form. Clients may override delegateSubmit if they want different behavior.</li>
* </ul>
* </li>
* </li>
@@ -136,7 +136,7 @@
* @param <T>
* The model object type
*/
-public class Form<T> extends WebMarkupContainer<T> implements IFormSubmitListener
+public class Form<T> extends WebMarkupContainer implements IFormSubmitListener
{
/**
* Visitor used for validation
@@ -540,9 +540,9 @@
public final IFormSubmittingComponent findSubmittingButton()
{
IFormSubmittingComponent submittingComponent = (IFormSubmittingComponent)getPage().visitChildren(
- IFormSubmittingComponent.class, new IVisitor<Component<?>>()
+ IFormSubmittingComponent.class, new IVisitor<Component>()
{
- public Object component(final Component<?> component)
+ public Object component(final Component component)
{
// Get submitting component
final IFormSubmittingComponent submittingComponent = (IFormSubmittingComponent)component;
@@ -899,9 +899,9 @@
{
onError();
// call onError on nested forms
- visitChildren(Form.class, new IVisitor<Component<?>>()
+ visitChildren(Form.class, new IVisitor<Component>()
{
- public Object component(Component<?> component)
+ public Object component(Component component)
{
final Form<?> form = (Form<?>)component;
if (!form.isEnabled() || !form.isEnableAllowed() || !form.isVisibleInHierarchy())
@@ -925,9 +925,9 @@
{
setFlag(FLAG_SUBMITTED, true);
- visitChildren(Form.class, new IVisitor<Component<?>>()
+ visitChildren(Form.class, new IVisitor<Component>()
{
- public Object component(Component<?> component)
+ public Object component(Component component)
{
Form<?> form = (Form<?>)component;
if (form.isEnabled() && form.isEnableAllowed() && isVisibleInHierarchy())
@@ -1034,7 +1034,7 @@
* @see org.apache.wicket.Component#setVersioned(boolean)
*/
@Override
- public final Component<T> setVersioned(final boolean isVersioned)
+ public final Component setVersioned(final boolean isVersioned)
{
super.setVersioned(isVersioned);
@@ -1058,9 +1058,9 @@
*/
public final void visitFormComponents(final FormComponent.IVisitor visitor)
{
- visitChildren(FormComponent.class, new IVisitor<Component<?>>()
+ visitChildren(FormComponent.class, new IVisitor<Component>()
{
- public Object component(final Component<?> component)
+ public Object component(final Component component)
{
visitor.formComponent((FormComponent<?>)component);
return CONTINUE_TRAVERSAL;
@@ -1098,11 +1098,11 @@
{
if (getParent() instanceof Border)
{
- MarkupContainer<?> border = getParent();
- Iterator<Component<?>> iter = border.iterator();
+ MarkupContainer border = getParent();
+ Iterator<? extends Component> iter = border.iterator();
while (iter.hasNext())
{
- Component<?> child = iter.next();
+ Component child = iter.next();
if (child instanceof FormComponent)
{
visitor.formComponent((FormComponent<?>)child);
@@ -1118,9 +1118,9 @@
*/
private boolean anyFormComponentError()
{
- final Object value = visitChildren(new IVisitor<Component<?>>()
+ final Object value = visitChildren(new IVisitor<Component>()
{
- public Object component(final Component<?> component)
+ public Object component(final Component component)
{
if (component.hasErrorMessage())
{
@@ -1144,7 +1144,7 @@
* @param url
* The url which describes the component path and the interface to be called.
*/
- private void dispatchEvent(final Page<?> page, final String url)
+ private void dispatchEvent(final Page page, final String url)
{
RequestCycle rc = RequestCycle.get();
IRequestCycleProcessor processor = rc.getProcessor();
@@ -1278,7 +1278,7 @@
{
if (formComponent.isVisibleInHierarchy())
{
- // If peristence is switched on for that FormComponent
+ // If persistence is switched on for that FormComponent
// ...
if (formComponent.isPersistent())
{
@@ -1321,7 +1321,7 @@
buffer.append("<input type=\"text\" autocomplete=\"false\"/>");
// add the submitting component
- final Component<?> submittingComponent = (Component<?>)defaultSubmittingComponent;
+ final Component submittingComponent = (Component)defaultSubmittingComponent;
buffer.append("<input type=\"submit\" name=\"");
buffer.append(defaultSubmittingComponent.getInputName());
buffer.append("\" onclick=\" var b=Wicket.$('");
@@ -1493,7 +1493,7 @@
// override default message
final String defaultValue = "Upload must be less than " + getMaxSize();
String msg = getString(getId() + "." + UPLOAD_TOO_LARGE_RESOURCE_KEY,
- Model.valueOf(model), defaultValue);
+ Model.of(model), defaultValue);
error(msg);
}
else
@@ -1502,7 +1502,7 @@
// default message
final String defaultValue = "Upload failed: " + e.getLocalizedMessage();
String msg = getString(getId() + "." + UPLOAD_FAILED_RESOURCE_KEY,
- Model.valueOf(model), defaultValue);
+ Model.of(model), defaultValue);
error(msg);
log.warn(msg, e);
@@ -1707,7 +1707,7 @@
// if a default submitting component was set, handle the rendering of that
if (defaultSubmittingComponent instanceof Component)
{
- final Component<?> submittingComponent = (Component<?>)defaultSubmittingComponent;
+ final Component submittingComponent = (Component)defaultSubmittingComponent;
if (submittingComponent.isVisibleInHierarchy() && submittingComponent.isEnabled())
{
appendDefaultButtonField(markupStream, openTag);
@@ -2037,4 +2037,48 @@
{
return "";
}
+
+ /**
+ * Gets model
+ *
+ * @return model
+ */
+ @SuppressWarnings("unchecked")
+ public final IModel<T> getModel()
+ {
+ return (IModel<T>)getDefaultModel();
+ }
+
+ /**
+ * Sets model
+ *
+ * @param model
+ */
+ public final void setModel(IModel<T> model)
+ {
+ setDefaultModel(model);
+ }
+
+ /**
+ * Gets model object
+ *
+ * @return model object
+ */
+ @SuppressWarnings("unchecked")
+ public final T getModelObject()
+ {
+ return (T)getDefaultModelObject();
+ }
+
+ /**
+ * Sets model object
+ *
+ * @param object
+ */
+ public final void setModelObject(T object)
+ {
+ setDefaultModelObject(object);
+ }
+
+
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java Sat Jun 28 22:50:41 2008
@@ -90,7 +90,7 @@
* The model object type
*
*/
-public abstract class FormComponent<T> extends LabeledWebMarkupContainer<T>
+public abstract class FormComponent<T> extends LabeledWebMarkupContainer
implements
IFormVisitorParticipant
{
@@ -207,7 +207,7 @@
return message;
}
- private String getString(Localizer localizer, String key, Component<?> component)
+ private String getString(Localizer localizer, String key, Component component)
{
triedKeys.add(key);
return localizer.getString(key, component, "");
@@ -380,7 +380,7 @@
* @param visitor
* The visitor to call
*/
- public static final void visitFormComponentsPostOrder(Component<?> component,
+ public static final void visitFormComponentsPostOrder(Component component,
final FormComponent.IVisitor visitor)
{
if (visitor == null)
@@ -392,12 +392,12 @@
}
- private static final Object visitFormComponentsPostOrderHelper(Component<?> component,
+ private static final Object visitFormComponentsPostOrderHelper(Component component,
final FormComponent.IVisitor visitor)
{
if (component instanceof MarkupContainer)
{
- final MarkupContainer<?> container = (MarkupContainer<?>)component;
+ final MarkupContainer container = (MarkupContainer)component;
if (container.size() > 0)
{
boolean visitChildren = true;
@@ -407,10 +407,10 @@
}
if (visitChildren)
{
- final Iterator<Component<?>> children = container.iterator();
+ final Iterator<? extends Component> children = container.iterator();
while (children.hasNext())
{
- final Component<?> child = children.next();
+ final Component child = children.next();
Object value = visitFormComponentsPostOrderHelper(child, visitor);
if (value == Component.IVisitor.STOP_TRAVERSAL)
{
@@ -460,6 +460,8 @@
}
/**
+ * @param id
+ * @param model
* @see org.apache.wicket.Component#Component(String, IModel)
*/
public FormComponent(final String id, IModel<T> model)
@@ -481,7 +483,7 @@
* @see IValidator
* @see IValidatorAddListener
*/
- public final FormComponent<T> add(final IValidator... validators)
+ public final FormComponent<?> add(final IValidator... validators)
{
if (validators == null)
{
@@ -641,7 +643,7 @@
if (form == null)
{
// check whether the form is a child of a surrounding border
- final Border<?> border = findParent(Border.class);
+ final Border border = findParent(Border.class);
if (border != null)
{
FindFormVisitor formVisitor = new FindFormVisitor();
@@ -710,7 +712,7 @@
// TODO: keep this in sync with AbstractSubmitLink#getInputName
String id = getId();
final PrependingStringBuffer inputName = new PrependingStringBuffer(id.length());
- Component<?> c = this;
+ Component c = this;
while (true)
{
inputName.prepend(id);
@@ -1081,7 +1083,7 @@
*/
public void updateModel()
{
- setModelObject(getConvertedInput());
+ setDefaultModelObject(getConvertedInput());
}
@@ -1289,7 +1291,7 @@
*/
protected String getModelValue()
{
- return getModelObjectAsString();
+ return getDefaultModelObjectAsString();
}
/**
@@ -1523,4 +1525,48 @@
}
}
+
+ /**
+ * Gets model
+ *
+ * @return model
+ */
+ @SuppressWarnings("unchecked")
+ public final IModel<T> getModel()
+ {
+ return (IModel<T>)getDefaultModel();
+ }
+
+ /**
+ * Sets model
+ *
+ * @param model
+ */
+ public final void setModel(IModel<T> model)
+ {
+ setDefaultModel(model);
+ }
+
+ /**
+ * Gets model object
+ *
+ * @return model object
+ */
+ @SuppressWarnings("unchecked")
+ public final T getModelObject()
+ {
+ return (T)getDefaultModelObject();
+ }
+
+ /**
+ * Sets model object
+ *
+ * @param object
+ */
+ public final void setModelObject(T object)
+ {
+ setDefaultModelObject(object);
+ }
+
+
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java?rev=672603&r1=672602&r2=672603&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java Sat Jun 28 22:50:41 2008
@@ -24,14 +24,12 @@
* form component output an id attribute and link its for attribute with that value.
*
* @author Igor Vaynberg (ivaynberg)
- * @param <T>
- * The model object type
*/
-public class FormComponentLabel<T> extends WebMarkupContainer<T>
+public class FormComponentLabel extends WebMarkupContainer
{
private static final long serialVersionUID = 1L;
- private final LabeledWebMarkupContainer<?> component;
+ private final LabeledWebMarkupContainer component;
/**
* Constructor
@@ -41,7 +39,7 @@
* @param component
* component that this label is linked to
*/
- public FormComponentLabel(String id, LabeledWebMarkupContainer<?> component)
+ public FormComponentLabel(String id, LabeledWebMarkupContainer component)
{
super(id);
if (component == null)
@@ -70,7 +68,7 @@
*
* @return form component
*/
- public LabeledWebMarkupContainer<?> getFormComponent()
+ public LabeledWebMarkupContainer getFormComponent()
{
return component;
}