This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image

 
Dura Hurtado
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, this line of code <p:fileDownload value="org.primefaces.model.DefaultStreamedContent@16b122e" />

shows the next error;

java.lang.ClassCastException: java.lang.String cannot be cast to org.primefaces.model.StreamedContent
at org.primefaces.component.filedownload.FileDownloadActionListener.processAction(FileDownloadActionListener.java:50)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)

┬┐Any clue?

Thanks
 
Paul Clapham
Sheriff
Posts: 20713
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a String. You can't put a String there, you have to put something which is of the org.primefaces.model.StreamedContent type. That's what the error message says.

So don't put a String there. Put a StreamedContent thing there.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic