Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 80173 invoked from network); 22 Jun 2009 09:34:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jun 2009 09:34:37 -0000 Received: (qmail 86920 invoked by uid 500); 22 Jun 2009 09:34:45 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 86851 invoked by uid 500); 22 Jun 2009 09:34:45 -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 86841 invoked by uid 99); 22 Jun 2009 09:34:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 09:34:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of poulwiel@gmail.com designates 209.85.210.182 as permitted sender) Received: from [209.85.210.182] (HELO mail-yx0-f182.google.com) (209.85.210.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 09:34:37 +0000 Received: by yxe12 with SMTP id 12so756471yxe.23 for ; Mon, 22 Jun 2009 02:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=J20BnsX6tXPEKcrThx/0Oe7uLzZfrlDmD7iMHHWZ8C8=; b=nY47LXqIlHDB91YQnZsYM7khG5ujv9xr872MQiTLDjhynAOORhHJmE9JTKP8X7cIZW 8zq3NA7Zjj56pIeyhv+xlqIIEjW95PRgFH0pC5FNRol5CRocQzFGbhjD+ok8RHsu7qzk EJ9ZAO+kYnaMlFyC4pOYwO5mhaNQCkYjJSNag= 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=YQzphKbrr7otdxdJGM3Q8MTHPB90nFej9fPthR5TV0ne+fsClhWd+SglyNwr4Qi0hH +R09imG/cc5gEIDdY8Sk+miI5SfFPbHXrinKL80wSF2oCiXiLB7kLZJP07sl1+tSsa/T ybO5pbC3+xWC310sP1V1XRVV1HU1fOucFgHY8= MIME-Version: 1.0 Received: by 10.90.71.15 with SMTP id t15mr5057520aga.118.1245663256648; Mon, 22 Jun 2009 02:34:16 -0700 (PDT) In-Reply-To: <4B53F310D165A24983022B834A8DF84601254805@exchbsrv.MOMAA.GOV.BH> References: <4B53F310D165A24983022B834A8DF84601254704@exchbsrv.MOMAA.GOV.BH> <5e5424000906200040p2ed3260es4db6f4ed0879e436@mail.gmail.com> <4B53F310D165A24983022B834A8DF84601254805@exchbsrv.MOMAA.GOV.BH> Date: Mon, 22 Jun 2009 11:34:16 +0200 Message-ID: <5e5424000906220234q20ee060bh9aa3533ad43b6ad@mail.gmail.com> Subject: Re: Doubt with using check box From: =?ISO-8859-2?Q?Pawe=B3_Wielgus?= To: Struts Users Mailing List Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Vishnu, in jsp add on every employee add such a checkbox and in EmployeeForm add field private String[] selectedEmployees; also don't forget to reset this field in reset method of that form. Hope that helps, Pawe=B3 Wielgus. 2009/6/20 Vishnu Vyasan Nelliparmbil : > > > Pawel , can you expalin =A0with a example. I am totally new to struts. > > I tried with another way. > > Ie by adding a 'selected' field to the EmployeeBean. > > > > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > > > > Now I am getting the values of selected as false in the Action. Even thou= gh I have selected it. > I am using a action form for the some other elements in the same view. > > Could you guys can through some light on how to make this work? > > > Regards > Vishnu > > > > -----Original Message----- > From: Pawe=B3 Wielgus [mailto:poulwiel@gmail.com] > Sent: 20 June 2009 10:40 > To: Struts Users Mailing List > Subject: Re: Doubt with using check box > > Hi Vishnu, > on the html page you will have a list of checkboxes with the same name > "selectedEmployees" and a value of an employee identificator. In the > action create settet setSelectedEmloyees(String[] selectedEmployees), > then in execute You can access this table of employee identificators. > Just as a side note, i don't know what type of is your employee > identificator, so i proposed String, but it can also be long. > > Best greetings, > Pawel Wielgus. > > 2009/6/20, Vishnu Vyasan Nelliparmbil : >> Hi Friends, >> >> I am new to web development and struts. I have a simple question. >> >> I am using tag to iterate through a list of Employees >> and display their details. >> The list contains the Employee objects. >> Now while displaying Employee details in a table, the row is ending with >> a check box , so that the user can select employees. The check boxes are >> created dynamically since they are inside the iterate tag. >> >> Now how in Action I know that a specific employee is selected? >> >> In action form I would get whether the check box is selected or not. But >> how can I relate that to employees in list? >> >> Thanks in Advance >> vishnu >> >> >> >> >> >> >> >> >> >> >> >> > > --------------------------------------------------------------------- > 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