Hi, First of all, sorry for my poor english, but please read carefully.
I am a developer who use Struts for building RDBMS-based applications. I have to make so many tables that is linked by PK-FK relation. So There's so many Beans that are shaped like this (ParentBean and ChildBean is linked by PK-FK)
============================================================ ParentBean.java
public class ParentBean { private int id; private String name; private ChildBean[] childBeans = new ChildBean[0]; // get/set methods // ... } ------------------------------------------------------------ ChildBean.java
public class ChildBean { private String childName; // get/set methods // ... } ============================================================
ParentBean can have many, more than one ChildBeans, And I cannot guess how many ChildBeans would be created at run-time.
So this page that is used for user-input cannot be worked properly.
============================================================ ParentBeanInput.jsp .. <html:text property="parentBean.childBeans[0].childName"/><br/> <html:text property="parentBean.childBeans[1].childName"/><br/> <html:text property="parentBean.childBeans[2].childName"/><br/> <html:text property="parentBean.childBeans[3].childName"/> .. ============================================================
When request parameter is populated(when RequestUtils.populate() is called.),
Array IndexOutofBoundary Exception is occured Because Property Entities like parentBean.childBeans[3].childName does not exist.
So I use modified beanutils library that can extends length of arraies at run-time and make a component of array to populate this kind of request parameter that is mapped to array property of bean.
I would like to Form-Bean processor that support array of variable length.
Thank you for reading,Jang
_________________________________________________________________
고.. 감.. 도.. 사.. 랑.. 만.. 들.. 기.. MSN 러브 http://www.msn.co.kr/love/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]