Primefaces 8 & Liferay 7.3Primefaces 8 & Liferay 7.3https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1205429712024-03-28T09:49:49Z2024-03-28T09:49:49ZPrimefaces 8 & Liferay 7.3Nhuan Luonghttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1205429702021-08-17T16:38:10Z2021-01-07T09:59:23Z<p>hi,</p>
<p>I'm developing portlets based on</p>
<ol>
<li>Liferay Portal CE 7.3</li>
<li>JSF 2.2 </li>
<li>Primefaces 8.0</li>
<li>com.liferay.faces.bridge.ext 6.1.0</li>
<li>com.liferay.faces.bridge.api / impl: 4.2.0</li>
<li>com.liferay.faces.portal 4.1.0</li>
<li>com.liferay.portal.kernel 9.12.2</li>
<li>com.liferay.faces.util 3.4.0</li></ol>
<p>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)</p>
<p>
<em>First of all, The JSF's problems (Primefaces) only happen when
deploying on Liferay</em></p>
<p>
<strong>Issue with Autocomplete.</strong>
<br /> When clicking on the button dropdown, nothing happens. No error
in the console</p>
<p>
<strong>The issue with SelectOneMenu.</strong>
<br /> Cannot submit a form with a null value:</p>
<p>I tried:</p>
<p><f:selectItem itemLabel="Select One"
itemValue="" /></p>
<p>or </p>
<p><f:selectItem itemLabel="" itemValue="#{null}"/></p>
<p>or </p>
<p><f:selectItem itemLabel="" itemValue="#{null}" noSelectionOption="true"/></p>
<p>console error:</p>
<pre>
<code class="language-java">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)</code></pre>
<p>
<a href="https://drive.google.com/file/d/1btsQrY7nbpQdIMmMfkHD-WwTP084USb9/view?usp=sharing">detail</a></p>
<p>but when use JSF selectOneMenu instead of Primefaces it works normally.</p>
<p>
<strong>How can I debug portlet use IntelliJ IDEA 2020.x x64?</strong></p>
<p>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).</p>
<pre>
<code class="language-java"><Context docBase="D:\web-dashboard\target\web-dashboard"
reloadable="true"
path="/web-dashboard"/></code></pre>
<p> </p>
<p>But in 7.3 in debug mode:</p>
<pre>
<code class="language-java">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)</code></pre>
<p>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?</p>
<p>I tried with Developer Studio but too hard to run many services serve
for portlets at the same time.</p>
<p>Thanks for your help or any suggestions.</p>
<p>