Hi all, I am trying to upload an image and show it right away in a table. Problem is that the when the table is painted after the upload the table size is only 1 row (tblPics.setPageLength(0)). If the image is larger there will be a scrollbar.
I’m using ThemeResource for showing the image and it’s pointing to a servlet which loads the image using an image id. There might be a better way but this is what I managed to make partially work.
Funny part of the story is that if I do it following way (static file id) the table is resized correctly:
pic.setSource(new ThemeResource("../../../" + DocumentUI.url+"?fileId=9026&Action=open"));
If I use a variable to hold the fileId table doesn’t get resized, the length is 1 row and there is a scrollbar to view the whole image:
pic.setSource(new ThemeResource("../../../" + DocumentUI.url+"?fileId=" + fileId + "&Action=open"));
Any suggestions are highly appreciated
Edit: looks like the code blocks above behave exactly like the table. What am I doing wrong? The 2nd code block looks like this: pic.setSource(new ThemeResource(“…/…/…/” + DocumentUI.url+“?fileId=” + fileId + “&Action=open”));