Foren

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

Sumesh PK, geändert vor 8 Jahren.

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

New Member Beiträge: 5 Beitrittsdatum: 30.11.15 Neueste Beiträge
I am facing an issue with the liferay-ui:input-editor component. I am using liferay faces, and have a configuration.jsp (In which one liferay-ui:input-editor is there) for portlet configuration. I am getting the below error when I open the configuration and input editor is not getting displayed. It seems the issue is with this particular component, as liferay-ui:success works perfectly in the same page. Any help is much appreciated.

java.lang.NullPointerException
        at jsp_servlet._html._js._editor.__ckeditor._jspService(__ckeditor.java:827)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:588)
        at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:481)
        at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:55)
        at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
        at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
        at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:295)
        at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192)

In generated __ckeditor.java the line 827 points to,
doAsGroupId = (Long)request.getAttribute("liferay-ui:input-editor:groupId");
thumbnail
Kyle Joseph Stiemann, geändert vor 8 Jahren.

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

Liferay Master Beiträge: 760 Beitrittsdatum: 14.01.13 Neueste Beiträge
Hi Sumesh,
Your stacktrace doesn't show any Liferay Faces classes. Are you sure that you are using Liferay Faces? It seems like you may be using the liferay-ui:input-editor JSP tag. Also, there is no liferay-ui:success in Liferay Faces which makes me think that you are using the non-Faces liferay-ui:success JSP tag.

- Kyle
Sumesh PK, geändert vor 8 Jahren.

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

New Member Beiträge: 5 Beitrittsdatum: 30.11.15 Neueste Beiträge
Kyle Joseph Stiemann:
Hi Sumesh,
Your stacktrace doesn't show any Liferay Faces classes. Are you sure that you are using Liferay Faces? It seems like you may be using the liferay-ui:input-editor JSP tag. Also, there is no liferay-ui:success in Liferay Faces which makes me think that you are using the non-Faces liferay-ui:success JSP tag.

- Kyle


Thanks Kyle for the reply. What I meant is ours is faces project, but I have a configuration.jsp for configuration, and hence we are using jsp tags in that.
I am new to liferay portlets, so I am not sure whether I can use the faces tags inside configuration instead of jsp tags
thumbnail
Kyle Joseph Stiemann, geändert vor 8 Jahren.

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

Liferay Master Beiträge: 760 Beitrittsdatum: 14.01.13 Neueste Beiträge
Hi Sumesh,
I cannot reproduce your error, are you using Liferay Faces 3.2.5-ga6? If not, please try upgrading. If you are using Liferay Faces 3.2.5-ga6, then please post your code.

Also, here is the code that I used to test this feature:

configuration.jsp:

asdf

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>

<liferay-ui:success key="success" message="Greeting saved successfully!" />

<liferay-ui:input-editor name="descriptionEditor" toolbarSet="liferay-article" initMethod="initEditor" width="200" />
<script type="text/javascript">
function <portlet:namespace />initEditor() { return "asdf"; }
</script>


ConfigurationActionImpl.java:

public class ConfigurationActionImpl implements ConfigurationAction {

@Override
public void processAction(PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
}

@Override
public String render(PortletConfig portletConfig, RenderRequest renderRequest, RenderResponse renderResponse) throws Exception {
SessionMessages.add(renderRequest, "success");
return "/WEB-INF/views/configuration.jsp";
}
}


- Kyle
Sumesh PK, geändert vor 8 Jahren.

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

New Member Beiträge: 5 Beitrittsdatum: 30.11.15 Neueste Beiträge
Hi Kyle,
I am using liferay-portal-6.2-ce-ga4

I used the code which you have pasted, but the same issue happens.

This is happening only when I am deploying all the portlets bundled as an EAR. If I deploy my portlet using liferay auto deployment everything works fine.

I tried removing all other modules except this one from ear, but the issue is still there. So I strongly believe it could be something to do with the tlds generated during processing.

We are adding the dependency to the ear pom.xml as below,

<dependency>
			<groupid></groupid>
			<artifactid></artifactid>
			<version>${project.parent.version}</version>
			<classifier>processed</classifier>
			<type>war</type>
		</dependency>

If I check the processed war file's tld directory I can see the below,

<taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd">
	<tlib-version>1.0</tlib-version>
	<short-name>liferay-ui</short-name>
	<uri>http://liferay.com/tld/ui</uri></taglib>


I am really running out of ideas, any help would be much appreciated.
thumbnail
Kyle Joseph Stiemann, geändert vor 8 Jahren.

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

Liferay Master Beiträge: 760 Beitrittsdatum: 14.01.13 Neueste Beiträge
Sumesh PK:
I am using liferay-portal-6.2-ce-ga4

Thanks Sumesh, but I need to know your version of Liferay Faces not Liferay Portal. You should be using Liferay Faces GA6.

- Kyle
Sumesh PK, geändert vor 8 Jahren.

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

New Member Beiträge: 5 Beitrittsdatum: 30.11.15 Neueste Beiträge
Kyle Joseph Stiemann:
Sumesh PK:
I am using liferay-portal-6.2-ce-ga4

Thanks Sumesh, but I need to know your version of Liferay Faces not Liferay Portal. You should be using Liferay Faces GA6.

- Kyle

Hi Kyle,
Liferay faces version is 3.2.4-ga5
Sumesh PK, geändert vor 8 Jahren.

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

New Member Beiträge: 5 Beitrittsdatum: 30.11.15 Neueste Beiträge
Kyle Joseph Stiemann:

Thanks Sumesh, but I need to know your version of Liferay Faces not Liferay Portal. You should be using Liferay Faces GA6.

- Kyle

Tried with 3.2.5-ga6, didn't work either. emoticon
thumbnail
Neil Griffin, geändert vor 8 Jahren.

RE: liferay-ui:input-editor tag not working in liferay-faces-portal-3.1.0-B

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Sumesh PK:
This is happening only when I am deploying all the portlets bundled as an EAR. If I deploy my portlet using liferay auto deployment everything works fine.

The Liferay auto deployment feature will add/modify settings in the WEB-INF/web.xml descriptor in order to make WAR deployment successful. When you deploy as an EAR, you will be missing this step.