Foren

primefaces portlet

thumbnail
Fateh Alchhabi, geändert vor 11 Jahren.

primefaces portlet

Junior Member Beiträge: 58 Beitrittsdatum: 01.12.10 Neueste Beiträge
Hi all
I have liferay portal 6.0.5CE
and i want to develop primefaces portlet
i update my liferay puling and when i want to start my project to build jsf portlet it only accepted on SDK6.1
my problem is i want to develop my portlet on SDK6.0.x becouse of my running portal version
any help to tell me how


PS.i find in the demo for liferay Faces the same portlet done by 6.1.x and 6.0.x ?? how it happen if the plugin not accepted ?
thumbnail
Neil Griffin, geändert vor 11 Jahren.

RE: primefaces portlet (Antwort)

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
The Liferay 6.1.1 Plugins SDK has the following template projects:

plugins-sdk/tools/portlet_icefaces_tmpl
plugins-sdk/tools/portlet_jsf_tmpl
plugins-sdk/tools/portlet_liferay_faces_alloy_tmpl
plugins-sdk/tools/portlet_primefaces_tmpl
plugins-sdk/tools/portlet_richfaces_tmpl

But those template projects are not found in the Liferay 6.0.x Plugins SDK, because it was released a long time before the Liferay Faces project was announced. Liferay IDE is aware of this, and it prompts the developer with a warning if you try and create a JSF portlet from an older Plugins SDK.

You can still create PrimeFaces portlets on Liferay 6.0.x -- that's definitely supported.

I would recommend that you simply add the Liferay 6.1.1 Plugins SDK to Liferay IDE. But you would need to replace the following jars:

plugins-sdk/tools/portlet_liferay_faces_alloy_tmpl/docroot/WEB-INF/lib/liferay-faces-alloy-3.1.0-ga1.jar
plugins-sdk/tools/portlet_jsf_tmpl/docroot/WEB-INF/lib/liferay-faces-bridge-api-3.1.0-ga1.jar
plugins-sdk/tools/portlet_jsf_tmpl/docroot/WEB-INF/lib/liferay-faces-bridge-impl-3.1.0-ga1.jar
plugins-sdk/tools/portlet_jsf_tmpl/docroot/WEB-INF/lib/liferay-faces-portal-3.1.0-ga1.jar
plugins-sdk/tools/portlet_jsf_tmpl/docroot/WEB-INF/lib/liferay-faces-util-3.1.0-ga1.jar

Version 3.1.0-ga1 is designed for use with Liferay 6.1.x -- you would need to download version 3.0.0-ga1 of those jars and use them instead. You can find them in Maven Central.
thumbnail
Fateh Alchhabi, geändert vor 11 Jahren.

RE: primefaces portlet

Junior Member Beiträge: 58 Beitrittsdatum: 01.12.10 Neueste Beiträge
thanks alto Neil for your answer
could you plz provide the demo portlets with brief guide or pdf explained more about building portlets in liferay faces
Regareds
thumbnail
Neil Griffin, geändert vor 11 Jahren.

RE: primefaces portlet

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Hi Fateh,

There are a variety of different JSF demo portlets (including the primefaces3-portlet) available on the demos page. For the most part, developing portlets with PrimeFaces is pretty much the same thing as developing webapps. The documentation describes mosst of the features provided by the different Liferay Faces sub-projects (Alloy, Bridge, Portal, Util).

Kind Regards,

Neil
thumbnail
Fateh Alchhabi, geändert vor 11 Jahren.

RE: primefaces portlet

Junior Member Beiträge: 58 Beitrittsdatum: 01.12.10 Neueste Beiträge
Hi Again
i follow your advice and i develop my portlet on SDK6.1 to run it on EE SP2
but in my portlet i use method to upload file and add it in the document library
the method signature for this method in SDK6.0.5 is
public static DLFileEntry addFileEntry(long userId,
long groupId,
long folderId,
String name,
String title,
String description,
String changeLog,
String extraSettings,
byte[] bytes,
ServiceContext serviceContext)

but in the SDK6.1 i found this signature for this method as the follow
currentFile = DLFileEntryLocalServiceUtil.public static DLFileEntry addFileEntry(long userId,
long groupId,
long repositoryId,
long folderId,
String sourceFileName,
String mimeType,
String title,
String description,
String changeLog,
long fileEntryTypeId,
Map<String,Fields> fieldsMap,
File file,
InputStream is,
long size,
ServiceContext serviceContext)


my question is
1-if i fill the missing parameter and i deploy the portlet on the SKD6.1 it will works probably on the EE SP2 without problem even though the differences with parameter between the two versions of the SDK
2- and how did u develop all the kinds of the JSF2 portlets on your demo page (Which SDK version & IDE version) so its run on liferay6.0.X with full support for all kinds of JSF

PS. i do all this because i want to upgrade my portal and portlets from liferayCE_6.0.5 to Enterprise 6.0_SP2
thumbnail
Neil Griffin, geändert vor 11 Jahren.

RE: primefaces portlet

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Hi Fateh,

Liferay Faces demo portlets like the icefaces3-documents-portlet appear in several different Git branches:

Master Branch (Currently Liferay 6.2.x-SNAPSHOT)
https://github.com/liferay/liferay-faces/tree/master/demos/portal/icefaces3-documents-portlet

3.1.x Branch (Liferay 6.1.x)
https://github.com/liferay/liferay-faces/tree/3.1.x/demos/portal/icefaces3-documents-portlet

3.0.x Branch (Liferay 6.0.x)
https://github.com/liferay/liferay-faces/tree/3.0.x/demos/portal/icefaces3-documents-portlet

By having them in different branches, we are able to make sure that they compile with the corresponding version of Liferay Portal API.

I would recommend that you look at the 3.1.x branch version of DocLibBackingBean.java in order to see how to call DLFileEntryServiceUtil.addFileEntry(...).

Kind Regards,

Neil
ch ..M, geändert vor 11 Jahren.

RE: primefaces portlet

New Member Beiträge: 2 Beitrittsdatum: 28.03.13 Neueste Beiträge
Hello Mr Neil ,
if you can help me i want to ask you :
i have a binding primefaces menubar when i click on a meniitem i want to open a binding dialog without closing the other , i try in my boucle For to set a WidgetVar ("entit"+i)
and menuitem.setoncomplete(dialog.getWidgetVar()+".show()') but it's not working with one menu item click and one dialog it work fine but at this case it doesn't work
can you help me ??
thumbnail
Neil Griffin, geändert vor 11 Jahren.

RE: primefaces portlet

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
I would like to help, but the question is very PrimeFaces specific and I don't have an answer. I would recommend that you post a question in the PrimeFaces forum.