Foren

BaseURLEncodedStringImpl

EDISON ROMERO, geändert vor 11 Jahren.

BaseURLEncodedStringImpl

New Member Beiträge: 5 Beitrittsdatum: 22.10.12 Neueste Beiträge
Hi,

I have a menu in primefaces, and I use the attribute "url" to invoke other pages xhtml, but tells me the following error:

ERROR [BaseURLEncodedStringImpl:57] URL path must start with a / or include ://
java.lang.IllegalArgumentException: URL path must start with a '/' or include '://'


Someone who has solved this problem please.
thumbnail
Neil Griffin, geändert vor 11 Jahren.

RE: BaseURLEncodedStringImpl

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Hi Edison,

The PrimeFaces showcase shows many different menus. Which one are you using? When you get a chance, please post a code snippet of how you use the menu component.

Thanks,

Neil
EDISON ROMERO, geändert vor 11 Jahren.

RE: BaseURLEncodedStringImpl

New Member Beiträge: 5 Beitrittsdatum: 22.10.12 Neueste Beiträge
Hi Neil,

This is the menu:

==========================

<h:form id="formMenu">
<p:menu style="width: 100%">
<p:submenu label="#{etq['menu.usuario']}">
<p:menuitem id="menuNuevo" value="#{etq['menu.usuario.nuevo']}" icon="ui-icon-person" url="creacion-usuario.xhtml" />
<p:menuitem id="menuModifica" value="#{etq['menu.usuario.modifica']}" icon="ui-icon-document-b" url="modificacion-usuario.xhtml" />
<p:menuitem id="menuActiva" value="#{etq['menu.usuario.activa']}" icon="ui-icon-check" url="estado-usuario.xhtml"/>
<p:menuitem value="#{etq['menu.usuario.asignacion']}" icon="ui-icon-transferthick-e-w" url="asignaciones-perfiles.xhtml"/>
</p:submenu>
<p:submenu label="#{etq['menu.perfil']}">
<p:menuitem value="#{etq['menu.perfil.nuevo']}" icon="ui-icon-tag" url="perfil.xhtml" />
</p:submenu>
<p:submenu label="#{etq['menu.visualizar']}">
<p:menuitem value="#{etq['menu.visualizar.usuario']}" icon="ui-icon-person" url="ver-administradores.xhtml" />
<p:menuitem value="#{etq['menu.visualizar.perfiles']}" icon="ui-icon-tag" url="ver-perfiles.xhtml" />
</p:submenu>
</p:menu>
</h:form>


=====================

I use this menu in a web project and it works fine, but when transformed to liferay portlet shows the error BaseURLEncodedStringImpl


=====================

Thank you so much for your help about this topic, I really appreciate it
thumbnail
Neil Griffin, geändert vor 11 Jahren.

RE: BaseURLEncodedStringImpl

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
When I look at the PrimeFaces ShowCase for p:menu, it looks like the url attribute of p:menuItem component is designed to work with external URLs. In the showcase example, it has this:


 <p:submenu label="Navigations">  
            <p:menuitem value="External" url="http://www.primefaces.org" icon="ui-icon-home" />  
            <p:menuitem value="Internal" outcome="/mobile/index" icon="ui-icon-star" />  
</p:submenu>


But XHTML the code that you provided is trying to use the url attribute in an "internal" kind of way, rather than an "external" way. So I would recommend that you use the outcome attribute instead, as the showcase demonstrates for the internal use-case.