Hello everyone.
I tried to implement navigation with seam like i saw in the project EDAS2, but when i change of page, the url shown by the navigator stays the same.
Here's a snippet of my menu bar :
<r:toolBar height="15px" itemSeparator="line">
<r:dropDownMenu>
<f:facet name="label">
<h:outputLabel value="Menu 1"/>
</f:facet>
<r:menuItem value="Sub menu 1" action="#{menuComponent.pageSubMenu1()}" />
</r:dropDownMenu>
</r:toolBar>
the menuComponent class :
@Startup
@Name("menuComponent")
@Scope(ScopeType.APPLICATION)
public class MenuComponent implements Serializable {
private static final long serialVersionUID = 8128421090145381974L;
public String pageSubMenu1() {
return "page1";
}
}
and i put my navigation rules in the file faces-config.xml
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-action>#{menuComponent.pageSubMenu1()}</from-action>
<from-outcome>page1</from-outcome>
<to-view-id>/pages/page1.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
So, with all that, i am in the page 'index.xhtml' where i click on the submenu1, i am redirected to the page 'page1.xhtml' but the url still shows 'index.xhtml'
What did i do wrong ?
Thanks