Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 78543 invoked from network); 30 Sep 2005 09:28:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Sep 2005 09:28:24 -0000 Received: (qmail 60200 invoked by uid 500); 30 Sep 2005 09:28:21 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 60162 invoked by uid 500); 30 Sep 2005 09:28:21 -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 60151 invoked by uid 99); 30 Sep 2005 09:28:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Sep 2005 02:28:20 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [17.250.248.97] (HELO smtpout.mac.com) (17.250.248.97) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Sep 2005 02:28:23 -0700 Received: from mac.com (smtpin04-en2 [10.13.10.149]) by smtpout.mac.com (Xserve/8.12.11/smtpout06/MantshX 4.0) with ESMTP id j8U9RuZr014949 for ; Fri, 30 Sep 2005 02:27:56 -0700 (PDT) Received: from [10.0.1.205] (d51a580f3.access.telenet.be [81.165.128.243]) (authenticated bits=0) by mac.com (Xserve/smtpin01/MantshX 4.0) with ESMTP id j8U9RsVT028809 for ; Fri, 30 Sep 2005 02:27:55 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v622) In-Reply-To: <20050930091635.28D8213409E@h8180.serverkompetenz.net> References: <20050930091635.28D8213409E@h8180.serverkompetenz.net> Content-Type: multipart/alternative; boundary=Apple-Mail-24--558581355 Message-Id: <4b194fd085e874de788cde282d7ba4d3@mac.com> X-Mailer: Apple Mail (2.622) From: "ir. ing. Jan Dockx" Subject: Re: General question about Action Listener Date: Fri, 30 Sep 2005 11:27:53 +0200 To: MyFaces Discussion X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Apple-Mail-24--558581355 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Because this is general code, and the rest of the world doesn't know about your book-ID. But in essence, you're right. This is a major (performance and stability related) issue with JSF: too much stuff going on that is often not needed. And the problem is far more severe than you state now: just keep on studying :-). At this time, you have to choose: live with it, and enjoy the benefits of JSF that do exist; or go for more optimal, less complex code, and do it proprietary. Maybe Struts is an option for you: it has similar issues, but is a lot less intrusive than JSF. One last point: you could use outputLink instead of commandLink/Button to trigger an action on another URL than the page-of-origin, but this actually defies JSF. On 30 Sep 2005, at 11:16, Matthias Klein wrote: I just read http://www.laliluna.de/first-java-server-faces-tutorial.html > > and don't understand one thing: > > All action listener methods access the session. Why? > > Take a look at the "deleteBook" method, for instance. Instead of > passing the > book-ID direktly, its parameter is an event. Why? > > I mean, could the listBooks.jsp not simply pass the Book-ID as > parameter to > the method so that the parameter of deleteBook would be ID instead of > event? > > Why is it necessary to access the session in every action listener and > pass > them events instead of IDs? > > Thanks > > Matt > > Met vriendelijke groeten, Jan Dockx PeopleWare NV - Head Office Cdt.Weynsstraat 85 B-2660 Hoboken Tel: +32 3 448.33.38 Fax: +32 3 448.32.66 PeopleWare NV - Branch Office Geel Kleinhoefstraat 5 B-2440 Geel Tel: +32 14 57.00.90 Fax: +32 14 58.13.25 http://www.peopleware.be/ http://www.mobileware.be/ --Apple-Mail-24--558581355 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=US-ASCII Because this is general code, and the rest of the world doesn't know about your book-ID. But in essence, you're right. This is a major (performance and stability related) issue with JSF: too much stuff going on that is often not needed. And the problem is far more severe than you state now: just keep on studying :-). At this time, you have to choose: live with it, and enjoy the benefits of JSF that do exist; or go for more optimal, less complex code, and do it proprietary. Maybe Struts is an option for you: it has similar issues, but is a lot less intrusive than JSF. One last point: you could use outputLink instead of commandLink/Button to trigger an action on another URL than the page-of-origin, but this actually defies JSF. On 30 Sep 2005, at 11:16, Matthias Klein wrote: I just read http://www.laliluna.de/first-java-server-faces-tutorial.html and don't understand one thing: All action listener methods access the session. Why? Take a look at the "deleteBook" method, for instance. Instead of passing the book-ID direktly, its parameter is an event. Why? I mean, could the listBooks.jsp not simply pass the Book-ID as parameter to the method so that the parameter of deleteBook would be ID instead of event? Why is it necessary to access the session in every action listener and pass them events instead of IDs? Thanks Matt VerdanaMet vriendelijke groeten, Jan Dockx 0000,8080,0000 PeopleWare NV - Head Office Cdt.Weynsstraat 85 B-2660 Hoboken Tel: +32 3 448.33.38 Fax: +32 3 448.32.66 Times Verdana0000,8080,0000 PeopleWare NV - Branch Office Geel Kleinhoefstraat 5 B-2440 Geel Tel: +32 14 57.00.90 Fax: +32 14 58.13.25Times Verdana0000,0000,FFFF http://www.peopleware.be/ http://www.mobileware.be/ --Apple-Mail-24--558581355--