I can't tell you why the parameters are being passed out-of-sequence (I
would guess they're being shuffled through a HashMap somewhere) but it's
easy to deal with: simply have your setter grow the list as necessary to
accommodate the passed index. Something like this:
public void setFriend
I've tried another example also...
ListForm.java
=
package com.myapp.struts.formbeans;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.util.*;
/**
*
* @author Sai
*/
public class ListForm extends ActionForm {
private int size = 3;
private List f
I wanted to find a way to handle dynamic number of arguments for my
poll-posting form which should be able to handle dynamic number of choice
fields.
So i maintained a list (pollChoices --> java.util.List type) for maintaining
dynamic number of choice fields.
==
3 matches
Mail list logo