I am having an OrganzationVO inside my form-bean.

The OrganzationVO has a collection of AddressVOs.

I am using nested tags like this. 


<nested:nest property = "orgVO">

        <nested:text property="orgID"  size="10" maxlength="10"
styleClass="inputmand"  tabindex="" />
                
        <nested:iterate id="addressid" property="addresses" indexId="index">

        
<nested:text property="company1" size="30" maxlength="30"
styleClass="inputmand" tabindex="" />
        
        </nested:iterate>

</nested:nest>

while submitting the form I am getting an exception like this.


2004-02-26 18:17:08,133 [ExecuteThread: '12' for queue:
'weblogic.kernel.Default'] DEBUG org.apache.
commons.beanutils.BeanUtils -
setProperty([EMAIL PROTECTED], orgVO.a
ddresses[0].company1, [get populated])
getAddrVOAL-->[]
<Feb 26, 2004 6:17:08 PM IST> <Error> <HTTP> <BEA-101017>
<[ServletContext(id=1735147,name=gbs,conte
xt-path=/gbs)] Root cause of ServletException.
java.lang.ArrayIndexOutOfBoundsException
        at java.lang.reflect.Array.get(Native Method)
        at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:525)
        at
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.
java:428)
        at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j
ava:770)
        at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80
1)
        at
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)
        at
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
        at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
        at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:821)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
        at
com.puma.gbs.action.RequestProcessor.process(RequestProcessor.java:133)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.jav
a:1053)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:387)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
        at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
        at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletC
ontext.java:6316)
        at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:317)
        at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:36
22)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2569)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
2004-02-26 18:18:40,616 [ExecuteThread: '12' for queue:
'weblogic.kernel.Default'] DEBUG org.apache.
struts.util.RequestUtils - Get module name for path /uma/showOrgDetails.do
2004-02-26 18:18:40,616 [ExecuteThread: '12' for queue:
'weblogic.kernel.Default'] DEBUG org.apache.
struts.util.RequestUtils - Module name found: /uma
2004-02-26 18:18:40,616 [ExecuteThread: '12' for queue:
'weblogic.kernel.Default'] DEBUG org.apache.
struts.action.RequestProcessor - Processing a 'POST' for path
'/showOrgDetails'



My OrgVO is like this.

public class OrgVO  {

        private ArrayList addresses = new ArrayList();//collection of
addressVOs

        /**
         * Gets ArrayList of AddressVOs
         * 
         * @return addrVOAL ArrayList  a list  of Address VO
         */
        public Object[] getAddresses() {
        
                        System.out.println("getAddrVOAL-->" + addresses);
                        if (addresses != null) {
                                return addresses.toArray();
                        } else {
                                return null;
                        }
        
        }
                

        /**
         * Sets the list of  address  Valu Object
         * 
         * @param  addrList ArrayList  new value of addrVOAL 
         */
        public void setAddresses(Object[] addrList) {
                        addresses = new ArrayList();
                        for (int i = 0;i < addrList.length; i++) {
                                addresses.add(addrList[i]); 
                        }
                }   

}


Can anybody help...

Thanks in advance.



With Regards

Partha



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to