Page 1 of 1

Navigation with MenuBar (2.2M1, JSF2)

Posted: 21 Oct 2010, 19:27
by s.penelle
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

Re: Navigation with MenuBar (2.2M1, JSF2)

Posted: 22 Oct 2010, 17:53
by ElGringo
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.

Re: Navigation with MenuBar (2.2M1, JSF2)

Posted: 23 Oct 2010, 00:14
by cagatay.civici
Menu 1 and 3 should have worked, you can create an issue ticket for us to look in detail to menu1 issue.

Re: Navigation with MenuBar (2.2M1, JSF2)

Posted: 28 Nov 2010, 07:31
by Baljinder
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>