问题:
JSF 如何读取request parameter
解决:
|
@Named("bean1") @RequestScoped public class Bean1 implements java.io.Serializable { @Inject HttpServletRequest req; ///.... // restoreView 时 orderList 需要 userId ,所以不能简单实用 viewParam public Long getUserId() { String s = req.getParameter("userId"); return Long.parseLong(s); } ///.... } |