Updated Branches: refs/heads/master 1ca1ecfc9 -> f3c4baec7
WICKET-4759 FilterForm/FilterToolbar don't work when there's more than one IColumn to be filtered Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f3c4baec Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f3c4baec Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f3c4baec Branch: refs/heads/master Commit: f3c4baec7f60115b0e43e00f36b5740198dc7e3c Parents: 1ca1ecf Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Wed Oct 3 13:48:12 2012 +0300 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Wed Oct 3 13:48:12 2012 +0300 ---------------------------------------------------------------------- .../repeater/data/table/filter/FilterForm.java | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/f3c4baec/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java ---------------------------------------------------------------------- diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java index c620eb2..75be7cc 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java @@ -28,6 +28,14 @@ import org.apache.wicket.util.string.Strings; /** * A form with filter-related special functionality for its form components. + * + * <p> + * This form uses an invisible button to be able to submit when the user presses + * the <em>ENTER</em> key. If there is a need to add an explicit + * {@link org.apache.wicket.markup.html.form.IFormSubmittingComponent} to this form + * then {@link Form#setDefaultButton(org.apache.wicket.markup.html.form.IFormSubmittingComponent)} + * should be used to specify this custom submitting component. + * </p> * * @param <T> * type of filter state object @@ -70,7 +78,7 @@ public class FilterForm<T> extends Form<T> String value = getRequest().getPostParameters().getParameterValue(id).toString(""); getResponse().write( String.format( - "<div style='display:inline'><input type=\"hidden\" name=\"%s\" id=\"%s\" value=\"%s\"/></div>", + "<div style='position: absolute; left: -9999px; width: 1px; height: 1px;'><input type='hidden' name='%s' id='%s' value='%s'/><input type='submit'/></div>", id, id, value)); }
