Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 9541 invoked from network); 21 Mar 2007 19:08:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Mar 2007 19:08:19 -0000 Received: (qmail 48016 invoked by uid 500); 21 Mar 2007 19:08:16 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 47991 invoked by uid 500); 21 Mar 2007 19:08:16 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 47976 invoked by uid 99); 21 Mar 2007 19:08:16 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2007 12:08:16 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ted.husted@gmail.com designates 64.233.182.186 as permitted sender) Received: from [64.233.182.186] (HELO nf-out-0910.google.com) (64.233.182.186) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2007 12:08:08 -0700 Received: by nf-out-0910.google.com with SMTP id x29so36500nfb for ; Wed, 21 Mar 2007 12:07:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=qUyyl7hs+QKtfHW/jA593ANkSVeDRIi1KJfs8JFpvB359QufCCjhe1R2H8evSz/NxYq17qF1PSaPnGwkw4PeBFvkbMymXnNnoN9vz5xAtvyVPXAYkOcwLEhM5/noEpQ9j1EoAEeNRCZrXrpKzxOMkFh1BmmNh/qtvZL1GaBL/G8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=rR0qCaXpi3ihsNgin8SKlw7CN8weZ5wmnoya00SSQsGwwkXXBO8Nc8SvP94y+tgN4OcBZED45PqiX39xWysGciGGehSfwdbcj++AV7twOBVYe7UeXW+peYgfvaGh51cEXDip2O3e9DoNrOqA6PKqwWSanPYzUpsLGK0uH03WqtQ= Received: by 10.82.136.4 with SMTP id j4mr2275317bud.1174504066287; Wed, 21 Mar 2007 12:07:46 -0700 (PDT) Received: by 10.82.174.16 with HTTP; Wed, 21 Mar 2007 12:07:46 -0700 (PDT) Message-ID: <8b3ce3790703211207h6aa48a1pfb91e69ddd008a15@mail.gmail.com> Date: Wed, 21 Mar 2007 14:07:46 -0500 From: "Ted Husted" Sender: ted.husted@gmail.com To: "Struts Users Mailing List" Subject: Re: ModelDriven & Action In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 12867b3e3eb8be15 X-Virus-Checked: Checked by ClamAV on apache.org The point of ModelDriven is that we don't have to refer to the "parent" or "model" property. We can just refer to the property flat-out, as if it were a property of the Action class. In this case, it might be that the reference should be to child.property, rather than parent.child.property, since the parent is made implicit by virtue of ModelDriven. Depending on the situation, another way to go might to create a custom version of the ModelDriven interceptor that puts several domain objects on the value stack, so that the references do not need to be nested. The stack can contain any number of JavaBeans. The last bean pushed with the property sought wins. -HTH, Ted On 3/21/07, stanlick@gmail.com wrote: > I have an interesting situation which I am going to simplify in an attempt > to establish dialog. I have a web page that contains a form with ten > properties on it. The Action that is associated with this form contains a > Domain object that I wish to populate from this form. > > > - Seven of the web properties have associated properties in that > Domain object > - One web property is making a "Prototype" AJAX call to a server > resource > - Two are read only and being populated with the AJAX payload > > The Domain Object contains a nested Domain object that I'm trying to > populate using these three fields. Does S2 limit the depth to which Action > Domain objects can be populated? After much reading, it appears that so > long as there are appropriate get/set methods, the Domain object graph > should be populated from my form -- but it's not! My submit populates the > seven "top level" properties, but fails to populate nested object > properties. I have double checked the names of my web page fields to make > sure they reference the appropriate "get/set path" and all looks > well-aligned with the two domain objects. > > s:textfield name="parent.child.property... > > Lastly, what are the rules with implementing ModelDriven on an action? Does > this getModel() provide a benefit over what seems to happen without it? > > I'll stop for now. > > -- > Scott > stanlick@gmail.com > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org