Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 81177 invoked from network); 15 Dec 2005 20:13:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Dec 2005 20:13:29 -0000 Received: (qmail 52577 invoked by uid 500); 15 Dec 2005 20:13:23 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 52423 invoked by uid 500); 15 Dec 2005 20:13:22 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 52393 invoked by uid 99); 15 Dec 2005 20:13:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2005 12:13:22 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gcjmu-myfaces-user@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2005 12:13:20 -0800 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EmzQK-0007yd-9D for users@myfaces.apache.org; Thu, 15 Dec 2005 21:09:56 +0100 Received: from 62-99-150-203.static.adsl-line.inode.at ([62.99.150.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Dec 2005 21:09:56 +0100 Received: from werpu by 62-99-150-203.static.adsl-line.inode.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Dec 2005 21:09:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: users@myfaces.apache.org From: Werner Punz Subject: Re: JBoss Seam & JSF Date: Thu, 15 Dec 2005 21:05:39 +0100 Lines: 131 Message-ID: References: <43A123BD.3010403@idra-spa.it> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 62-99-150-203.static.adsl-line.inode.at User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en In-Reply-To: <43A123BD.3010403@idra-spa.it> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Nicola Benaglia wrote: > Hi ! > I am experimenting this application framework that unifies the component > models of JSF and EJB 3.0. > I'd like to know if any of you is also experimenting it and know his/her > impressions. > Ok thanks to the message that the bug which stopped me was fixed I started anew with a small testprogram, a simple blogger. Well to sum it app, the full application logic was around 100 locs and only having a partial understanding of ejb3 and seam it took me an hour to get the app infrastructure to the point so that I could develop and another hour to write the thing from scratch. I have a working non ejb version up and running now, embedded into the booking example. The coding was very straightforward and very clean, no explicit transactional logic and no session handling, all done by Seam. The linking between commandLinks within the table and the model-controller code was done automatically. One bug encountered, the semi automated linking between a table and the model-controller code only works on the datatable, but refuses to work on the tableList from tomahawk. here is the core code: @Scope(SESSION) @Name("blogbackend") public class BlogBackend implements Serializable { String blogTitle; String blogContent; @In(create = true) private Session bookingDatabase; @DataModel private List blogs; @DataModelSelectionIndex int blogIndex = 0; /** * */ private static final long serialVersionUID = 1L; BlogBackend() { } public String newBlog() { this.setBlogTitle(""); this.setBlogContent(""); blogIndex = -1; return "blogdetail"; } public String addBlog() { if(blogIndex == -1 || blogs.size() == 0) { Blog blog = new Blog(); blog.setTitle(blogTitle); blog.setContent(blogContent); bookingDatabase.persist(blog); blogIndex = 0; refresh(); } else { Blog blog = blogs.get(blogIndex); blog.setTitle(blogTitle); blog.setContent(blogContent); bookingDatabase.update(blog); refresh(); } return "blogmaster"; } @Factory("blogs") public void refresh() { Query query = bookingDatabase.createQuery("from Blog where 1=1 order by id desc"); blogs = query.list(); if(blogs == null) blogs = new LinkedList(); } public String goDetail() { Blog detail = blogs.get(blogIndex); this.blogTitle = detail.getTitle(); this.blogContent = detail.getContent(); return "blogdetail"; } public String getBlogContent() { return blogContent; } public void setBlogContent(String blogContent) { this.blogContent = blogContent; } public String getBlogTitle() { return blogTitle; } public void setBlogTitle(String blogTitle) { this.blogTitle = blogTitle; } } Given the fact that 1/3rd either are comments or setters and getters the tightness of the code is pretty impressive.