Message Boards

Primefaces 8 & Liferay 7.3

Nhuan Luong, modified 2 Years ago.

Primefaces 8 & Liferay 7.3

New Member Posts: 2 Join Date: 1/7/21 Recent Posts

​hi,

I'm developing portlets based on

  1. Liferay Portal CE 7.3
  2. JSF 2.2  
  3. Primefaces 8.0
  4. com.liferay.faces.bridge.ext 6.1.0
  5. com.liferay.faces.bridge.api / impl: 4.2.0
  6. com.liferay.faces.portal 4.1.0
  7. com.liferay.portal.kernel 9.12.2
  8. com.liferay.faces.util 3.4.0

I'm having trouble using autocomplete component with dropdown and selectOneMenu component and I don't how to debug portlet in IntelliJ IDEA 2020.x x64 (installed liferay plugin)

First of all, The JSF's problems (Primefaces) only happen when deploying on Liferay

Issue with Autocomplete.
When clicking on the button dropdown, nothing happens. No error in the console

The issue with SelectOneMenu.
Cannot submit a form with a null value:

I tried:

<f:selectItem itemLabel="Select One" itemValue="" />

or 

<f:selectItem itemLabel="" itemValue="#{null}"/>

or 

<f:selectItem itemLabel="" itemValue="#{null}" noSelectionOption="true"/>

console error:

09:55:30,132 ERROR [ExceptionHandlerBridgeImpl:78] java.lang.NullPointerException
javax.faces.FacesException: java.lang.NullPointerException
	at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:86)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
	at com.liferay.faces.bridge.internal.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:265)
	at com.liferay.faces.bridge.internal.BridgeImpl.doFacesRequest(BridgeImpl.java:175)
	at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:675)
	at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:146)

detail

but when use JSF selectOneMenu instead of Primefaces it works normally.

How can I debug portlet use IntelliJ IDEA 2020.x x64?

I used to Liferay Portal CE 6.2, easy debug portlet by deploy the .xml to Liferay's deploy folder and start JRebel (use Maven build tool).

<Context docBase="D:\web-dashboard\target\web-dashboard"
         reloadable="true"
         path="/web-dashboard"/>

 

But in 7.3 in debug mode:

SEVERE [main] com.sun.faces.config.ConfigureListener.contextInitialized Critical error during deployment: 
	com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/osgi/framework/BundleContext
		at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:764)

When I started Liferay not use debugging and deploy portlet by uploading portlet in Liferay's App Manager. Portlets work normally. How can I debug portlet? I know that JSF it's just a normal application and no need for an OSGi bundle. What am I wrong?

I tried with Developer Studio but too hard to run many services serve for portlets at the same time.

Thanks for your help or any suggestions.