Foros de discusión

Resource export and filename

antonio perez, modificado hace 9 años.

Resource export and filename

New Member Mensajes: 15 Fecha de incorporación: 7/02/13 Mensajes recientes
Hi,

I have been looking the example jsf2-export-pdf-portlet but I have not seen how to change the file name.

Can someone help me, please?
thumbnail
Juan Gonzalez, modificado hace 9 años.

RE: Resource export and filename

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
Gaël Paruta, modificado hace 9 años.

RE: Resource export and filename

New Member Mensajes: 13 Fecha de incorporación: 5/05/14 Mensajes recientes
Hi,

@Override
public Map<String, String> getResponseHeaders() {
Map<String, String> map = new HashMap<String, String>();
map.put("Content-Disposition","attachment;filename="+ YOURFILENAME+"."+YOURFILEEXTENSION);
return map;
}
antonio perez, modificado hace 9 años.

RE: Resource export and filename

New Member Mensajes: 15 Fecha de incorporación: 7/02/13 Mensajes recientes
It's what I needed. thank you very much.