ice:outputResource is called on rendering AND click
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
ice:outputResource is called on rendering AND click  XML
Forum Index -> Components
Author Message
sargue

Joined: 10/08/2009 00:00:00
Messages: 3
Offline


Hi there,

I think perhaps I'm not currently using this component apropiately. My intention is to generate a file for download. I've used this:

<ice:outputResource attachment="true" styleClass="botoimprimir" renderedOnUserRole="DISTRIBUCIO"
label="#{lit.exportarExcel}" shared="false" fileName="informeAnual.csv"
resource="#{informes.informeAnualCsv}"
rendered="#{!empty(informes.informeAnual.linies)}"/>

It works. But as I have a log on the method getInformeAnualCsv from the 'informes' backing bean I can see that the method is invoked also on each rendering which includes navigation on a table that is shown in the page. Which of course is quite a waste of CPU.

What I'm doing wrong?

Thanks!
radu.jakab

Joined: 31/10/2007 00:00:00
Messages: 240
Offline


Hi,
Try placing some partialSubmit="true" on some of those components that have nothing to do with your file. This is not 100% certain.

What you can also do is cache the .csv file so you don't have to generate it every time, but this still leaves the waste of bandwidth of sending it more than once...

Regards,
Radu
sargue

Joined: 10/08/2009 00:00:00
Messages: 3
Offline


Thanks for the answer. Sorry for the late response. Working on the issue but not prioritary right now. Will post any news. Thanks!
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team