This is similar to what I am trying to accomplish

http://www.scioworks.net/devnews/strutsDistilled/updates/update-030401/indexedAttr.html

In here he talk abt indexed properties . Could not understand what he is
trying to do here

You form bean class will look like this:
public class MyFormBean extends ActionForm {
  private List fPersonList;
  public List getPersonList() { ... }
  public void getPerson(int index) { ... }
}

Thanks


>>> [EMAIL PROTECTED] 06/09/03 01:28PM >>>

Fine don't listen to me and don't use the extensive code I sent.  But
this
is the problem with that.  You keep asking the same question and not
taking
the advice of many experienced struts users.

Let's break down what you read so you will understand better:

-------------------------------------------------------------------------
Define the ("the" means singular) element as an array and Struts will
autopopulate it like any other.

Which means it auto populates multi selects all bound by the same tag.
Struts gives you a free car and because it won't also give you 300 mpg
then
it is worthless and not doing what it is supposed.  The 300 mpg is
having it
auto populate multiple elements. Get it.

It DOES NOT say: Define elements (meaning plural) using the same name
(i.e.
an array) and Struts will autopopulate it.
-------------------------------------------------------------------------

No one could do anymore for you short of writing the whole thing for you
because what you need doesn't exist (as a freebie).

I feel I wasted so much time sending an example in.
It is practically all the code you could ever get free for something
like
that.

Please, read between the (dashed) lines (above).


-----Original Message-----
From: Sashi Ravipati [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2003 8:35 AM
To: [EMAIL PROTECTED]
Subject: Re: multiple HTML form elements with the same name

Can u post a working example, it will be of great help 

Thanks

>>> [EMAIL PROTECTED] 06/06/03 05:01PM >>>
Look at the struts docs regarding the index tag.

Sashi Ravipati wrote:

>How to use  multiple HTML form elements with the same name.
>
>In the Help it is given as 
>
>Yes. Define the element as an array and Struts will autopopulate it
like any other. 
>
>private String[] id= {};
>public String[] getId() { return this.id; }
>public void setItem(String id[]) {this.id = id;}
>
>
>And so forth 
>Can some body give an example as how to accomplish this..
>
>Thanks Can I use multiple HTML form elements with the same name
>
>  
>

-- 
Vic Cekvenich,
Struts Instructor,
1-800-917-JAVA

Advanced <a href ="baseBeans.com">Struts Training</a> and project
recovery in North East.
Open Source <a href ="baseBeans.com">Content Management</a>  basicPortal
sofware
Best practice<a href ="baseBeans.com">Struts Support</a> v.1.1 helper
ScafflodingXPress




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

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

Reply via email to