Reply To: Dynamic view ID not working.

Splash Forums PrettyFaces Users Dynamic view ID not working. Reply To: Dynamic view ID not working.



Sure Christian, if you where trying to address me for the pattern value.

Problem Dynamic view ID solved.

I guess the solution was to use the @ManagedBean(name=”loginBean”) annotation instead of @Named.
I’m sorry for not having this noted.

Anyway my bean was:

package navigation;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

 * @author peter

public class LoginBean implements Serializable{
    private String page;
    private String login;
    public void setPage(String page){;
    public String getPage(){
        return page;
    public void setLogin(String login){
    public String getLogin(){
        System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!LoginBean Called");
        return "/specifications/noordzij-it/frontend/pages/index.xhtml";

And my pretty-config.xml was:

 <url-mapping id="home">
		<pattern value="/" />
		<view-id value="#{loginBean.getLogin}" />

Works for me.

  • This reply was modified 6 years, 8 months ago by  Peter-TI.