DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8742>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8742 redisplay DynaActionForm in view [SUGGESTIONS] [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|redisplay DynaActionForm in |redisplay DynaActionForm in |view |view [SUGGESTIONS] ------- Additional Comments From [EMAIL PROTECTED] 2002-05-06 07:57 ------- Hi, The file I upload isn't a patch, haow make a patch ? I add a method to requestutil, here the signature : /** * Locate and return the specified indexed property of the specified bean, * from an optionally specified scope, in the specified page context. If an * exception is thrown, it will have already been saved via a call to * <code>saveException()</code>. * * @param pageContext Page context to be searched * @param name Name of the bean to be retrieved * @param property Name of the property to be retrieved, or * <code>null</code> to retrieve the bean itself * @param tabindex index of the value in the array property, or * <code>null</code> to retrieve the property itself * @param scope Scope to be searched (page, request, session, application) * or <code>null</code> to use <code>findAttribute()</code> instead * * @exception JspException if property is not an array * @exception JspException if an invalid index * @exception JspException if an invalid scope name * is requested * @exception JspException if the specified bean is not found * @exception JspException if accessing this property causes an * IllegalAccessException, IllegalArgumentException, * InvocationTargetException, or NoSuchMethodException */ public static Object lookup(PageContext pageContext, String name, String property, String tabindex, String scope); But here a suggestion, before redisplay a DynaForm bean with indexed property, all the array must be initialised. So the size must be know. So should we add a attribute in struts-config.dtd to set the default size of the indexed property, and when we create an DynaActionForm, the requestutil initalize the indexed property with the default size ? Like this: <form-bean name="toto" type ="TotoForm"> <form-property name="list" type="java.lang.String[]" size="10"/> <form-bean/> or like that: <form-bean name="toto" type ="TotoForm"> <form-property name="list" type="java.lang.String[10]"> <form-bean/> Another suggestion, a DynaForm is totally dynamic and defined in xml format, but why merge java declaration and xml declaration only for indexed property: public class TotoForm extends DynaActionForm { private String firtname=""; // set/get... private String lastname=""; // set/get... } <form-bean name="toto" type ="TotoForm"> <form-property name="list" type="java.lang.String[10]"> <form-bean/> so we read the bean like this: firstname : totoForm.getFirstname(); lastname : totoForm.getLastname(); list : totoForm.get("list"); list[i] : totoForm.get("list",i); Regards, Emmanuel -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>