struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve_Ak...@national.com.au
Subject Can you use nested beans with Scaffold?
Date Tue, 01 Oct 2002 03:19:25 GMT
I was wondering if anyone has been able to use nested beans with Scaffolds?

I've been trying to do this with no luck.  It seems that when the form data
is moved to the properties map it can't then be copied to the data bean.

www.keyboardmonkey.com have an example of a form with nested beans and
matches closely with what I'm trying to do.  When I integrate this with the
scaffold code I get the following error:

*** ACTION EXCEPTION: : java.lang.reflect.InvocationTargetException:
java.lang.ClassCastException: java.lang.String
      at com.km.struts.tutorial.MonkeyBean.setBunchList(MonkeyBean.java:48)
      at java.lang.reflect.Method.invoke(Native Method)
      at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1652)
      at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1545)
      at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1574)
      at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919)
      at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
      at
org.apache.commons.scaffold.util.ProcessBeanBase.execute(ProcessBeanBase.java:108)
      at
org.apache.struts.scaffold.ProcessAction.executeLogic(ProcessAction.java:495)
      at
org.apache.struts.scaffold.BaseHelperAction.executeLogic(BaseHelperAction.java:97)
      at org.apache.struts.scaffold.BaseAction.execute(BaseAction.java:856)
      at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
      at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:267)
      at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
      at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
__________________________________________________________________________
The information contained in this email communication may be confidential.
You
should only read, disclose, re-transmit, copy, distribute, act in reliance
on or
commercialise the information if you are authorised to do so. If you are
not the
intended recipient of this email communication, please notify us
immediately by
email to NABpost@national.com.au or reply by email direct to the sender
and then destroy any electronic or paper copy of this message.  Any views
expressed in this email communication are those of the individual sender,
except
where the sender specifically states them to be the views of a member of
the
National Australia Bank Group of companies.  The National Australia Bank
Group
of companies does not represent, warrant or guarantee that the integrity of
this
communication has been maintained nor that the communication is free of
errors,
virus or interference.


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message