Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
使用 JSF 2.0 提供的标准工具,CRUD 确实是小菜一碟:
@ViewScoped
bean 与
基本上已经足够了。这是一个代码示例,无耻地从这篇文章复制而来。Bean:
Page:
此外,Netbeans 有一些有用的向导来生成 CRUD基于数据模型的应用程序。
CRUD is indeed a piece of cake using JSF 2.0 provided standard facility: a
@ViewScoped
bean in combination with a<h:dataTable>
basically already suffices. Here's a code example which is shamelessly copied from this article.Bean:
Page:
Further, Netbeans has some useful wizards to genreate a CRUD application based on a datamodel.
JSF 2.0 本身。仅使用 JSF 就可以轻松完成 CRUD - 无需任何其他框架。您需要
@ManagedBean
注释)
,其中一个edit
链接/按钮,通过它可以设置托管 bean 中的当前行对象(使用action="#{bean.edit(currentRowObject)}"
)。 (在 JSF 1.2 中,这是通过
实现的)void
,不带参数)来处理操作@PostConstruct
最初加载数据。JSF 2.0 itself. CRUD is very easy to do with JSF alone - no need for any other framework. You need
@ManagedBean
)<h:dataTable>
with anedit
link/button, by which you set the current row object in the managed bean (usingaction="#{bean.edit(currentRowObject)}"
). (In JSF 1.2 this was achieved by<f:setPropertyActionListener>
)void
, with no arguments) to handle the operations@PostConstruct
to load the data initially.我创建这个是为了加快 jsf crud 应用程序创建过程: https://github.com/ignl/happyfacescrud< /a>
开箱即用的搜索、惰性数据表、查看/编辑、自定义组件可显着减少代码,当然也很灵活。
I created this one to speed up process of jsf crud application creation: https://github.com/ignl/happyfacescrud
Out of box search, lazy data table, viewing/editing, custom components that reduces code dramatically and of course flexible.
我发现这篇文章也很有用:
Java EE 6 中的会话 CRUD
http://www.andygibson.net/blog/tutorial/pattern-for-conversational-crud-in-java-ee-6/ 作者
<安迪·吉布森
I found this article useful as well:
Conversational CRUD in Java EE 6
http://www.andygibson.net/blog/tutorial/pattern-for-conversational-crud-in-java-ee-6/
By Andy Gibson
我遇到了与所描述的相同的问题:Creating as-fast-as-possible CRUD-App in JEE6。
美丽的生成器位于: http://sourceforge.net/projects/jbizmo/
定义后(图-编辑!)您的业务模型/域模型,JBizMo 创建数据库和整个 CRUD 应用程序开箱即用。
I had the same problem as described: Creating as-fast-as-possible CRUD-App in JEE6.
Beautiful Generator found at: http://sourceforge.net/projects/jbizmo/
After defining (Graph-Editor!) your Business-Model/Domain-Model, JBizMo creates the database and a whole CRUD-App out of the Box.
我找到了一个用于 JSF+Primefaces 的开源 CRUD 生成器
http://Minuteproject.wikispaces.com/Primefaces
而且它为大多数框架生成 CRUD http://Minuteproject.wikispaces.com/
I found an opensource crud generator for JSF+Primefaces
http://minuteproject.wikispaces.com/Primefaces
And also it generate crud for most of the frameworks http://minuteproject.wikispaces.com/