Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 16806 invoked from network); 12 Jul 2005 19:58:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Jul 2005 19:58:48 -0000 Received: (qmail 3816 invoked by uid 500); 12 Jul 2005 19:58:47 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 3778 invoked by uid 500); 12 Jul 2005 19:58:46 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 3765 invoked by uid 99); 12 Jul 2005 19:58:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jul 2005 12:58:46 -0700 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-dev@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; Tue, 12 Jul 2005 12:58:44 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DsQt0-0006gu-GB for dev@myfaces.apache.org; Tue, 12 Jul 2005 21:57:46 +0200 Received: from finn.gmane.org ([80.91.229.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Jul 2005 21:57:46 +0200 Received: from werpu by finn.gmane.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Jul 2005 21:57:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@myfaces.apache.org From: Werner Punz Subject: Re: Ajax (back end) Date: Tue, 12 Jul 2005 21:56:40 +0200 Lines: 67 Message-ID: References: <71235db405071211312aac917d@mail.gmail.com> Reply-To: werpu@gmx.at Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: finn.gmane.org User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en In-Reply-To: <71235db405071211312aac917d@mail.gmail.com> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dont know about Shale, but I checked out Martins Code today, and I must say how he handles the whole frontend/backend issue is the best approach I have seen so far, from a JSF perspective. What he does basically is to route the Phaselistener intercepting code for the ajax request directly into the component and from there into the renderer and for the value binding stuff he reuses the bindings already in the JSF system. what he could do by that was to enapsule the whole remoting mechanism and data to xml transformation mechanism into the component itself and reuse the value binding mechanisms and the control binding mechanisms from JSF. Implementing a AJAX backend on top of that stuff is pretty much the same as implementing a normal form/control backend, you use backend beans and bindings, set the values from the backend into the binding and be done with it. Much leaner to implement than the way I did it. What I did was to use a Servlet (you can replace that with a phase listener) and use an Apache Turbine like event mapping into a backend bean for the full processing, the whole data->xml tranformation was done by a separate builder class. Feasable approach to a tad too much out of the JSF context. I was able to reuse the SelectItems but I had no almost transparent backend frontend binding, like Martin managed to pull off. Werner Matthias Wessendorf wrote: > hi all, > > I am prototyping a simple ajax component. For something like suggest ... > I wrote a custom Renderer and a Tag_clazz (reusing UIInput). Since I > couldn't use the ExtensionFilter and the nice AddResource clazzes I > created a simplified version of both, that fit my needs... > > Currently I am removing the Filter in case of a PhaseListener, which > hooks *after* RestoreView into; to ships the JavaScript (like > ExtensionFilter does) and also handles the XmlHttpRequest stuff to > interact with Faces' backing beans (via ValueBinding). > > I like the approach of the PhaseListener more ;) It looks similar to > the bpcatalog stuff > (I guess the stuff from Werner is also similar to that, isn't it). > Yes I got most of my ideas from the blueprings, including the phase listener approaches and the servlet approaches. > On other thing that was on my list, was the way how Shale handles > *remote* requests. In "use cases app" there are some requests the end > with ".remote". Those requests are handled by Shale's Commons Chain > facility. > > I haven't tested my prototype agains Shale's CoR *remote* catalog, but > currently I mostly like the PhaseListener stuff (compared with filter) > :) > > So has anyone used the remote catalog of Shale (for ajaxian stuff) in > his project? So if yes, are there benefits instead of using a > PhaseListener? > > Comments are welcome :) > > -Matthias >