Hey Shenoy!
Thanx for help, I think you're the one that can solve my problem...
This is my Form class:
public class OverviewForm extends ActionForm
{
private List edit;
private List delete;
public OverviewForm()
{
edit= new ArrayList();
delete= new ArrayList();
}
public List getEdit()
{
return edit;
}
public ImageButtonBean getEdit(int index)
{
while (edit.size() + 1 < index)
{
edit.add(new ImageButtonBean());
}
return (ImageButtonBean) edit.get(index);
}
public List getDelete()
{
return delete;
}
public ImageButtonBean getDelete(int index)
{
while (delete.size() + 1 < index)
{
delete.add(new ImageButtonBean());
}
return (ImageButtonBean) delete.get(index);
}
public void setEdit(List edit)
{
this.edit= edit;
}
public void setLoeschen(List delete)
{
this.delete= delete;
}
public void reset(ActionMapping arg0, HttpServletRequest arg1)
{
bearbeiten = new ArrayList();
loeschen = new ArrayList();
}
public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1)
{
return new ActionErrors();
}
}
As you see, I'm using image-buttons (<bean:image...>), their properties are "edit" and "delete" and they are indexed, so the exactly name may be "delete[51]" or "edit[28]" etc...
When I open the
JSP and click on an edit or delete button, I get the following error message in the browser: Error 500: BeanUtils.populate
and these in my console:
X
Servlet Error: BeanUtils.populate: java.lang.reflect.InvocationTargetException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
Do you know what my problem could be?
Thanx in advance!
Florian