Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 53365 invoked from network); 26 Oct 2010 02:10:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Oct 2010 02:10:14 -0000 Received: (qmail 74766 invoked by uid 500); 26 Oct 2010 02:10:11 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 74733 invoked by uid 500); 26 Oct 2010 02:10:11 -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 74725 invoked by uid 99); 26 Oct 2010 02:10:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Oct 2010 02:10:11 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of davelnewton@gmail.com designates 209.85.215.176 as permitted sender) Received: from [209.85.215.176] (HELO mail-ey0-f176.google.com) (209.85.215.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Oct 2010 02:10:05 +0000 Received: by eyg24 with SMTP id 24so2029940eyg.35 for ; Mon, 25 Oct 2010 19:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=0uzBvektyjFgfXPh3ZTU+6sdHe2/Q197cVaiZEA/IZM=; b=ErHhc8pOx611ikvXf3eo7KMAACh20vLainzqHZwTZ3OxH6W9848bv7FmYMzf7bfXe7 oHc6Isjh2Z+gH5yKS75vvw/Jv++B1c0RMKOJuEOBs5iw5nusx5DktwAQI50xUDyu6ACD nGeKDTWQAOZaVX96Bc631MemykICI9GSATqXY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=EFpe4K1I1pvc8wcSI78D4nE7SyWMQyMpwmtAldXqSfUr5mPlJD3/nWiuJF8KsWB3G6 e9iRfJc2CbpGpaG2nPoZN6Avo0pdJtuPYbXSglDI0UpR/F6dlugAnSr/y2em4dwzKWnR m2eU4FLsCQO6g0NMEoQf9nxvZn9ZAC8KGSorI= MIME-Version: 1.0 Received: by 10.213.17.139 with SMTP id s11mr6480150eba.51.1288058984242; Mon, 25 Oct 2010 19:09:44 -0700 (PDT) Received: by 10.213.2.134 with HTTP; Mon, 25 Oct 2010 19:09:44 -0700 (PDT) In-Reply-To: References: Date: Mon, 25 Oct 2010 22:09:44 -0400 Message-ID: Subject: Re: checkbox problem From: Dave Newton To: Struts Users Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hidden parameters are the only way to get a value for an unchecked checkbox, that's just how HTML works. But yes, you're wrong; the checkbox interceptor does the work for you. Please read the documentation and just try it. Dave (Cumbersome? Compared to what?) On Monday, October 25, 2010, Peter Bliznak wrote: > Sorry about "of course" we have over two dozens of s1 apps and evaluating= if > s2 makes sense to switch to or go with something else. > And for that we have over 50 items to cover to see how difficult/easy it = is > in s2. > I am really surprise that such a trivial task has to be done using hidden > parameters. > Just to be sure : you really meant to assign dynamically hidden parameter > values inside iterator? -- =A0and then -- since you will end up with 2 > collections to go ahead and compared them and figure out what is "missing= in > one of them" and so to get values from the other?...I hope I am wrong - > sounds very cumbersome for 2010. > > On Mon, Oct 25, 2010 at 9:39 PM, Dave Newton wrot= e: > >> Same way they're generated now, with the checkbox tag, or by hand. Or us= e a >> map. >> >> And there's no "of course": people use both versions. >> >> Dave >> >> On Monday, October 25, 2010, Peter Bliznak wrote: >> > Hi Dave, >> > using S2 of course. >> > not sure I am getting what you suggested. I have dynamic list and have= no >> > idea what size is going to be (inside my jsp which was created prior t= o >> that >> > call)-- how would you then create hidden parameters dynamically? >> > >> > On Mon, Oct 25, 2010 at 9:19 PM, Dave Newton >> wrote: >> > >> >> Which version of Struts? >> >> >> >> Struts 2 uses a hidden field to deal with default (unchecked) values. >> >> Struts 1 ActionForms used the reset() method to pre-load default >> >> values. >> >> >> >> Dave >> >> >> >> On Mon, Oct 25, 2010 at 9:16 PM, Peter Bliznak >> wrote: >> >> > Hi, >> >> > I have a list over which I am iterating - it has checkbox and other >> >> fields. >> >> > I know I can define array associated with checkbox's values but tha= t >> only >> >> > returns values which were checked. In my other column I have date a= nd >> I >> >> have >> >> > to make that date associated with checkbox's state. How am I suppos= ed >> to >> >> do >> >> > that?........Say I get five values in table and decide to check 2 o= f >> them >> >> > but array is only going to return true for 2 elements ...Is there a= ny >> way >> >> I >> >> > would define collection/array for checkboxes and it would return AL= L >> >> value >> >> > including those which were unchecked?... >> >> > Regards >> >> > Peter. >> >> > >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >> >> For additional commands, e-mail: user-help@struts.apache.org >> >> >> >> >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >> For additional commands, e-mail: user-help@struts.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org