Because you replaced the data table to which the export toolbar was added with another data table, which has no export toolbar. A data table without an export toolbar will not render an export toolbar. If you want the export toolbar to render, you must add it to the data table being rendered.

On 23/04/2013 15:52, christoph.ma...@t-systems.com wrote:
But I added the Toolbar at the initial call oft he Webpage. Then I can submit 
the AjaxButton and some data is in the table. Why should I add the 
bottomtoolbar again? The no-record-found-toolbar will be rendered after the 
Ajaxcall. Why not the Exporttoolbar?


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: Sven Meier [mailto:s...@meiers.net]
Gesendet: Dienstag, 23. April 2013 15:44
An: users@wicket.apache.org
Betreff: Re: AW: DefaultDataTable will not render bottomtoolbar for export

Your replaced DataTable doesn't have a bottomtoolbar:

                      
target.add(ProtokollierungPage.this.get("searchTable").replaceWith(
                              new 
DefaultDataTable<ProtocolRecord,String>("searchTable",
                                      getTableHead(),
                                      new 
ProtocolDataSortDataProvider(protocolData),
                                      100)));


Sven


On 04/23/2013 03:29 PM, christoph.ma...@t-systems.com wrote:
Hello,

here is the code of onSubmit method of the AjaxFallbackButton.

Form<FilterCreatorProtocol> protocollSearchForm = new 
Form<FilterCreatorProtocol>("protokollierungSucheForm", new 
CompoundPropertyModel<FilterCreatorProtocol>(new FilterCreatorProtocol()));
          protocollSearchForm.add(new
AjaxFallbackButton("submit",protocollSearchForm) {

              @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(
                              new 
DefaultDataTable<ProtocolRecord,String>("searchTable",
                                      getTableHead(),
                                      new 
ProtocolDataSortDataProvider(protocolData),
                                      100)));
                  }else{
                      error("ErrorMessage");
                  }


              }
          }) ;

Do you need some other informations?


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: Sven Meier [mailto:s...@meiers.net]
Gesendet: Dienstag, 23. April 2013 15:16
An: users@wicket.apache.org
Betreff: Re: DefaultDataTable will not render bottomtoolbar for export

Show us your #onSubmit(ART) ... formatted please.

Sven

On 04/23/2013 02:54 PM, 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

Reply via email to