struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arron Bates <ar...@keyboardmonkey.com>
Subject Re: variable number of text fields in a form
Date Mon, 06 May 2002 04:50:25 GMT
Depends on the type of indexed getter/setter you're using.

public String getMyIndex(int i) {}
public void setMyIndex(int i, String value) {}

...the setter will be called in this case, but in this instance...

public Object[] getMyIndex() {}
public void setMyIndex(Object[] obj) {}

...the setter will not be called, as the system will get the array, and 
set the item directly into the array, rather that return the resulting 
array back to the setter. This could very easily be the case. It's 
really easy to code this way, but don't expect the setter method itself 
to be called.

Have you tried the nested tags?... makes light work of list type 
operations among everything else.
Anyways, I've ranted this before, and your answer "could" be above :)


Arron.



Chakradhar Tallam wrote:

>hi guys,
>
>how do i handle the setting of variable number of text fields in a form!
>i've tried with indexed properties but when i'm posting the form, the get
>method is getting called rather than the set method for some reason. have u
>had this kind of experience before, help is appreciated.
>
>thanks,
>CT.
>



--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message