Question

I have this situation:

My model

public class Model {
    int id;
    String desc;
}

my managed bean with request scope

@Request
@ManagedBean(name = "bean")
public class ModelMB {

    Model model; // with getter/setter

    public void action(){
        dao.persistWithRefresh(model);
        return sucess;
    }
}

and my facesconfig with navigation cases

faces-config.xml

<navigation-rule>
    <from-view-id>/nutri/signin.xhtml</from-view-id>
    <navigation-case>
        <from-outcome>sucess</from-outcome>
        <to-view-id>/nutri/show.xhtml</to-view-id>
        <redirect include-view-params="true">
            <view-param>
                <name>id</name>
                <value>#{bean.model.id}</value>
            </view-param>
        </redirect>
    </navigation-case>
</navigation-rule>

but in page show.xhtml id param after post submit is empty.. WHY? ;(

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top