Re: TableComponentAsXlsHandler Problem
@ Mr. Ziemelis thank you it works. sorry for late reply, thanks for everyone!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4647807.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
Ok, I want to ask lastly, I dynamically generated a workbook HSSFWorkbook, and I want client to download that file inside of onclick method of a link. (BytearrayResource doesnt work, it makes problem, please another soulution) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4625745.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
MArtin, Let me summarize problem, I want to post an excel file which is populated dynamiclally from database after on click of a link. I dont want to use TableComponentAsXlsHandler coz I dont want to load all data to a Listarraycomponent, coz I have to export huge number of rows such as 100.000 records in excel. That is why I generate excell file successfully, with POI and I post file successfully. BUT I have problem while opening excell file after its download on clicnt side. It doesnt open. I gives error. I think I have problem below there. byte[] bai = null; bai = workbooksample.getBytes(); ByteArrayResource byteArrayResource = new ByteArrayResource("application/vnd.ms-excel", bai, "a.xls"); RequestCycle.get().scheduleRequestHandlerAfterCurrent(new ResourceRequestHandler(byteArrayResource,null)); inside of excell file there is no mistake, it writes successfully on file. But I just have problem while opening excell file on first click. It gives error as "corrupted file". I guess I am clear. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4623444.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
So Mr Grigorev, Byte array causes problem? is there an alternative way to respond workbook ? of converting it to file, or sth else? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4622835.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
it works! I export data to excell file, browser downloads excell file, but when I want to open excel file, it gives error as "corrupt in file" and doesnt open file, but I reopen file by the help. (as you can guess with the help of excell, corrupted files from left bar) I can say that FileoutputStream does work well, coz I can get excel file to my local without using RequestCycle. When I want to get file with RequestCycle via onclick property, I started to get error on excel file. But I have to output excel file with onclick , I dont need excell file on my local, client should get it :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620633.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
Mr. Grigorov, Any idea? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620558.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
well, if you say so, we have problem :) I use FileOutputStream while generating excel file. For last hope I write my logic below here, onClick(){ HSSFWorkbook hwb; FileOutputStream fileOut; hwb.write(fileOut); byte[] bai = hwb.getBytes(); ByteArrayResource byteArrayResource = new ByteArrayResource("application/vnd.ms-excel", bai, "ayrint.xls"); RequestCycle.get().scheduleRequestHandlerAfterCurrent(new ResourceRequestHandler(byteArrayResource, null)); } Do you have any extra idea? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620360.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
Hi there, I am almost handled my problem but. I have annoying problem with excel. I get excell output file via ByteArrayResource byteArrayResource = new ByteArrayResource("application/vnd.ms-excel", bai, "ayrint.xls"); RequestCycle.get().scheduleRequestHandlerAfterCurrent(new ResourceRequestHandler(byteArrayResource, null)); when I try to open excell file, it gives error as "errors on file" and doesnt open, Do I have to add some more attributes in some functions or I do mistakes while generating excell file? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620321.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
Mr Grigorov, I would like to ask one last thing. I handled generating excell workbook, and laoding all mass of data to excell file, Ijust need helf about posting back that excell file via onclick method. I have excell file as, HSSFWorkbook hwb=new HSSFWorkbook(); and I need to bind that excell file to onclick method? Do you have any idea? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4617334.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
?? Any idea? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4616938.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
I aggree that, loading to page after optimum number of records stucks page, I dont have problem with less than 5000 records listviews, So there should be a way to export all massive number of records via excell file, By exporting with excell, I dont need to load page, Do you think I can use a tricky way for exporting data via excel without using wicket components, lean java? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4616922.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
Hi Martin, First of all thanks for your reply, Actually my main problem is listing all 90.000 records on webpage, loading aListview from resultset takes so long time, and it stucks while webpage is adding component to itself. I wanted to avioid adding listwiew object if number of records are bigger than optimum number of records ( it is around 5.000) and export directly via excell for not freezing webpage. It s quite messy isnt it? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4616896.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
Let me give an example, I have a resultset with 90.000 records, after onclick. it stucks on page and doesnt post excel file. I know it stucks on loading from listview to excell file, but there must be a better to way fasten it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4616832.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Tab onclick behaviour.
Hello everyone, I an new on wicket. And I am stucked!!! I have a tabbed page. and I want to implement for each tab different behaviour from database acording to onClick of each tab. here you can see markup. - < div wicket:id="tabs"> #tabs-1 Tab1 #tabs-2 Tab2 .. . < /div> and here code. -- TabsWebMarkupContainer tab; tab = new TabsWebMarkupContainer("tabs"); tab.setOutputMarkupId(true); tab.add(new Link("first") { @Override public void onClick() { System.out.println("first tab"); } }); Homeform.add(tab); What is wrong with that code. It should output on console "first tab" when I click first tab isnt it?? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Tab-onclick-behaviour-tp4573620p4573620.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org