Navigation with MenuBar (2.2M1, JSF2)

UI Components for JSF
Post Reply
s.penelle
Posts: 1
Joined: 21 Oct 2010, 18:33

21 Oct 2010, 19:27

Hello,

I have a navigation problem with the menu bar. The problem is likely the same described in the following toping:

http://primefaces.prime.com.tr/forum/vi ... f=3&t=2278

I have seen that I can use the "url" attribute, but I want to use the "action string" defined in the faces-config.xml file.

See bellow an example of my problem:

faces-config

Code: Select all

    <navigation-rule>
        <from-view-id>*</from-view-id>

        <navigation-case>
            <from-outcome>dashboard</from-outcome>
            <to-view-id>/pages/dashboard/index.xhtml</to-view-id>
            <redirect/>
        </navigation-case>
    </navigation-rule>
Menu 1. Doesn't work

Code: Select all

<p:submenu>
	<f:facet name="label">
		<p:menuitem value="Dashboard" action="dashboard" />
	</f:facet>
</p:submenu>
Menu 2. Doesn't work

Code: Select all

<p:submenu>
	<f:facet name="label">
		<p:menuitem value="Dashboard" url="dashboard" />
	</f:facet>
</p:submenu>
Menu 3. Ok

Code: Select all

<p:submenu>
	<f:facet name="label">
		<p:menuitem value="Dashboard" url="/pages/dashboard/index.xhtml" />
	</f:facet>
</p:submenu>
Is it possible to use the "action string" with the menu bar :?: If yes, how can I do that ?

Thank for your Help 8-)

Sven

ElGringo
Posts: 13
Joined: 22 Oct 2010, 17:49

22 Oct 2010, 17:53

Hi,

I've the same problem too, it seems that Faces-Context navigation cases aren't reconized when we use action attribute.
Is there a problem or is there something that I misunderstood ?

Thanks in advance.

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

23 Oct 2010, 00:14

Menu 1 and 3 should have worked, you can create an issue ticket for us to look in detail to menu1 issue.

Baljinder
Posts: 1
Joined: 28 Nov 2010, 06:55

28 Nov 2010, 07:31

I had the same problem(2.2.RC2), this http://primefaces.prime.com.tr/forum/vi ... f=3&t=2337 solved my issue

My case was this

Code: Select all

  <p:menuitem value="Create"
		action="#{TestTable_Create_Transition['performTransition']}"
		update="contents" />
And I changed my navigation as follows :

Code: Select all

<from-view-id>*</from-view-id>
		<navigation-case>
			<from-outcome>TestTable_Create</from-outcome>
			<to-view-id>/views/ptesttable/create.xhtml</to-view-id>
			<redirect/>
		</navigation-case>

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests