How to after post make an redirect with params in JSF2??
-
03-06-2023 - |
質問
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? ;(
正しい解決策はありません
所属していません StackOverflow