Re: Making Struts Build Easier (Re: "coming out" for JSF + Struts, was: Struts JSR?)
David Graham <[EMAIL PROTECTED]> wrote: > Personally, I find the Struts build files to be complex and confusing. Two weeks ago, I tried to build the struts 1.1 source package against commons-collections-3.0.jar in order to run the unit tests and insure struts still worked properly. After several hours of trying to set it up and make it work, I finally gave up. There is definitely room for improvement in the build/test process. Like those who posted before me, I don't care if it's ant or maven, only that it works. As a counter-example, on the Cayenne project we have 24 external jar files that are stored in "otherlib" on CVS, but at least the project builds and tests "out of the box." -Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [PROPOSAL] Struts infrastructure changes: Jira
Martin Cooper <[EMAIL PROTECTED]> wrote: > Optional: Move to Jira (IMO, now's as good a time as any.) One thing I've noticed about Jira is that attachments cannot be deleted general developers, only members of the Jira admin group. Not sure if that's an issue. As a general user, I've found Jira far easier to use than Bugzilla. I haven't been using it as a developer long enough to comment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reviving PageController (ViewController?) discussion?
Hubert Rabago <[EMAIL PROTECTED]> wrote: > In such a case, (A) do we facilitate it by letting the function return > another ForwardConfig which is associated with another form? Or (B) should > the method just use the new createActionForm to create new forms and store > them in the right scope? > > (B) If we use createActionForm with an additional RequestUtils > (ResponseUtils? oops, deprecated.) method to "set" a form. RequestUtils > creates the blank form, the PageController populates it, and a RequestUtils > method sets the form in the proper scope using the proper attribute name. I'm not sure if this is related, but under Struts 1.1, I found it to be very frustrating to try to create additional initialized actionForms in an action. I wanted to create another DynaValidatorForm, but there appeared to be no way to easily do this. I eventually ended up creating a custom ActionForm class, then pulling pieces of code out of RequestProcessor.processActionForm() to get it installed. It'd be great if a utility method were available to create additional defined form-beans. The 1.1 createActionForm was not of any value. -Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Suggestion: way to execute code after form.validate(mapping, request) fails, but before forward to input
"Gupta, Sahil" <[EMAIL PROTECTED]> wrote: > I think that Mike is talking about the case where he uses the validation fwk. > There is no way, what he is asking for can be done with the current > implementation(but for implementing the processValidate in your own RP) of > the RP but i think that this should be a nice addition to the future > implementation. Right. Since processValidate calls doForward([input]), it's too late to check ActionErrors after calling processValidate. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Suggestion: way to execute code after form.validate(mapping, request) fails, but before forward to input
I'm using Struts 1.1. I want to execute code only if validation fails, but before the forward to the input action. Unfortunately, it seems that RequestProcessor.processValidate() has tightly-coupled these two activities, leaving no way for such activity to be triggered. At first, I thought I could subclass RequestProcessor and set a boolean variable before calling processValidate() and check it on doForward(), executing my code if the variable was set, but this will probably fail in a multithreaded environment. Even if I could make this work by temporarily setting attributes on my request, it'd still be an ugly hack. I don't see any reasonable solution to my problem other than subclassing RequestProcessor, copying processValidate() into it, and making my change there, which seems likely to break after a struts upgrade. I'd like to recommend that in some future struts version that RequestProcessor.processValidate() provide a hook for executing code between failed validation and forwarding to the input mapping. In fact, it seems to me that this whole section of code == // Has an input form been specified for this mapping? String input = mapping.getInput(); if (input == null) { if (log.isTraceEnabled()) { log.trace(" Validation failed but no input form available"); } response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, getInternal().getMessage("noInput", mapping.getPath())); return (false); } // Save our error messages and return to the input form if possible if (log.isDebugEnabled()) { log.debug(" Validation failed, returning to '" + input + "'"); } request.setAttribute(Globals.ERROR_KEY, errors); if (moduleConfig.getControllerConfig().getInputForward()) { ForwardConfig forward = mapping.findForward(input); processForwardConfig( request, response, forward); } else { internalModuleRelativeForward(input, request, response); } == should be moved to the equivalent of a RequestProcessor.processValidateFailure() method which could then be subclassed. -Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]