• Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue with storing file name and content type using IBM's hx:fileupload in a datatable  RSS feed

Ajay Dhar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I use the hx:fileupload outside of a datatable I am able to store the file name and content type into my backing bean. However, when I put hx:fileupload components in a datatable the file name and content type are not stored, and they show up as null when I print them to the console.

Here is my JSF page:

Here is my backing bean (pagecode):

The reason I am keeping the fileupload components in a datatable is because there is a requirement to externalize in a properties file the number of fileupload components that are displayed. I have also externalized the accepted content types and combined max file size in properties files.

Currently I have 3 fileuploads displayed within the datatable and one outside the datatable for testing. When I try to upload the same text file in one of the uploads in the datatable and the one upload outside of the datatable I get the following print out in the console:

null null is 5 bytes and the content type is null.
C:\Users\dp0ad3\Desktop\TestUpload.txt text/plain

As you can see, the file name and content type for the upload component in the datatable are not stored, whereas this information for the upload component outside the datatable is.

Anyone know why I am seeing this behavior and/or how to work around it?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!