Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 66695 invoked from network); 4 Jan 2005 15:48:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Jan 2005 15:48:38 -0000 Received: (qmail 44403 invoked by uid 500); 4 Jan 2005 15:44:26 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 44281 invoked by uid 500); 4 Jan 2005 15:44:25 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 44208 invoked by uid 99); 4 Jan 2005 15:44:22 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of sean.schofield@gmail.com designates 64.233.184.207 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.207) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 04 Jan 2005 07:44:18 -0800 Received: by wproxy.gmail.com with SMTP id 57so111731wri for ; Tue, 04 Jan 2005 07:44:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=eU04oFEL5H66mK8wE+7kevmW0wO3CGQU7kDXuc6WA8eknoSgmDVfgy4CEUjKHKaLWRYRnX7LaG5488N9SX+Di46tRQ0ZDO5RzBjk/Ag6a968aOuipS90aevldg0+PeeWHCuUg8iiRAZihpXkM2wJ8RfiUMp+8t5OZOxTqood64o= Received: by 10.54.37.30 with SMTP id k30mr316224wrk; Tue, 04 Jan 2005 07:44:11 -0800 (PST) Received: by 10.54.10.66 with HTTP; Tue, 4 Jan 2005 07:44:11 -0800 (PST) Message-ID: <2387fbc50501040744ed84358@mail.gmail.com> Date: Tue, 4 Jan 2005 10:44:11 -0500 From: Sean Schofield Reply-To: Sean Schofield To: Struts Developers List Subject: Re: Coupling, Struts and JSF In-Reply-To: <70040413C055E64198177733CAE9F5D711F6E1@pepwmu00057.cww.pep.pvt> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <70040413C055E64198177733CAE9F5D711F6E1@pepwmu00057.cww.pep.pvt> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > A use case is: > > - Two struts actions (say CreateAction and EditAction call the same jsp > to view the result (say result.jsp). > - This result.jsp needs some setup (eg. a list of items for a selection > box). > - The natural way to populate such a list in struts, is in the action. > - To prevent having the logic to populate the list both in CreateAction > and in EditAction, > some users create a new ResultAction, where they do the view > preparation. > - Then they chain the action (this is controversal stuff): > . In CreateAction they do creation logic, and than forward to > ResultAction. > . In EditAction they do edit logic, and than forward to ResultAction. > > As discussed in bug 16107: > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16107 I guess JSF deals with this by having a single jsf page that has a single "backing bean" to populate itself. Right? I suppose one implication of this is that the logic necessary to "populate" a page is coupled with the page itself (or at least the choice of logic). There's probably not really a way to avoid this. I guess Struts really does this too but the binding takes place in struts-config.xml. The more that I think about it, it's easier to find the logic in the page itself instead of hunting around struts-config looking for it. :-) > Regards, Jan sean --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org