Re: Problems with clearing of filter form
dcastannon schrieb: Clear button of FilterForm is set as defaultFormProcessing false by default. Change it to true. This seems to solve my problem. Thanks a lot. Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with clearing of filter form
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 createColumns() { > List columns = new ArrayList(); > 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 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: > > > > > [call to focus restore > script] > > > > 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]
Re: Problems with clearing of filter form
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 createColumns() { List columns = new ArrayList(); 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 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: [call to focus restore script] Very similar to the phonebook example. Kai
Re: Problems with clearing of filter form
Can you show any binding code related to your case? 2008/3/18, Kai Mütz <[EMAIL PROTECTED]>: > Nobody out there with a similar problem? I have mounted the page as > bookmarable page. Can this cause the problem? I have already set the > response header to no-cache. > > Anybody an idea? > > 2008/3/17, Kai Mütz <[EMAIL PROTECTED]>: > > > > Hi, > > > > I am using the filter toolbar with filter form within a DefaultDataTable > > very similar to the phonebook example. I also use the GoAndClearFilter. > > The problem is the clear function: If I press the "clear" button the > > filter form modal seems to be updated/cleared because all (non filtered) > > results are shown. But the input fields (TextFiltered and > > ChoiceFiltered) of the filter form are not cleared. Does anybody know > > this problem? > > > > Regards, Kai > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with clearing of filter form
Nobody out there with a similar problem? I have mounted the page as bookmarable page. Can this cause the problem? I have already set the response header to no-cache. Anybody an idea? 2008/3/17, Kai Mütz <[EMAIL PROTECTED]>: > > Hi, > > I am using the filter toolbar with filter form within a DefaultDataTable > very similar to the phonebook example. I also use the GoAndClearFilter. > The problem is the clear function: If I press the "clear" button the > filter form modal seems to be updated/cleared because all (non filtered) > results are shown. But the input fields (TextFiltered and > ChoiceFiltered) of the filter form are not cleared. Does anybody know > this problem? > > Regards, Kai >
Problems with clearing of filter form
Hi, I am using the filter toolbar with filter form within a DefaultDataTable very similar to the phonebook example. I also use the GoAndClearFilter. The problem is the clear function: If I press the "clear" button the filter form modal seems to be updated/cleared because all (non filtered) results are shown. But the input fields (TextFiltered and ChoiceFiltered) of the filter form are not cleared. Does anybody know this problem? Regards, Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with clearing of filter form
Hi, I am using the filter toolbar with filter form within a DefaultDataTable very similar to the phonebook example. I also use the GoAndClearFilter. The problem is the clear function: If I press the "clear" button the filter form modal seems to be updated/cleared because all (non filtered) results are shown. But the input fields (TextFiltered and ChoiceFiltered) of the filter form are not cleared. Does anybody know this problem? Regards, Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]