Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 99462 invoked from network); 10 Sep 2008 12:44:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Sep 2008 12:44:51 -0000 Received: (qmail 56884 invoked by uid 500); 10 Sep 2008 12:44:39 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 56847 invoked by uid 500); 10 Sep 2008 12:44:39 -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 56836 invoked by uid 99); 10 Sep 2008 12:44:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 05:44:39 -0700 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [213.235.63.69] (HELO service17.mimecast.com) (213.235.63.69) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 10 Sep 2008 12:43:38 +0000 Received: from mail.192.com (83.217.105.74 [83.217.105.74]) by service17.mimecast.com; Wed, 10 Sep 2008 13:40:58 +0100 Received: from ukicdpostal3.icd.192.com (ukicdpostal3.icd.192.com [192.168.10.1]) by mail.192.com (Postfix) with ESMTP id BFF7C3CB6 for ; Wed, 10 Sep 2008 13:40:57 +0100 (BST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: RE: ajax validation issue Date: Wed, 10 Sep 2008 13:40:57 +0100 Message-ID: <9E060D97B6F17C418C5A58CE79C4C09601FD8F49@ukicdpostal3.icd.192.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ajax validation issue Thread-Index: AckTPdfOvF53/OIlRY2u2VPyd1NkJwAA4erQ References: <9E060D97B6F17C418C5A58CE79C4C09601FD8CB2@ukicdpostal3.icd.192.com> <48C7125A.3080000@blueskyminds.com.au> <9E060D97B6F17C418C5A58CE79C4C09601FD8EEB@ukicdpostal3.icd.192.com> <48C7B6D9.80304@blueskyminds.com.au> From: "Gawain Hammond" To: "Struts Users Mailing List" X-MC-Unique: 108091013405802002 Content-Type: multipart/alternative; boundary="MCBoundary=_108091013405900602" X-Virus-Checked: Checked by ClamAV on apache.org --MCBoundary=_108091013405900602 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable > Can you confirm whether "crud.Group.listAll" is invoked after=20 > a validation failure? No, when validation returns to the form action 'crud.Group.listAll' is not invoked. This happens with struts versions 2.0.11.x and 2.1.x So you would expect using an action tag in this manner (to produce a list for a select box) to work after validation returns to the form? Interesting, I may investigate this further as it would be the more simple solution as I'm a bit over my head with the ajax stuff. -----Original Message----- From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au]=20 Sent: 10 September 2008 13:00 To: Struts Users Mailing List Subject: Re: ajax validation issue Gawain Hammond wrote: > A really nice solution so far has been to an action tag to populate > forms, which has worked nicely the rest of the time. I've really liked > using this approach to fill drop-downs, like so: > > id=3D"groupAction"/> > > ... > > list=3D"%{#groupAction.list}" listKey=3D"id" listValue=3D"name"/> > > =20 That's a novel approach. I like it. > Using %{#groupAcation.list} to populate the drop down works great, but > the only work around I've seen to fill the select box after validation > returns to the form is rather messy: > > http://struts.apache.org/2.1.2/docs/how-do-we-repopulate-controls-when-v > alidation-fails.html > > =20 I don't see why the above approach wouldn't be working after a=20 validation failure. When the INPUT result is returned it presumably=20 renders the same JSP (and doesn't do a redirect). The problem occurs=20 when the context/valuestack doesn't contain something you're expecting=20 (such as the list for the select).=20 Can you confirm whether "crud.Group.listAll" is invoked after a=20 validation failure? > Knowing ajax validation will only work with xhtml/css_html theme is > helpful, I've been using ajax all along which may explain some issues. > =20 That should read client-side validation. > You said to use the default interceptor stack for 2.1.2, and the > documentation I read says to use 'jsonValidationWorkflowStack' do I need > both of them or will just the default stack work? > > =20 jsonValidationWorkflowStack is correct one. The autocompleter works because it performs a separate request to=20 populate the permitted values. Your case is just that the list for the=20 selects is empty or null. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org ---------------------------------------------------------- This transmission is strictly confidential, possibly legally privileged, an= d intended solely for the=20 addressee. Any views or opinions expressed within it are those of the auth= or and do not necessarily=20 represent those of 192.com, i-CD Publishing (UK) Ltd or any of it's subsidi= ary companies. If you=20 are not the intended recipient then you must not disclose, copy or take any= action in reliance of this=20 transmission. If you have received this transmission in error, please notif= y the sender as soon as=20 possible. No employee or agent is authorised to conclude any binding agree= ment on behalf of=20 i-CD Publishing (UK) Ltd with another party by email without express writte= n confirmation by an=20 authorised employee of the Company. http://www.192.com (Tel: 08000 192 192)= . i-CD Publishing (UK) Ltd=20 is incorporated in England and Wales, company number 3148549, VAT No. GB 67= 3128728. --MCBoundary=_108091013405900602--