> These are a couple of suggestions I have for the next version > of struts: > 1.. Can get the session in the ActionForm constructor. This > would be very useful for initializing with data attached to > the session.
This violates the JavaBean standard which requires that beans have a default (no-arg) constructor. You can get to the session -- or whatever scope object you need -- via the validate(ActionMapping, HttpServletRequest) method inherited from ActionForm. > 2.. Have a pre-page method in the Action that can be set in > an <action> like validate="true". This would give the Action > class a chance to determine if this page can be displayed and > do a forward if it cannot. For example in pages 2 - N of a > multi-page series of forms. I agree that a general page-flow restriction mechanism would be a boon. I've had to develop my own, and I'm sure I'm not alone in this. > 3.. Allow an <action> with no form. This would be useful > where a page has a form that is just a submit button. No > ActionForm is needed but the <html:form> is still prefered > for the action it submits to. I don't understand. If the page has no form, why would you need a submit button instead of just a link? You could also just use a regular HTML <form> tag that directly submits to the URL of the action in question. In any case, action mappings aren't required to have a name attribute. >From struts-config_1_1.dtd: name Name of the form bean, if any, that is associated with this action mapping. -= J --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]