On 8/25/06, krishan rathi <[EMAIL PROTECTED]> wrote:
Hi all
I am getting following exception java.lang.IllegalArgumentException:
No bean specified while using indexed properties in struts.
MyForm Bean is
public class ReportItemForm extends ActionForm {
FormItem [] formItem=null;
public void setItem(int index, FormItem formItem){
this.formItem[index] = formItem; } public FormItem
getItem(int index){ if(formItem==null ||(formItem.length)==0)
return new FormItem();
return formItem[index];
}
and FormItem bean is specified like this
public class FormItem { String formitem; int
order; public int getOrder() { return
order; } /** * @param i */ public void setOrder(int i)
{ order = i; } /** * @return */ public String
getFormitem() { return formitem; } /** * @param
string */ public void setFormitem(String string) { formitem =
string; } i have set this array of FormItem i.eformItem()
properly
and the data is dispalyed correctly on the page like this
<html-el:hidden property="item[${count}].formItem" />
property name should be formitem and not formItem.
<html-el:text styleId="order" property="item[${count}].order" size="1"
/> but when i submitting this form i am getting following
Exception java.lang.IllegalArgumentException: No bean
specified can anybody help me. any help will be greatly
appriciated. thanks Krishan.
---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small
Business.
--
Puneet