Forums de discussion

Can I open Control Panel change user portrait popup from JSF 2 portlet?

thumbnail
Gerald Rubin, modifié il y a 11 années.

Can I open Control Panel change user portrait popup from JSF 2 portlet?

Junior Member Publications: 59 Date d'inscription: 23/10/11 Publications récentes
I'm using LR 6.1.0-ce-ga1 and ICEfaces 3.2. So far my whole site is built using xhtml pages. I have absolutely no experience with any other portlet mechanism (AUI?)

Can someone share some code with me so that I could pop up the aforementioned dialog on an h:commandLink click?

Thanks.
thumbnail
Neil Griffin, modifié il y a 11 années.

RE: Can I open Control Panel change user portrait popup from JSF 2 portlet?

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
I think that the icefaces3-users-portlet might be very close to what you need. Since you are using JSF/ICEfaces, I would recommend that you add the ace:fileEntry component to your view and then call the UserLocalServiceUtil.updatePortrait(long, byte[]) method in order to update the image in the Liferay database:
http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/UserLocalServiceUtil.html#updatePortrait(long, byte[])
For an example of how to use the ace:fileEntry component, you can look at the icefaces3-portlet demo.
thumbnail
Kyle Joseph Stiemann, modifié il y a 11 années.

RE: Can I open Control Panel change user portrait popup from JSF 2 portlet?

Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
Hi Gerald,
Just wanted to let you know, we have refactored the icefaces-user-portlet to have the upload portait/image feature in it. You can download the source code from the 3.1.x branch in github.

-Kyle
thumbnail
Gerald Rubin, modifié il y a 11 années.

RE: Can I open Control Panel change user portrait popup from JSF 2 portlet?

Junior Member Publications: 59 Date d'inscription: 23/10/11 Publications récentes
Kyle, thanks. Maybe this will help someone else. I've already implemented a JavaScript, Base64 character string-encoding, transmit with hidden textbox and hidden button method.