You should be able to use collections and arrays just fine with 1.0.2. 

The form would have multiple delete,name, and profile elements. 

The ActionForm will then have arrays or collections for each. 

The specification does not guarantee that these will be submitted back
in the correct order, but in practice that's what happens. 

You might want to use a YES/NO Radio Button for Delete though. This way
the control will always "succeed" and submit something that can be
caught on the other side. 

For more see, http://jguru.com/forums/view.jsp?EID=749162

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Michael Dingler wrote:
> 
> Hi there,
> 
> I'm currently rewriting some protoype parts of an web
> application with struts. Unfortunately I've got to use
> 1.0.2, so I miss some neat opportunities...
> 
> Once again it's a dynamic forms problem, at least I think
> so...
> One page where I have the problem is the user administration
> part. Basically, you should be able to add new users,
> change the permissions of existing ones or delete them.
> 
> So my pure JSP prototype with lots of ugly scriptlets
> looked something like this:
> 
> ----------------------------------------------------------
>  New User: ____________  Profile [Adminstrator]  |Submit|
> 
> Existing Users:
> Delete?         Name:           Profile:
>   [ ]           User1           [User]
>   [ ]           User2           [Administrator]
>   [ ]           User3           [Owner]
> 
> [Submit]
> -----------------------------------------------------------
> 
> The "[ ]" part below "Delete?" is supposed to be a checkbox,
> That "Profile" Stuff is a <select>.
> The number of users is variable, of course.
> 
> So, what's the best practice for this kind of issue?
> As far as I could gather from RTFM & RTFML, I could
> model the lines as a Collection and just <logic:iterate>
> over them. That is, if I'd be using 1.1...
> 
> I've got it working, but this involves scriptlets and
> poking around in the request, just as my initial code
> did. Sigh...
> 
> ...Michael...
> 
> --
> 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]>

Reply via email to