Clear button of FilterForm is set  as defaultFormProcessing false by default.
Change it to true.




Kai Mütz wrote:
> 
> 2008/3/19, Martin Makundi <[EMAIL PROTECTED]>:
>>
>> Can you show any binding code related to your case?
>>
>> DocumentDataProvider dataProvider = new
> DocumentDataProvider(documentService);
> DefaultDataTable documentTable = new DefaultDataTable("document-table",
> createColumns(), dataProvider, 10);
> final FilterForm form = new FilterForm("filter-form", dataProvider) {
>     private static final long serialVersionUID = 1L;
> 
>         @Override
>         protected void onSubmit() {
>             documentTable.setCurrentPage(0);
>         }
> };
> documentTable.addTopToolbar(new FilterToolbar(documentTable, form,
> dataProvider));
> form.add(documentTable);
> 
> private List<IColumn> createColumns() {
>     List<IColumn> columns = new ArrayList<IColumn>();
>     columns.add(new TextFilteredPropertyColumn(
>             new ResourceModel("field.document.name"), "name", "name") {
>         public void populateItem(final Item cellItem,
>                 final String componentId, final IModel docModel) {
>             cellItem.add(new EditDocumentNamePanel(componentId,
> docModel));
>         }
>     });
>     columns.add(new TextFilteredPropertyColumn(
>         new ResourceModel("field.document.path"), "path", "path"));
>     columns.add(new ChoiceFilteredPropertyColumn(
>         new ResourceModel("field.document.mimetype"), "mimetype",
> "mimetype",
>         new LoadableDetachableModel() {
>             @Override
>             protected Object load() {
>                 List<String> mimeTypes = documentService.getMimeTypes();
>                 mimeTypes.add(0, null);
>                 return mimeTypes;
>             }
>         }
>     ));
>     columns.add(new FilteredAbstractColumn(
>             new ResourceModel("form.common.filter")) {
>         public Component getFilter(final String id, final FilterForm form)
> {
>             return new GoAndClearFilter(id, form);
>         }
>         public void populateItem(final Item cellItem,
>                 final String componentId, final IModel docModel) {
>             cellItem.add(new DocumentActionPanel(componentId, docModel));
>         }
>     });
>     return columns;
> }
> 
> 
> Markup:
> <div style="margin-top:25px;">
>     <form wicket:id="filter-form">
>         <input type="hidden" name="tracker" wicket:id="focus-tracker"/>
>         <table class="dataview" wicket:id="document-table"></table>
>         [call to focus restore
> script]
>     </form>
> </div>
> 
> Very similar to the phonebook example.
> 
> Kai
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problems-with-clearing-of-filter-form-tp16098239p16226893.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to