MenuBar URL link problem - adds faces to url again and again

UI Components for JSF
Post Reply
mustafa.karakaya
Posts: 5
Joined: 12 Jun 2009, 10:38

25 Sep 2009, 22:15

Hi,

I am using p:menubar with p:submenu and p:menuitem. som of these submenus and menuitems have url's that direct to different pages in the application. My faces servlet url pattern is /faces/*. When i click on any submenu or menuitem url, it adds the faces string to the url again and again. And the urls do not work after that. For example:

i start from the page:
http://localhost:8080/projwar/faces/index.jsp

after clicking to friends url it becomes:
http://localhost:8080/projwar/faces/faces/friends.jsp

after clicking to inbox url it becomes:
http://localhost:8080/projwar/faces/fac ... /inbox.jsp

how can i solve this problem. thanks in advance.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

26 Sep 2009, 00:54

Hi Mustafa,

Can you please post the code of your p:menubar so that I can try to replicate the issue. Thanks.

mustafa.karakaya
Posts: 5
Joined: 12 Jun 2009, 10:38

26 Sep 2009, 01:05

Code: Select all

<h:panelGrid columns="3" id="WELCOME_PANEL" rendered="#{session_beans$UserSessionBean.loggedIn}" style="width: 1000px; align: right;">
                <h:panelGrid id="MENUPANEL" style="width: 700px">
                    <p:menubar autoSubmenuDisplay="true" effect="NONE" id="mainMenuBar">
                        <p:submenu id="MENU_HOME" label="Home" url="faces/index.jsp"/>
                        <p:submenu id="MENU_X" label="X" url="faces/x.jsp">
                            <p:menuitem id="MI_X" label="X" url="faces/x.jsp"/>
                            <p:menuitem id="MI_LABEL" label="Label" url="faces/labelx.jsp"/>
                            <p:menuitem id="MI_ADD" label="Add" url="faces/addx.jsp"/>
                        </p:submenu>
                        <p:submenu id="MENU_FRIENDS" label="Friends" url="faces/friends.jsp">
                            <p:menuitem id="MI_MYFRIENDS" label="My Friends" url="faces/friends.jsp"/>
                        </p:submenu>
                        <p:submenu id="MENU_MESSAGES" label="Inbox" url="faces/messages.jsp">
                            <p:menuitem id="MI_INBOX" label="View Message Inbox" url="faces/messages.jsp"/>
                            <p:menuitem id="MI_SENTESSAGES" label="View Sent Messages" url="faces/sentmsg.jsp"/>
                            <p:menuitem id="MI_COMPOSE" label="Compose New Message" url="faces/compose.jsp"/>
                        </p:submenu>
                        <p:submenu id="MENU_PROFILE" label="Profile" url="faces/myprofile.jsp">
                            <p:menuitem id="MI_GENERALINFO" label="General Information" url="faces/myprofile.jsp"/>
                            <p:menuitem id="MI_CHANGEPASS" label="Change Password" url="faces/pchange.jsp"/>
                        </p:submenu>
                        <p:submenu id="MENU_SETTINGS" label="Settings" url="faces/settings.jsp"/>
                        <p:submenu id="MENU_SEARCH" label="Search" url="faces/search.jsp"/>
                        <p:submenu id="MENU_ADMIN" label="Admin Panel" url="faces/admin.jsp" rendered="#{session_beans$UserSessionBean.userBean.userAdmin}"/>
                    </p:menubar>
                </h:panelGrid>

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

27 Sep 2009, 13:49

Hi, try using *.jsf mapping instead of /faces/*.

mustafa.karakaya
Posts: 5
Joined: 12 Jun 2009, 10:38

29 Sep 2009, 23:02

that did not help unfortunately:(

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

30 Sep 2009, 01:28

That's strange, we're using this mapping and menubar component in our app with no problems. We don't have /faces/* though.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests