Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 53355 invoked from network); 27 Sep 2002 07:04:43 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 27 Sep 2002 07:04:43 -0000 Received: (qmail 18515 invoked by uid 97); 27 Sep 2002 07:05:21 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 18475 invoked by uid 97); 27 Sep 2002 07:05:21 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 18458 invoked by uid 98); 27 Sep 2002 07:05:20 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: "mail" To: "Struts Users Mailing List" Subject: RE: How to call an array setter Date: Fri, 27 Sep 2002 00:18:41 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <20020927064922.31325.qmail@web21205.mail.yahoo.com> Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I was braindead. This code took care of it: for(int i = 0; i < determinationsArray.length; i++) { gridDeterminations = (GridDeterminations) determinationsArray[i]; msgCode[i] = gridDeterminations.getMessageCode(); } responseProcessForm.setMsgCode(msgCode); -----Original Message----- From: Adrian Brown [mailto:adrianjonbrown@yahoo.com.au] Sent: Thursday, September 26, 2002 11:49 PM To: Struts Users Mailing List Subject: RE: How to call an array setter for this, try: return new String[] { "string1", "string2", "string3", "string4", "string5", "string6", "string7" }; Adrian --- mail wrote: > I placed this in the Action class and everything > compiled, but it moved > everything iteration of gridDetermination > MessageCodes into only the first > array iteration. For example, if I have 7 > MessageCodes to load into the > MsgCode array, I only get one MsgCode in the array. > How should I do this to > create an array of MsgCode's? > > Thanks! > > ResponseProcessAction: > responseProcessForm.setMsgCode(new String[] > {gridDeterminations.getMessageCode()}); > > ResponseProcessForm: > public void setMsgCode(String[] msgCode) { > this.msgCode = msgCode; > } > > public String[] getMsgCode() { > return msgCode; > } > > -----Original Message----- > From: Eddie Bush [mailto:ekbush@swbell.net] > Sent: Thursday, September 26, 2002 10:54 PM > To: Struts Users Mailing List > Subject: Re: How to call an array setter > > > setMsgCode(new String[] { > gridDeterminations.getMessageCode() }); > > If it's expecting an array, you'll have to give it > one. > > mail wrote: > > >getMessageCode() returns a String. > > > >The error message I get is: > > setMsgCode(java.lang.String[]) in > com.coramhc.grid.ResponseProcessForm > >cannot be applied to (java.lang.String) > > > >Any ideas? > > > > -- > Eddie Bush > > > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > http://mobile.yahoo.com.au - Yahoo! Messenger for SMS - Always be connected to your Messenger Friends -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: