掲示板

Primefaces ImageCropper and FileUpload

7年前 に Odysseas Doumas によって更新されました。

Primefaces ImageCropper and FileUpload

New Member 投稿: 17 参加年月日: 16/06/22 最新の投稿
I need to implement a custom portlet using primefaces where someone can upload an image, crop it and then save it.

For the upload part i save the (temporary) image using TempFileUtil.

fileEntry = TempFileUtil.addTempFile(groupId, userId, fileName, tempFolderName, inputStream, mimeType);


Can someone explain to me what value should i use inside the "image" attribute of the primefaces ImageCropper . I tried using :

String previewURL = DLUtil.getPreviewURL(fileEntry, fileVersion, 
						themeDisplay, queryString, appendVersion, absoluteURL);
but of course it didn't work. i can succesfully use this URL to view my image, but ImageCropper always returns a java null error. Has someone else used ImageCropper to give me a hint?
thumbnail
7年前 に Kyle Joseph Stiemann によって更新されました。

RE: Primefaces ImageCropper and FileUpload

Liferay Master 投稿: 760 参加年月日: 13/01/14 最新の投稿
Hi Odysseas,
Which version of Primefaces are you using? p:imageCropper was broken in portlets until PrimeFaces 6.0 due to Primefaces Issue 1248.

- Kyle
7年前 に Odysseas Doumas によって更新されました。

RE: Primefaces ImageCropper and FileUpload

New Member 投稿: 17 参加年月日: 16/06/22 最新の投稿
Kyle Joseph Stiemann:
Hi Odysseas,
Which version of Primefaces are you using? p:imageCropper was broken in portlets until PrimeFaces 6.0 due to Primefaces Issue 1248.

- Kyle

First of all, thank you for the quick response.

I am sorry for wasting your time, i didn't correctly set the initial coordinates which resulted to a null exception. Feel free to delete this thread.
thumbnail
7年前 に Kyle Joseph Stiemann によって更新されました。

RE: Primefaces ImageCropper and FileUpload

Liferay Master 投稿: 760 参加年月日: 13/01/14 最新の投稿
No time wasted emoticon Thanks for posting your solution! Perhaps it will help other p:imageCropper users if they see a similar error.

Thanks for using Liferay Faces!

- Kyle