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/09/14 06:00:43 UTC
svn commit: r695109 - in /wicket/trunk/wicket/src:
main/java/org/apache/wicket/ main/java/org/apache/wicket/ajax/form/
main/java/org/apache/wicket/ajax/markup/html/
main/java/org/apache/wicket/ajax/markup/html/form/
main/java/org/apache/wicket/ajax/mar...
Author: ivaynberg
Date: Sat Sep 13 21:00:41 2008
New Revision: 695109
URL: http://svn.apache.org/viewvc?rev=695109&view=rev
Log:
cleanup
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/PageParameters.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitButton.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigation.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractSubmitLink.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Button.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckGroup.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java Sat Sep 13 21:00:41 2008
@@ -366,14 +366,14 @@
* gets replacement with null check.
*
* @param component
- * @return
+ * @return replacement value
*/
private Object getReplacementOrNull(final Component component)
{
IModel<?> model = replaceModel;
if (model instanceof IComponentAssignedModel)
{
- model = ((IComponentAssignedModel)model).wrapOnAssignment(component);
+ model = ((IComponentAssignedModel<?>)model).wrapOnAssignment(component);
}
return (model != null) ? model.getObject() : null;
}
@@ -382,7 +382,7 @@
* gets replacement as a string with null check.
*
* @param replacementValue
- * @return
+ * @return replacement value as a string
*/
private String toStringOrNull(final Object replacementValue)
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java Sat Sep 13 21:00:41 2008
@@ -83,10 +83,10 @@
* <li><b>Construction </b>- A Component is constructed with the Java language new operator.
* Children may be added during construction if the Component is a MarkupContainer.
*
- * <li><b>Request Handling </b>- An incoming request is processed by a protocol request handler
- * such as WicketServlet. An associated Application object creates Session, Request and Response
- * objects for use by a given Component in updating its model and rendering a response. These
- * objects are stored inside a container called {@link RequestCycle} which is accessible via
+ * <li><b>Request Handling </b>- An incoming request is processed by a protocol request handler such
+ * as WicketServlet. An associated Application object creates Session, Request and Response objects
+ * for use by a given Component in updating its model and rendering a response. These objects are
+ * stored inside a container called {@link RequestCycle} which is accessible via
* {@link Component#getRequestCycle()}. The convenience methods {@link Component#getRequest()},
* {@link Component#getResponse()} and {@link Component#getSession()} provide easy access to the
* contents of this container.
@@ -124,8 +124,8 @@
* <li><b>Component Models </b>- The primary responsibility of a component is to use its model (an
* object that implements IModel), which can be set via
* {@link Component#setDefaultModel(IModel model)} and retrieved via
- * {@link Component#getDefaultModel()}, to render a response in an appropriate markup language,
- * such as HTML. In addition, form components know how to update their models based on request
+ * {@link Component#getDefaultModel()}, to render a response in an appropriate markup language, such
+ * as HTML. In addition, form components know how to update their models based on request
* information. Since the IModel interface is a wrapper around an actual model object, a convenience
* method {@link Component#getDefaultModelObject()} is provided to retrieve the model Object from
* its IModel wrapper. A further convenience method,
@@ -136,10 +136,9 @@
* isVisible() and will not render a response (nor will their children).
*
* <li><b>Page </b>- The Page containing any given Component can be retrieved by calling
- * {@link Component#getPage()}. If the Component is not attached to a Page, an
- * IllegalStateException will be thrown. An equivalent method, {@link Component#findPage()} is
- * available for special circumstances where it might be desirable to get a null reference back
- * instead.
+ * {@link Component#getPage()}. If the Component is not attached to a Page, an IllegalStateException
+ * will be thrown. An equivalent method, {@link Component#findPage()} is available for special
+ * circumstances where it might be desirable to get a null reference back instead.
*
* <li><b>Session </b>- The Page for a Component points back to the Session that contains the Page.
* The Session for a component can be accessed with the convenience method getSession(), which
@@ -155,12 +154,12 @@
* Application Localizer for easy access in Components.
*
* <li><b>Style </b>- The style ("skin") for a component is available through
- * {@link Component#getStyle()}, which is equivalent to getSession().getStyle(). Styles are
- * intended to give a particular look to a Component or Resource that is independent of its Locale.
- * For example, a style might be a set of resources, including images and markup files, which gives
- * the design look of "ocean" to the user. If the Session's style is set to "ocean" and these
- * resources are given names suffixed with "_ocean", Wicket's resource management logic will prefer
- * these resources to other resources, such as default resources, which are not as good of a match.
+ * {@link Component#getStyle()}, which is equivalent to getSession().getStyle(). Styles are intended
+ * to give a particular look to a Component or Resource that is independent of its Locale. For
+ * example, a style might be a set of resources, including images and markup files, which gives the
+ * design look of "ocean" to the user. If the Session's style is set to "ocean" and these resources
+ * are given names suffixed with "_ocean", Wicket's resource management logic will prefer these
+ * resources to other resources, such as default resources, which are not as good of a match.
*
* <li><b>Variation </b>- Whereas Styles are Session (user) specific, variations are component
* specific. E.g. if the Style is "ocean" and the Variation is "NorthSea", than the resources are
@@ -191,8 +190,8 @@
* {@link Component#setVersioned(boolean)} method. The versioning participation of a given Component
* can be retrieved with {@link Component#isVersioned()}.
*
- * <li><b>AJAX support</b>- Components can be re-rendered after the whole Page has been rendered
- * at least once by calling doRender().
+ * <li><b>AJAX support</b>- Components can be re-rendered after the whole Page has been rendered at
+ * least once by calling doRender().
*
* @author Jonathan Locke
* @author Chris Turner
@@ -474,8 +473,7 @@
*
* <pre>
*
- * User u = (User)getModelObject();
- * u.setName("got you there!");
+ * User u = (User)getModelObject(); u.setName("got you there!");
*
* </pre>
*
@@ -497,12 +495,11 @@
* <li>The 'normal' use is for controlling whether a component is rendered without having any
* effect on the rest of the processing. If a strategy lets this method return 'false', then the
* target component and its children will not be rendered, in the same fashion as if that
- * component had visibility property 'false'.</li>
- * <li>The other use is when a component should block the rendering of the whole page. So
- * instead of 'hiding' a component, what we generally want to achieve here is that we force the
- * user to logon/give-credentials for a higher level of authorization. For this functionality,
- * the strategy implementation should throw a {@link AuthorizationException}, which will then
- * be handled further by the framework.</li>
+ * component had visibility property 'false'.</li> <li>The other use is when a component should
+ * block the rendering of the whole page. So instead of 'hiding' a component, what we generally
+ * want to achieve here is that we force the user to logon/give-credentials for a higher level
+ * of authorization. For this functionality, the strategy implementation should throw a
+ * {@link AuthorizationException}, which will then be handled further by the framework.</li>
* </ul>
* </p>
*/
@@ -705,10 +702,10 @@
* What's stored here depends on what attributes are set on component. Data can contains
* combination of following attributes:
* <ul>
- * <li>Model (indicated by {@link #FLAG_MODEL_SET})
- * <li>MetaDataEntry (optionally {@link MetaDataEntry}[] if more metadata entries are present) *
- * <li>{@link IBehavior}(s) added to component. The behaviors are not stored in separate
- * array, they are part of the {@link #data} array
+ * <li>Model (indicated by {@link #FLAG_MODEL_SET}) <li>MetaDataEntry (optionally
+ * {@link MetaDataEntry}[] if more metadata entries are present) * <li>{@link IBehavior}(s)
+ * added to component. The behaviors are not stored in separate array, they are part of the
+ * {@link #data} array
* </ul>
* If there is only one attribute set (i.e. model or MetaDataEntry([]) or one behavior), the
* #data object points directly to value of that attribute. Otherwise the data is of type
@@ -1440,9 +1437,9 @@
* attribute set explicitly via a call to {@link #setMarkupId(String)}, id attribute defined in
* the markup, or an automatically generated id - in that order.
* <p>
- * If no id is set and <code>createIfDoesNotExist</code> is false, this method will return
- * null. Otherwise it will generate an id value that will be unique in the page. This is the
- * preferred way as there is no chance of id collision.
+ * If no id is set and <code>createIfDoesNotExist</code> is false, this method will return null.
+ * Otherwise it will generate an id value that will be unique in the page. This is the preferred
+ * way as there is no chance of id collision.
* <p>
* Note: This method should only be called after the component or its parent have been added to
* the page.
@@ -2656,8 +2653,7 @@
/**
* Replaces this component with another. The replacing component must have the same component id
* as this component. This method serves as a shortcut to <code>
- * this.getParent().replace(replacement)</code>
- * and provides a better context for errors.
+ * this.getParent().replace(replacement)</code> and provides a better context for errors.
*
* @since 1.2.1
*
@@ -2907,9 +2903,7 @@
}
/**
- *
- *
- * @return
+ * @return model
*/
IModel<?> getModelImpl()
{
@@ -4127,7 +4121,8 @@
}
/**
- *
+ * @param setRenderingFlag
+ * rendering flag
*/
void internalMarkRendering(boolean setRenderingFlag)
{
@@ -4315,8 +4310,7 @@
* Determines whether or not a component should be visible, taking into account all the factors:
* {@link #isVisible()}, {@link #isVisibilityAllowed()}, {@link #isRenderAllowed()}
*
- * @return <code>true</code> if the component should be visible, <code>false</code>
- * otherwise
+ * @return <code>true</code> if the component should be visible, <code>false</code> otherwise
*/
public final boolean determineVisibility()
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java Sat Sep 13 21:00:41 2008
@@ -81,8 +81,6 @@
* @see MarkupStream
* @author Jonathan Locke
*
- * @param <T>
- * The model object type
*/
public abstract class MarkupContainer extends Component
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java Sat Sep 13 21:00:41 2008
@@ -119,8 +119,6 @@
* @author Eelco Hillenius
* @author Johan Compagner
*
- * @param <T>
- * The model object type
*/
public abstract class Page extends MarkupContainer implements IRedirectListener, IPageMapEntry
{
@@ -496,7 +494,6 @@
/**
* @see org.apache.wicket.session.pagemap.IPageMapEntry#getPageClass()
*/
- @SuppressWarnings("unchecked")
public final Class<? extends Page> getPageClass()
{
return getClass();
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/PageParameters.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/PageParameters.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/PageParameters.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/PageParameters.java Sat Sep 13 21:00:41 2008
@@ -37,6 +37,7 @@
*
* @author Jonathan Locke
*/
+@SuppressWarnings("unused")
public final class PageParameters extends ValueMap
{
/**
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java Sat Sep 13 21:00:41 2008
@@ -134,9 +134,9 @@
*
* @return FormComponent
*/
- protected final FormComponent getFormComponent()
+ protected final FormComponent<?> getFormComponent()
{
- return (FormComponent)getComponent();
+ return (FormComponent<?>)getComponent();
}
/**
@@ -157,7 +157,7 @@
@Override
protected final void respond(final AjaxRequestTarget target)
{
- final FormComponent formComponent = getFormComponent();
+ final FormComponent<?> formComponent = getFormComponent();
try
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java Sat Sep 13 21:00:41 2008
@@ -81,9 +81,9 @@
*
* @return FormComponent
*/
- protected final FormComponent getFormComponent()
+ protected final FormComponent<?> getFormComponent()
{
- return (FormComponent)getComponent();
+ return (FormComponent<?>)getComponent();
}
/**
@@ -117,7 +117,7 @@
@Override
protected final void onEvent(final AjaxRequestTarget target)
{
- final FormComponent formComponent = getFormComponent();
+ final FormComponent<?> formComponent = getFormComponent();
if (getEvent().toLowerCase().equals("onblur") && disableFocusOnBlur())
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java Sat Sep 13 21:00:41 2008
@@ -31,6 +31,8 @@
* @since 1.2
*
* @author Igor Vaynberg (ivaynberg)
+ * @param <T>
+ * type of model object
*/
public abstract class AjaxFallbackLink<T> extends Link<T> implements IAjaxLink
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java Sat Sep 13 21:00:41 2008
@@ -30,6 +30,8 @@
* @since 1.2
*
* @author Igor Vaynberg (ivaynberg)
+ * @param <T>
+ * type of model object
*
*/
public abstract class AjaxLink<T> extends AbstractLink implements IAjaxLink
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitButton.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitButton.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitButton.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitButton.java Sat Sep 13 21:00:41 2008
@@ -26,8 +26,6 @@
* @since 1.2
*
* @author Igor Vaynberg (ivaynberg)
- * @param <T>
- * The model object type
* @deprecated Use {@link AjaxButton} instead.
*/
@Deprecated
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxSubmitLink.java Sat Sep 13 21:00:41 2008
@@ -60,8 +60,6 @@
*
* @author Igor Vaynberg (ivaynberg)
*
- * @param <T>
- * The model object type
*/
public abstract class AjaxSubmitLink extends AbstractSubmitLink
{
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigation.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigation.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigation.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigation.java Sat Sep 13 21:00:41 2008
@@ -78,7 +78,7 @@
* @return the ajaxified page number link.
*/
@Override
- protected Link newPagingNavigationLink(String id, IPageable pageable, int pageIndex)
+ protected Link<?> newPagingNavigationLink(String id, IPageable pageable, int pageIndex)
{
return new AjaxPagingNavigationLink(id, pageable, pageIndex);
}
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.java Sat Sep 13 21:00:41 2008
@@ -91,7 +91,7 @@
* @return the increment link
*/
@Override
- protected Link newPagingNavigationIncrementLink(String id, IPageable pageable, int increment)
+ protected Link<?> newPagingNavigationIncrementLink(String id, IPageable pageable, int increment)
{
return new AjaxPagingNavigationIncrementLink(id, pageable, increment);
}
@@ -109,7 +109,7 @@
* @return the pagenumber link
*/
@Override
- protected Link newPagingNavigationLink(String id, IPageable pageable, int pageNumber)
+ protected Link<?> newPagingNavigationLink(String id, IPageable pageable, int pageNumber)
{
return new AjaxPagingNavigationLink(id, pageable, pageNumber);
}
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=695109&r1=695108&r2=695109&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 Sep 13 21:00:41 2008
@@ -253,7 +253,7 @@
addStateChange(new ChoicesListChange());
}
}
- this.choices = new WildcardListModel<E>(choices);
+ this.choices = new WildcardListModel<E>(choices);
return this;
}
@@ -376,6 +376,7 @@
* @param selected
* The currently selected string value
*/
+ @SuppressWarnings("unchecked")
protected void appendOptionHtml(AppendingStringBuffer buffer, E choice, int index,
String selected)
{
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=695109&r1=695108&r2=695109&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 Sep 13 21:00:41 2008
@@ -28,8 +28,6 @@
*
* @author Matej Knopp
*
- * @param <T>
- * The model object type
*/
public abstract class AbstractSubmitLink extends AbstractLink implements IFormSubmittingComponent
{
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=695109&r1=695108&r2=695109&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 Sep 13 21:00:41 2008
@@ -75,6 +75,8 @@
}
/**
+ * @param id
+ * @param model
* @see org.apache.wicket.Component#Component(String, IModel)
*/
public AbstractTextComponent(final String id, final IModel<T> model)
@@ -179,7 +181,7 @@
* the value to set this flag.
* @return this
*/
- public final FormComponent setConvertEmptyInputStringToNull(boolean flag)
+ public final FormComponent<T> 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=695109&r1=695108&r2=695109&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 Sep 13 21:00:41 2008
@@ -49,8 +49,6 @@
* @author Jonathan Locke
* @author Eelco Hillenius
*
- * @param <T>
- * The model object type
*/
public class Button extends FormComponent<String> implements IFormSubmittingComponent
{
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=695109&r1=695108&r2=695109&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 Sep 13 21:00:41 2008
@@ -61,6 +61,8 @@
}
/**
+ * @param id
+ * @param model
* @see WebMarkupContainer#WebMarkupContainer(String, IModel)
*/
public Check(String id, IModel<T> model)
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=695109&r1=695108&r2=695109&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 Sep 13 21:00:41 2008
@@ -22,8 +22,6 @@
import org.apache.wicket.model.IModel;
import org.apache.wicket.protocol.http.portlet.PortletRequestContext;
import org.apache.wicket.util.convert.ConversionException;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.convert.converters.BooleanConverter;
import org.apache.wicket.util.string.StringValueConversionException;
import org.apache.wicket.util.string.Strings;
@@ -63,6 +61,8 @@
}
/**
+ * @param id
+ * @param model
* @see org.apache.wicket.Component#Component(String, IModel)
*/
public CheckBox(final String id, IModel<Boolean> model)
@@ -123,22 +123,6 @@
}
/**
- * CheckBox will by default always just use the boolean converter because the implementation
- * expects that the string is can be converted to a boolean {@link Strings#isTrue(String)}
- *
- * @see org.apache.wicket.Component#getConverter(java.lang.Class)
- */
- @Override
- public <X> IConverter<X> getConverter(Class<X> type)
- {
- /*
- * FIXME johan: why is this override here? it doesnt make any sense. if i say
- * checkbox.getconverter(Integer.class) why is it still giving me a boolean converter???
- */
- return (IConverter<X>)BooleanConverter.INSTANCE;
- }
-
- /**
* Processes the component tag.
*
* @param tag
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=695109&r1=695108&r2=695109&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 Sep 13 21:00:41 2008
@@ -80,12 +80,15 @@
* collection to be used as the model
*
*/
+ @SuppressWarnings("unchecked")
public CheckGroup(String id, Collection<T> collection)
{
this(id, new CollectionModel<T>(collection));
}
/**
+ * @param id
+ * @param model
* @see WebMarkupContainer#WebMarkupContainer(String, IModel)
*/
public CheckGroup(String id, IModel<Collection<T>> model)
Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java?rev=695109&r1=695108&r2=695109&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java Sat Sep 13 21:00:41 2008
@@ -30,6 +30,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
+
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletContext;
@@ -39,6 +40,7 @@
import javax.servlet.http.HttpServletResponse;
import junit.framework.TestCase;
+
import org.apache.wicket.Application;
import org.apache.wicket.markup.html.image.resource.DynamicImageResource;
import org.apache.wicket.util.tester.WicketTester.DummyWebApplication;
@@ -46,11 +48,12 @@
public class WicketFilterTest extends TestCase
{
private static WebApplication application;
- private DateFormat fullDateFormat = DateFormat.getDateInstance(DateFormat.FULL);
- private DateFormat headerDateFormat = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss z", Locale.UK);
+ private final DateFormat fullDateFormat = DateFormat.getDateInstance(DateFormat.FULL);
+ private final DateFormat headerDateFormat = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss z",
+ Locale.UK);
@Override
- protected void tearDown() throws Exception
+ protected void tearDown() throws Exception
{
application = null;
}
@@ -69,7 +72,8 @@
assertEquals("filtertest/", filterPath);
}
- public void testNotModifiedResponseIncludesExpiresHeader() throws IOException, ServletException, ParseException
+ public void testNotModifiedResponseIncludesExpiresHeader() throws IOException,
+ ServletException, ParseException
{
application = new DummyWebApplication();
WicketFilter filter = new WicketFilter();
@@ -77,8 +81,10 @@
Application.set(application);
DynamicImageResource resource = new DynamicImageResource()
{
+ private static final long serialVersionUID = 1L;
+
@Override
- protected byte[] getImageData()
+ protected byte[] getImageData()
{
throw new UnsupportedOperationException("Not implemented");
}
@@ -86,12 +92,14 @@
resource.setCacheable(true);
application.getSharedResources().add("foo.gif", resource);
MockHttpServletRequest request = new MockHttpServletRequest(application, null, null);
- request.setURL(request.getContextPath() + "/app/" + "resources/" + Application.class.getName() + "/foo.gif");
+ request.setURL(request.getContextPath() + "/app/" + "resources/" +
+ Application.class.getName() + "/foo.gif");
setIfModifiedSinceToNextWeek(request);
MockHttpServletResponse response = new MockHttpServletResponse(request);
filter.doFilter(request, response, new FilterChain()
{
- public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) throws IOException, ServletException
+ public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse)
+ throws IOException, ServletException
{
}
});
@@ -100,7 +108,8 @@
assertNotNull("Expires header must be set on not modified response", responseExpiresHeader);
Date responseExpires = headerDateFormat.parse(responseExpiresHeader);
- assertTrue("Expected later than current date but was " + responseExpires, responseExpires.after(new Date()));
+ assertTrue("Expected later than current date but was " + responseExpires,
+ responseExpires.after(new Date()));
}
private void setIfModifiedSinceToNextWeek(MockHttpServletRequest request)
@@ -116,7 +125,8 @@
{
try
{
- Method method = WicketFilter.class.getDeclaredMethod("getFilterPath", String.class, InputStream.class);
+ Method method = WicketFilter.class.getDeclaredMethod("getFilterPath", String.class,
+ InputStream.class);
method.setAccessible(true);
return method.invoke(new WicketFilter(), string, in).toString();
}
@@ -144,12 +154,15 @@
private static class FilterTestingConfig implements FilterConfig
{
- private Map<String,String> initParameters = new HashMap<String,String>();
+ private final Map<String, String> initParameters = new HashMap<String, String>();
- public FilterTestingConfig() {
- initParameters.put(WicketFilter.APP_FACT_PARAM, FilterTestingApplicationFactory.class.getName());
+ public FilterTestingConfig()
+ {
+ initParameters.put(WicketFilter.APP_FACT_PARAM,
+ FilterTestingApplicationFactory.class.getName());
initParameters.put(WicketFilter.FILTER_MAPPING_PARAM, "/app/*");
- initParameters.put(ContextParamWebApplicationFactory.APP_CLASS_PARAM, DummyWebApplication.class.getName());
+ initParameters.put(ContextParamWebApplicationFactory.APP_CLASS_PARAM,
+ DummyWebApplication.class.getName());
}
public String getFilterName()