Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
EDISON ROMERO
BaseURLEncodedStringImpl
February 4, 2013 7:40 AM
Answer

EDISON ROMERO

Rank: New Member

Posts: 5

Join Date: October 22, 2012

Recent Posts

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.
Neil Griffin
RE: BaseURLEncodedStringImpl
February 4, 2013 11:42 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2145

Join Date: July 26, 2005

Recent Posts

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
RE: BaseURLEncodedStringImpl
February 5, 2013 12:31 PM
Answer

EDISON ROMERO

Rank: New Member

Posts: 5

Join Date: October 22, 2012

Recent Posts

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
Neil Griffin
RE: BaseURLEncodedStringImpl
February 25, 2013 10:33 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2145

Join Date: July 26, 2005

Recent Posts

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:

1
2 <p:submenu label="Navigations"> 
3            <p:menuitem value="External" url="http://www.primefaces.org" icon="ui-icon-home"/> 
4            <p:menuitem value="Internal" outcome="/mobile/index" icon="ui-icon-star"/> 
5</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.