Hi,

A String cannot be handed in when it expects a String
array. Try

public String[] getMessageCode() {
     return new String[] { "string here" };
}

Adrian

 --- mail <[EMAIL PROTECTED]> 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?
> 
> -----Original Message-----
> From: Andrew Hill
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 10:43 PM
> To: Struts Users Mailing List
> Subject: RE: How to call an array setter
> 
> 
> The usual way to call an array setter method is with
> an array. Nulls are
> also acceptable.
> 
> getMessageCode() in the gridDeterminations thinghy
> returns what type?
> 
> What compilation / runtime error are you
> experiencing?
> 
> 
> -----Original Message-----
> From: mail [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 13:49
> To: [EMAIL PROTECTED]
> Subject: How to call an array setter
> 
> 
> I must be brain-dead right now.  Can anyone tell me
> how to call an array
> setter method?
> 
> ex.
> 
> ResponseProcessForm:
> 
>       private String[] msgCode = null;
> 
>       public void setMsgCode(String[] msgCode) {
>               this.msgCode = msgCode;
>       }
> 
>       public String[] getMsgCode() {
>               return msgCode;
>       }
> 
> ResponseProcessAction:
> 
>       /*
>        *This does not work, but not sure how to call the
> method??
>        */
> 
>
responseProcessForm.setMsgCode(gridDeterminations.getMessageCode());
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>  

http://mobile.yahoo.com.au - Yahoo! Messenger for SMS
- Always be connected to your Messenger Friends

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to