Instead of string array, I would do it with a object that implement
interator interface, like ArrayList. If you have an array list, you can add
indeterminate numbers of objtects like string one


<logic:interate id="obj" name="nameOfField">
  <bean:write name="obj">
</logic>


I hope, this could help you...I'm a new struts developer...only weeks, but
i'm pretty sure ths is gonna help you. Good luck!



On 10/20/06, Anet <[EMAIL PROTECTED]> wrote:

Hi;

Thank very much for your help, but my string[] object filled dynamic.Idon't 
know its size at first.
and I don't need its data on my form, I just need them to pass with form
when the form is submitted.
also your solution can help me. just I want to know something.
I saw in a document that only String type can be used with <html:hidden>.
Is this my error? trying to pass array
with <html:hidden>??
  thanks a lot.

WongTsengÍõÔø <[EMAIL PROTECTED]> wrote:
  Maybe you can make your String[] Object a indexed attribute of your
formbean. Then use html:hidden:
something like this below:
Class YourFormBean extends ActionForm{
String[] aaas = new String[5];
public String getAaa(int index){
return aaas[index];
}
public void setAaa(String a,int index){
aaas[index] = a;
}
}

then in your jsp:





2006/10/20, Anet :
>
> Hi everybody;
> I have a String[] object. but I can't pass it via form as a hidden
> object.
> Is it wrong to pass a string[] object as html:hidden ???
> Thanks.
>
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
> rates.
>



--
Wong Tseng
ÍõÔø



---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small
Business.




--


--

Sócrates Medina

--
-"Looking ahead!"

Reply via email to