Re: DynaActionForm: ArrayIndexOutOfBoundsException

2005-04-21 Thread Hubert Rabago
I stand corrected.  It *should* work, since, as the wiki says, "Struts
1.2.4 will wrap the LazyDynaBean in a BeanValidatorForm
automatically."  I don't have time to look into it right now, though. 
Maybe someone else can see what the problem is.

Hubert


On 4/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Thanks Hubert !
> 
> Perhaps the wiki: http://wiki.apache.org/struts/StrutsCatalogLazyList is
> not correct or I am interepting it falsely,
> It has this note in the section LazyDynaBean/LazyValidatorForm:
> N.B. Solutions here require Struts 1.2.4 and Bean Utils 1.7.0
> 
> - Glenn
> 
> Hubert Rabago <[EMAIL PROTECTED]>
> 21/04/2005 11:49 AM
> Please respond to "Struts Users Mailing List"
> 
> To: Struts Users Mailing List 
> cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA)
> 
> Subject:Re: DynaActionForm: ArrayIndexOutOfBoundsException
>  Classification:
> 
> 
> You need to use an ActionForm subclass for your form-bean.  The
> Lazy-flavored form bean was added after 1.2.4.  If you're unable to
> upgrade from 1.2.6, consider adding it directly to your code base for
> now.
> 
> You can get it here:
> http://svn.apache.org/viewcvs.cgi/struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/validator/LazyValidatorForm.java?view=markup
> 
> Hubert
> 
> On 4/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Oh man... I'm slightly confused this morning... perhaps an espresso is
> > required !
> > I have been reading and searching based on the links below... however I
> am
> > stuck.
> >
> > For the time being this is what I have done; upgraded to :
> > - Struts 1.2.4
> > - BeanUtils 1.7
> > - Collections 3.1
> > - Digester 1.6
> > - Logging 1.0.4
> >
> > I have used the jars and taglibs found here:
> > jakarta-struts-1.2.4/contrib/struts-el/lib
> > In my struts-config.xml I have this:
> >
> > 
> >  Struts
> > Configuration 1.2//EN"
> >
> > "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";>
> >
> >  > "org.apache.commons.beanutils.LazyDynaBean">
> >> "hronline.secure.personal.cWWHistory.CWWHistoryVO[]">
> > 
> > ...
> >
> > I get these errors:
> > - Type org.apache.commons.beanutils.LazyDynaBean does not support form
> > properties
> > - org.apache.commons.beanutils.LazyDynaBean must be a subclass of the
> > org.apache.struts.action.ActionForm
> >
> > Now based on the errors it seems that I am not referencing the correct
> > jar?
> > Something else?
> >
> > - Glenn
> >
> > Hubert Rabago <[EMAIL PROTECTED]>
> > 20/04/2005 02:49 PM
> > Please respond to "Struts Users Mailing List"
> >
> > To: Struts Users Mailing List 
> > cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA)
> >
> > Subject:Re: FW: DynaActionForm:
> > ArrayIndexOutOfBoundsException
> >  Classification:
> >
> >
> > Take a look at
> >
> > http://struts.apache.org/faqs/indexedprops.html
> > http://www.developer.com/java/other/article.php/2233591
> > http://wiki.apache.org/struts/StrutsCatalogLazyList
> >
> > Also, search the archives (like
> > http://marc.theaimsgroup.com/?l=struts-user ) for "lazylist" to get
> > ideas on approaches to dealing with dynamically sized form fields.
> >
> > Hubert
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



Re: DynaActionForm: ArrayIndexOutOfBoundsException

2005-04-21 Thread gdeschen
Thanks Hubert !

Perhaps the wiki: http://wiki.apache.org/struts/StrutsCatalogLazyList is 
not correct or I am interepting it falsely, 
It has this note in the section LazyDynaBean/LazyValidatorForm:
N.B. Solutions here require Struts 1.2.4 and Bean Utils 1.7.0 

- Glenn






Hubert Rabago <[EMAIL PROTECTED]>
21/04/2005 11:49 AM
Please respond to "Struts Users Mailing List"




 
To: Struts Users Mailing List 
cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA)

Subject:Re: DynaActionForm: ArrayIndexOutOfBoundsException
 Classification: 
 


You need to use an ActionForm subclass for your form-bean.  The
Lazy-flavored form bean was added after 1.2.4.  If you're unable to
upgrade from 1.2.6, consider adding it directly to your code base for
now.

You can get it here:
http://svn.apache.org/viewcvs.cgi/struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/validator/LazyValidatorForm.java?view=markup


Hubert


On 4/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Oh man... I'm slightly confused this morning... perhaps an espresso is
> required !
> I have been reading and searching based on the links below... however I 
am
> stuck.
> 
> For the time being this is what I have done; upgraded to :
> - Struts 1.2.4
> - BeanUtils 1.7
> - Collections 3.1
> - Digester 1.6
> - Logging 1.0.4
> 
> I have used the jars and taglibs found here:
> jakarta-struts-1.2.4/contrib/struts-el/lib
> In my struts-config.xml I have this:
> 
> 
>  Configuration 1.2//EN"
> 
> "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";>
> 
>  "org.apache.commons.beanutils.LazyDynaBean">
>"hronline.secure.personal.cWWHistory.CWWHistoryVO[]">
> 
> ...
> 
> I get these errors:
> - Type org.apache.commons.beanutils.LazyDynaBean does not support form
> properties
> - org.apache.commons.beanutils.LazyDynaBean must be a subclass of the
> org.apache.struts.action.ActionForm
> 
> Now based on the errors it seems that I am not referencing the correct
> jar?
> Something else?
> 
> - Glenn
> 
> Hubert Rabago <[EMAIL PROTECTED]>
> 20/04/2005 02:49 PM
> Please respond to "Struts Users Mailing List"
> 
> To: Struts Users Mailing List 
> cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA)
> 
> Subject:Re: FW: DynaActionForm:
> ArrayIndexOutOfBoundsException
>  Classification:
> 
> 
> Take a look at
> 
> http://struts.apache.org/faqs/indexedprops.html
> http://www.developer.com/java/other/article.php/2233591
> http://wiki.apache.org/struts/StrutsCatalogLazyList
> 
> Also, search the archives (like
> http://marc.theaimsgroup.com/?l=struts-user ) for "lazylist" to get
> ideas on approaches to dealing with dynamically sized form fields.
> 
> Hubert
> 
>

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





Re: DynaActionForm: ArrayIndexOutOfBoundsException

2005-04-21 Thread Hubert Rabago
You need to use an ActionForm subclass for your form-bean.  The
Lazy-flavored form bean was added after 1.2.4.  If you're unable to
upgrade from 1.2.6, consider adding it directly to your code base for
now.

You can get it here:
http://svn.apache.org/viewcvs.cgi/struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/validator/LazyValidatorForm.java?view=markup

Hubert


On 4/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Oh man... I'm slightly confused this morning... perhaps an espresso is
> required !
> I have been reading and searching based on the links below... however I am
> stuck.
> 
> For the time being this is what I have done; upgraded to :
> - Struts 1.2.4
> - BeanUtils 1.7
> - Collections 3.1
> - Digester 1.6
> - Logging 1.0.4
> 
> I have used the jars and taglibs found here:
> jakarta-struts-1.2.4/contrib/struts-el/lib
> In my struts-config.xml I have this:
> 
> 
>  Configuration 1.2//EN"
> 
> "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";>
> 
>  "org.apache.commons.beanutils.LazyDynaBean">
>"hronline.secure.personal.cWWHistory.CWWHistoryVO[]">
> 
> ...
> 
> I get these errors:
> - Type org.apache.commons.beanutils.LazyDynaBean does not support form
> properties
> - org.apache.commons.beanutils.LazyDynaBean must be a subclass of the
> org.apache.struts.action.ActionForm
> 
> Now based on the errors it seems that I am not referencing the correct
> jar?
> Something else?
> 
> - Glenn
> 
> Hubert Rabago <[EMAIL PROTECTED]>
> 20/04/2005 02:49 PM
> Please respond to "Struts Users Mailing List"
> 
> To: Struts Users Mailing List 
> cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA)
> 
> Subject:Re: FW: DynaActionForm:
> ArrayIndexOutOfBoundsException
>  Classification:
> 
> 
> Take a look at
> 
> http://struts.apache.org/faqs/indexedprops.html
> http://www.developer.com/java/other/article.php/2233591
> http://wiki.apache.org/struts/StrutsCatalogLazyList
> 
> Also, search the archives (like
> http://marc.theaimsgroup.com/?l=struts-user ) for "lazylist" to get
> ideas on approaches to dealing with dynamically sized form fields.
> 
> Hubert
> 
>

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



Re: DynaActionForm: ArrayIndexOutOfBoundsException

2005-04-21 Thread gdeschen
Oh man... I'm slightly confused this morning... perhaps an espresso is 
required !
I have been reading and searching based on the links below... however I am 
stuck.

For the time being this is what I have done; upgraded to :
- Struts 1.2.4
- BeanUtils 1.7
- Collections 3.1
- Digester 1.6
- Logging 1.0.4

I have used the jars and taglibs found here: 
jakarta-struts-1.2.4/contrib/struts-el/lib
In my struts-config.xml I have this:


http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";>


  

...

I get these errors:
- Type org.apache.commons.beanutils.LazyDynaBean does not support form 
properties
- org.apache.commons.beanutils.LazyDynaBean must be a subclass of the 
org.apache.struts.action.ActionForm

Now based on the errors it seems that I am not referencing the correct 
jar?
Something else?

- Glenn







Hubert Rabago <[EMAIL PROTECTED]>
20/04/2005 02:49 PM
Please respond to "Struts Users Mailing List"




 
To: Struts Users Mailing List 
cc: (bcc: Glenn Deschenes/NAT/CMHC-SCHL/CA)

    Subject:    Re: FW: DynaActionForm: 
ArrayIndexOutOfBoundsException
 Classification: 
 


Take a look at

http://struts.apache.org/faqs/indexedprops.html
http://www.developer.com/java/other/article.php/2233591
http://wiki.apache.org/struts/StrutsCatalogLazyList

Also, search the archives (like
http://marc.theaimsgroup.com/?l=struts-user ) for "lazylist" to get
ideas on approaches to dealing with dynamically sized form fields.

Hubert




Re: FW: DynaActionForm: ArrayIndexOutOfBoundsException

2005-04-20 Thread Hubert Rabago
Take a look at

http://struts.apache.org/faqs/indexedprops.html
http://www.developer.com/java/other/article.php/2233591
http://wiki.apache.org/struts/StrutsCatalogLazyList

Also, search the archives (like
http://marc.theaimsgroup.com/?l=struts-user ) for "lazylist" to get
ideas on approaches to dealing with dynamically sized form fields.

Hubert


On 4/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I'm browsing thru the source code... any help would be extremely welcomed
> !
> 
> In addition this is the dump:
> 
> [20/04/05 13:10:31:116 EDT] 67e967e9 WebGroup  E SRVE0026E: [Servlet
> Error]-[BeanUtils.populate]: java.lang.ArrayIndexOutOfBoundsException
> at java.lang.Throwable.(Throwable.java)
> at java.lang.Throwable.(Throwable.java)
> at
> java.lang.ArrayIndexOutOfBoundsException.(ArrayIndexOutOfBoundsException.java:60)
> at java.lang.reflect.Array.get(Native Method)
> at
> org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:296)
> at
> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:474)
> at
> org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)
> at
> org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java)
> at
> org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java)
> at
> org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java)
> 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.java:821)
> at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
> 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
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
> at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
> at
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
> at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
> at
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
> at
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
> at
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
> at
> hronline.secure.app.HROnlineFilter.doFilter(HROnlineFilter.java:162)
> at
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
> at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
> at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
> at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
> at
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
> at
> com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
> at
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
> at
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
> at
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
> at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
> at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
> 
> 
> Hello,
> 
> I have a DynaActionForm such as:
>  "org.apache.struts.action.DynaActionForm">
> "org.apache.struts.util.ImageButtonBean">
> form-property>
> form-property>
> >
>
> form-property>
> form-property>
> "org.apache.struts.util.ImageButtonBean">
> form-property>
>
> 
> 
> If I assign 

FW: DynaActionForm: ArrayIndexOutOfBoundsException

2005-04-20 Thread gdeschen
I'm browsing thru the source code... any help would be extremely welcomed 
!

In addition this is the dump:

[20/04/05 13:10:31:116 EDT] 67e967e9 WebGroup  E SRVE0026E: [Servlet 
Error]-[BeanUtils.populate]: java.lang.ArrayIndexOutOfBoundsException
at java.lang.Throwable.(Throwable.java)
at java.lang.Throwable.(Throwable.java)
at 
java.lang.ArrayIndexOutOfBoundsException.(ArrayIndexOutOfBoundsException.java:60)
at java.lang.reflect.Array.get(Native Method)
at 
org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:296)
at 
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:474)
at 
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)
at 
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java)
at 
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java)
at 
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java)
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.java:821)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
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 
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at 
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at 
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at 
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at 
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
at 
hronline.secure.app.HROnlineFilter.doFilter(HROnlineFilter.java:162)
at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at 
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at 
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at 
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at 
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
at 
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at 
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at 
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at 
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)



Hello,

I have a DynaActionForm such as:

   
   
   
   
   
   
   
   
   
   


If I assign a size to the array such as:
   
It works fine.

My problem is two fold:
1. The HistoryVO[] can be of any size... therefore I cannot assgin a size 
to the 
2. The user can add rows dynamically to DOM using JavaScript... how can 
this also work with the DynaActionForm ?

Much appreciated,
Glenn

DynaActionForm: ArrayIndexOutOfBoundsException

2005-04-20 Thread gdeschen
Hello,

I have a DynaActionForm such as:

   
   
   
   
   
   
   
   
   
   


If I assign a size to the array such as:
   
It works fine.

My problem is two fold:
1. The HistoryVO[] can be of any size... therefore I cannot assgin a size 
to the 
2. The user can add rows dynamically to DOM using JavaScript... how can 
this also work with the DynaActionForm ?

Much appreciated,
Glenn