Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Ajax calls are not working on server startup for JSF 2.2 portlets
Greetings,
Ajax calls to backend are not working after restarting the server (wildfly) and accessing the portlet.
Steps to reproduce:
1. Find the attached .war file and deploy it on a running
server.
2. Input random text in the text box and click on Show
Message button.
3. Note that the button click is working along
with the new response.
4. Now restart the server without
clearing any cache.
5. Navigate to the required portlet
page.
6. Enter random text in the text box and click on Show
Message button.
7. Note that the clicks is not working not and
it is not hitting the bean.
Also , Attached are the errors response message screenshot shown when button click is being hit after restarting the server along with the portlet source code and .war file.
Attachments:
Hi Aliasgar,
It seems like the JSF implementation bundled with
Wildfly is detecting the bean validation implementation that is also
bundled with Wildfly. However, the JSF implementation that is bundled
with Wildfly should have no effect on your app, so this seems like a
bug in Liferay Portal. I’m working on creating a reproducer and a
ticket for it, but for now you can work around the problem by adding
the following to your
web.xml
file:
<context-<span class="hljs-built_in">param</span>>
<<span class="hljs-built_in">param</span>-name>javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR</<span class="hljs-built_in">param</span>-name>
<<span class="hljs-built_in">param</span>-<span class="hljs-built_in">value</span>><span class="hljs-constant">true</span></<span class="hljs-built_in">param</span>-<span class="hljs-built_in">value</span>>
</context-<span class="hljs-built_in">param</span>>
- Kyle
Hi Aliasgar,
I opened a ticket for your issue here: https://issues.liferay.com/browse/LPS-84428. Please
let me know if the work around works for you.
- Kyle
Powered by Liferay™