Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
EDISON ROMERO
BaseURLEncodedStringImpl
4 febbraio 2013 7.40
Risposta

EDISON ROMERO

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 22 ottobre 2012

Messaggi recenti

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
4 febbraio 2013 11.42
Risposta

Neil Griffin

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1993

Data di Iscrizione: 26 luglio 2005

Messaggi recenti

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
5 febbraio 2013 12.31
Risposta

EDISON ROMERO

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 22 ottobre 2012

Messaggi recenti

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
25 febbraio 2013 10.33
Risposta

Neil Griffin

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1993

Data di Iscrizione: 26 luglio 2005

Messaggi recenti

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.