我想实现创纪录的详细信息页面,用户可以调用使用URL,如:最好的方法检查是否存在记录编辑器中的形式
http://somewhere.foo/detail.jsf?recordId=1
现在,如果使用指定的identfier可以记录被发现时,应该显示实际的编辑页面,如果找不到,应该显示错误页面。
使用JSF 2.0和Facelets实现这种行为的最佳方式是什么?
我想到了这样的事情(在伪代码):
detail.xhtml
<if #{!recordBean.recordFound}>
<ui:include detailNotFound.xhtml>
<else>
... show regular edit form here ...
<endif>
是更好或 “比较认可” 这样做的方法?