Foros de discusión

Issue with aui:form

Martin Phee, modificado hace 12 años.

Issue with aui:form

Junior Member Mensajes: 25 Fecha de incorporación: 9/05/11 Mensajes recientes
Having an issue with a portlet. I'm using the aui:form tag and getting this exception.

javax.el.ELException: Cannot convert http://localhost:8080/web/ula.... of type class java.lang.String to interface javax.portlet.PortletURL
at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:434)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188)

And the compiled JSP. Has anyone seem this before? I can't figure out what's going on. As best as I can tell I'm using the correct util-taglib.jar for 6.0.6.


PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  aui:form
    com.liferay.taglib.aui.FormTag _jspx_th_aui_005fform_005f0 = (com.liferay.taglib.aui.FormTag) _005fjspx_005ftagPool_005faui_005fform_0026_005fmethod_005fclass_005faction.get(com.liferay.taglib.aui.FormTag.class);
    _jspx_th_aui_005fform_005f0.setPageContext(_jspx_page_context);
    _jspx_th_aui_005fform_005f0.setParent(null);
    // /WEB-INF/jsp/carousel/edit.jsp(17,8) name = action type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_aui_005fform_005f0.setAction((javax.portlet.PortletURL) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${actionUrl}", javax.portlet.PortletURL.class, (PageContext)_jspx_page_context, null, false));
    // /WEB-INF/jsp/carousel/edit.jsp(17,8) null
    _jspx_th_aui_005fform_005f0.setDynamicAttribute(null, "class", new String("slide-form"));
    // /WEB-INF/jsp/carousel/edit.jsp(17,8) null
    _jspx_th_aui_005fform_005f0.setDynamicAttribute(null, "method", new String("POST"));
    int _jspx_eval_aui_005fform_005f0 = _jspx_th_aui_005fform_005f0.doStartTag();
Martin Phee, modificado hace 12 años.

RE: Issue with aui:form

Junior Member Mensajes: 25 Fecha de incorporación: 9/05/11 Mensajes recientes
Seems to be a problem with JRebel. Not sure what it is because it's only happening in one evironment.
thumbnail
Andres Luuk, modificado hace 12 años.

RE: Issue with aui:form

New Member Mensajes: 11 Fecha de incorporación: 19/12/11 Mensajes recientes
This issue comes from com.liferay.taglib.aui.FormTag what has 2 setAction methods and no getAction methods in Liferay 6.0.6.
Now when jsp-s are compiled, the JSP compiler takes the type from last method with the name setAction from reflection. Because the method names from reflection come in a undetermined order, sometimes it finds the wrong method.
I looked into the Liferay source code and in Liferay 6.1 this bug should be fixed.
thumbnail
Loïc Dumont, modificado hace 12 años.

RE: Issue with aui:form

Junior Member Mensajes: 43 Fecha de incorporación: 27/04/10 Mensajes recientes
Same probleme here, but only on windows setup, on my linux there is no problem (Liferay 6.0.5).

I guess there is a possible workaround?
Martin Phee, modificado hace 12 años.

RE: Issue with aui:form

Junior Member Mensajes: 25 Fecha de incorporación: 9/05/11 Mensajes recientes
Yes, instead of using the string value use the object value. It should then work.

<liferay-portlet:actionURL portletConfiguration="true" var="configurationURL" varImpl="confirgurationUrl" />
thumbnail
Loïc Dumont, modificado hace 12 años.

RE: Issue with aui:form

Junior Member Mensajes: 43 Fecha de incorporación: 27/04/10 Mensajes recientes
Thanks, it's working!

My other workaround was to use scriplets, but I wasn't very happy about this.