Hello, Now I can see the exporttoolbar but when I click the link the csv is empty. Why is that empty?
Here the code: @Override public void onSubmit(AjaxRequestTarget target, Form form) { target.add(feedback); FilterCreatorProtocol filter = (FilterCreatorProtocol)form.getModelObject(); if(ConsoleDataHandlerImpl.getInstance().queryProtocolRowsByFilter(filter) <= MAX_SEARCH_RESULTS){ List<ProtocolRecord> protocolData = ConsoleDataHandlerImpl.getInstance().queryProtocolDataWithSearchFilter(filter); target.add(ProtokollierungPage.this.get("searchTable").replaceWith(getSearchTable(protocolData))); }else{ error("ErrorMessage"); } } private DefaultDataTable getSearchTable(List<ProtocolRecord> dataList) { DefaultDataTable<ProtocolRecord,String> searchTable = new DefaultDataTable<ProtocolRecord, String>("searchTable",getTableHead(),new ProtocolDataSortDataProvider(dataList),10); searchTable.setOutputMarkupId(true); searchTable.addBottomToolbar(new ExportToolbar(searchTable, new Model<String>("Export to"), new Model<String>("export")).addDataExporter(new CSVDataExporter())); return searchTable; } List<IColumn<ProtocolRecord,String>> columns = new ArrayList<IColumn<ProtocolRecord,String>>(); columns.add(new PropertyColumn<ProtocolRecord, String>(new ResourceModel("protocolRecord.retentionID"), "retentionId", "retentionId")); columns.add(new PropertyColumn<ProtocolRecord, String>(new ResourceModel("protocolRecord.protocolID"), "protocolId", "protocolId"){ @Override public void populateItem(Item<ICellPopulator<ProtocolRecord>> cellItem, String componentId, IModel<ProtocolRecord> model) { cellItem.add(new ActionPanel(componentId, model)); } }); columns.add(new PropertyColumn<ProtocolRecord, String>(new ResourceModel("protocolRecord.externalID"), "externalId", "externalId")); columns.add(new DatePropertyColumn(new ResourceModel("protocolRecord.eventTimestamp"),"eventTimestamp","eventTimestamp","dd.MM.yyyy HH:mm:ss")); columns.add(new PropertyColumn<ProtocolRecord, String>(new ResourceModel("protocolRecord.integrationService"),"integrationService","integrationService")); columns.add(new PropertyColumn<ProtocolRecord, String>(new ResourceModel("protocolRecord.endpoint"),"endpoint","endpoint")); columns.add(new PropertyColumn<ProtocolRecord, String>(new ResourceModel("protocolRecord.endpointType"),"endpointType","endpointType")); columns.add(new PropertyColumn<ProtocolRecord, String>(new ResourceModel("protocolRecord.messageStatus"),"messageStatus.description","messageStatus.description")); Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport & Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax: +49 (0) 351 / 8152 - 209 email: christoph.ma...@t-systems.com -----Ursprüngliche Nachricht----- Von: Manig, Christoph Gesendet: Mittwoch, 24. April 2013 07:54 An: users@wicket.apache.org Betreff: AW: AW: DefaultDataTable will not render bottomtoolbar for export Hello, now I see the Problem. Thank you for your help and sorry for my blindness. Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport & Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax: +49 (0) 351 / 8152 - 209 email: christoph.ma...@t-systems.com -----Ursprüngliche Nachricht----- Von: Jesse Long [mailto:j...@unknown.za.net] Gesendet: Dienstag, 23. April 2013 15:57 An: users@wicket.apache.org Betreff: Re: AW: DefaultDataTable will not render bottomtoolbar for export Hi Christoph, PropertyColumns are already exportable. Exportable means implements IExportableColumn. Sven identified that the replaced data table does not have the export toolbar added to it. This is why it does not display after being replaced. Cheers, Jesse On 23/04/2013 15:49, christoph.ma...@t-systems.com wrote: > Ok. Thanks for your answer. > > Here are my columns: > List<IColumn<ProtocolRecord,String>> columns = new > ArrayList<IColumn<ProtocolRecord,String>>(); > columns.add(new PropertyColumn<ProtocolRecord, String>(new > ResourceModel("protocolRecord.retentionID"), "retentionId", "retentionId")); > columns.add(new PropertyColumn<ProtocolRecord, String>(new > ResourceModel("protocolRecord.protocolID"), "protocolId", "protocolId"){ > @Override > public void populateItem(Item<ICellPopulator<ProtocolRecord>> > cellItem, String componentId, IModel<ProtocolRecord> model) > { > cellItem.add(new ActionPanel(componentId, model)); > } > }); > columns.add(new PropertyColumn<ProtocolRecord, String>(new > ResourceModel("protocolRecord.externalID"), "externalId", > "externalId")); columns.add(new DatePropertyColumn(new > ResourceModel("protocolRecord.eventTimestamp"),"eventTimestamp","event > Timestamp","dd.MM.yyyy HH:mm:ss")); columns.add(new > PropertyColumn<ProtocolRecord, String>(new > ResourceModel("protocolRecord.integrationService"),"integrationService > ","integrationService")); columns.add(new > PropertyColumn<ProtocolRecord, String>(new > ResourceModel("protocolRecord.endpoint"),"endpoint","endpoint")); > columns.add(new PropertyColumn<ProtocolRecord, String>(new > ResourceModel("protocolRecord.endpointType"),"endpointType","endpointT > ype")); columns.add(new PropertyColumn<ProtocolRecord, String>(new > ResourceModel("protocolRecord.messageStatus"),"messageStatus.descripti > on","messageStatus.description")); > > How can I make them exportable? What are exportable columns in Wicket? > > At first the dataTable is empty, so the BottomToolbar shouldn't be rendered. > That's right. But when it is replaced by an Ajaxbutton and there is some data > in the dataTable the Bottomtoolbar isn't rendered.Why? Because of the > non-exportable columns? > > > Mit freundlichen Grüßen > Christoph Manig > Systems Engineer > > T-Systems International GmbH > Systems Integration - SC Travel, Transport & Logistics Hoyerswerdaer > Str. 18 > 01099 Dresden > tel.: +49 (0) 351 / 8152 - 188 > fax: +49 (0) 351 / 8152 - 209 > email: christoph.ma...@t-systems.com > > > -----Ursprüngliche Nachricht----- > Von: Jesse Long [mailto:j...@unknown.za.net] > Gesendet: Dienstag, 23. April 2013 15:43 > An: users@wicket.apache.org > Betreff: Re: DefaultDataTable will not render bottomtoolbar for export > > Hi Christoph, > > ExportToolbar#isVisible() is not visible in any of these conditions: > > * There are no rows displayed (this is your case) > * There are no data exporters (this is not your case) > * There are no exportable columns (I dont know if this is your case) > > If you want the export toolbar to be visible when there are no rows, please > overload ExportToolbar#isVisible(), or file a Jira issue if you want that > configurable. > > Thanks, > Jesse > > > On 23/04/2013 14:54, christoph.ma...@t-systems.com wrote: >> Hello, >> >> I have a Problem with the DefaultDataTable and the Export csv. Here is my >> code: >> >> DefaultDataTable<ProtocolSearchData,String> searchTable = new >> DefaultDataTable<ProtocolSearchData, >> String>("searchTable",getTableHead(),new >> ProtocolDataSortDataProvider(Collections.EMPTY_LIST),10); >> searchTable.addBottomToolbar(new ExportToolbar(searchTable,new >> Model<String>("Export to"),new >> Model<String>("export")).addDataExporter(new CSVDataExporter())); >> searchTable.setOutputMarkupId(true); >> >> add(searchTable); >> >> This table will be replaced by submitting an AjaxFallbackButton, so that the >> DataProvider gets an list with some data and not an empty list. My Problem >> is that the bottomtoolbar for exporting a csv ist not rendered. The >> no-records-found toolbar will be rendered. >> >> What is the problem here? Can anyone please help me? >> >> >> >> Mit freundlichen Grüßen >> Christoph Manig >> Systems Engineer >> >> T-Systems International GmbH >> Systems Integration - SC Travel, Transport & Logistics Hoyerswerdaer >> Str. 18 >> 01099 Dresden >> tel.: +49 (0) 351 / 8152 - 188 >> fax: +49 (0) 351 / 8152 - 209 >> email: christoph.ma...@t-systems.com >> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org