Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 57223 invoked from network); 6 Oct 2009 04:00:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Oct 2009 04:00:17 -0000 Received: (qmail 75603 invoked by uid 500); 6 Oct 2009 04:00:15 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 75578 invoked by uid 500); 6 Oct 2009 04:00:14 -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 75568 invoked by uid 99); 6 Oct 2009 04:00:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 04:00:14 +0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 04:00:04 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Mv1DD-00088G-Op for user@struts.apache.org; Mon, 05 Oct 2009 20:59:43 -0700 Message-ID: <25762545.post@talk.nabble.com> Date: Mon, 5 Oct 2009 20:59:43 -0700 (PDT) From: hisameer To: user@struts.apache.org Subject: Re: Struts 2 runtime variable names In-Reply-To: <25762277.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: cool_sameer_for_u@yahoo.com References: <25761232.post@talk.nabble.com> <25762277.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Alex, Thank you very much for your help=). It worked like a charm. I tried using s:set but forgot to put .count at the end of the index_count. But thanks for figuring this out. -Sameer Alex Siman wrote: > > I use such approach: > > > > ... > "%{'form.cvgcode' + #i}" > ... > "%{'form.cvglimit' + #i}" > ... > > > > hisameer wrote: >> >> hello everyone, >> >> I need to change the s:select name parameter's value depending on the >> index of the list. >> >> I have the following code : >> >> <%! int i=1; %> >> >> >> >> >> > align="right"> >> >> <%= i >> %>> headerKey="0" headerValue="Please Select" >> required="true" list="cvgCode" cssStyle="width:150px" >> /> >> > align="center">> onchange="this.form.submit()" headerKey="0" >> headerValue="Please Select" required="true" >> list="cvglimit" cssStyle="width:150px" /> >> >> <% i++; %> >> >> >> >> >> All I want is if the list is in the first level the name should be >> form.cvgcode1 and so on. I tried using declaring a variable i and >> incrementing it everytime but its not working. The value always being set >> is form.cvgcodenull. Please advise me what should I do? >> > > -- View this message in context: http://www.nabble.com/Struts-2-runtime-variable-names-tp25761232p25762545.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org