Thank you very much David!!
"David Demner" <[EMAIL PROTECTED]>
07-05-2004 16:26
Por favor, responda a
"Turbine Users List" <[EMAIL PROTECTED]>
Para
"'Turbine Users List'" <[EMAIL PROTECTED]>
cc
Asunto
RE: Uploading list of items
Hi Carlos,
What you would do is something like this in your action (assuming your
boxes
are named url$i and desc$i as below):
for (int i = 1; i <=
data.getRequest().getParameter("CountUserEnteredInLastStep"); i++) {
String url = data.getRequest().getParameter("url" + i);
String desc = data.getRequest().getParameter("desc" + i);
//maybe validate data better than this
if (!url.equals("") && !desc.equals("")) {
store(url, desc);
}
}
So, because in the .vm file your text fields are named url$i and desc$i,
they are passed in the request parameters (by the form posting) as
url1/desc1, url2/desc2, urlN/descN, depending on the number of boxes the
user specified (hidden field CountUserEnteredInLastStep also passed via
request). So you just access them from the request.
DAvid
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday May 7, 2004 12:53 PM
To: Turbine Users List
Subject: RE: Uploading list of items
Davis, actually I'm calling the event inside the action and I can get the
single parameter values, my problem is how to parse the list of "link
objects"... I mean, the list of url and descriptions...
Thank you!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]