I just ran both your file-upload, file-upload-example, and one of my models, with extra debugging information thrown in. The uploaded files are not currently available in the Request Object as ANYTHING. There is no parameter or attribute that has the file data. This is the issue that I am referring to.
I have added extensive debugging code to ModelUpload, as well as placed XDoclet tags (and a few other things) into my version of it. Due to missing file parameters/attributes in the request object, I can't verify that the code is actually working. I know that it is not working with HEAD version of Keel, as it is not finding the file parameters in the request object. This is why I have not checked in what I have so far. If you want, I can email/ftp/whatever what I have to you.
As for the questions I have, the only one outstanding at the moment is in regards to Struts Client's ModelAction.execute. It diverged quite remarkably in 1.0 & HEAD, and as a result, I have not yet been able to determine how to effectively merge the two versions.
What I have been able to determine from the FileUploadModel failure is what block of code in ModelAction.execute v1.0 is reading in the file, and loading it as a parameter into the Model. I have also determined that for the application I am doing, there may be a problem. It will be routine for what I am working on to be receiving/sending Multi-Gigabyte sized files (specs are: min file size = 50MB, normal file size = .5GB - 2GB, max file size = 8GB). Storing something of this in memory may not be a good idea (or would the OS Virtual Memory Manager use page swapping and allow this?)
In regards to passing parameters via button clicks, yes, quite readily. You can start with; <INPUT TYPE="hidden" name"parameter name" value="value"> So long as the above is in the form, it will be passed along as part of the parameters with the contents of the form during submit actions. As for Command parameters, I have managed to dynamically embed them in the ACTION attribute of my form tag. If you need to know how, feel free to email me on/off list.
If you need anything more sophisticated, I will be happy to help out.
Regards, Steve
Santanu Dutt wrote:
Hi Steve,
First I did not get your querries on ModelAction. Could you please send me the querries again?
/I have not yet heard from Santanu on the changes to Strut's ModelAction, but I have figured out a piece of his intent. Currently, the Strut's client drops all files that are uploaded to it. Uploaded files are NOT available for Models to work with./
This is wrong because the file data is available as byte[] to the model. Look at FileUploadModel and the way it gets the file data and writes it to the server directory. Also you can pass all other form elements along with the file data to be processed in models.
Regards.
COMMAND and PARAM are used to pass parameters pertaining to a Command class when a particular button is clicked and the form is submitted./ There are some other additions that were made to the Strut's ModelAction v1.0 that I would like to know the whys about as well, specificially the generation of two hidden fields, COMMAND & PARAMS. I don't think they are necessary with the enhancements for 2.0, but I want to be sure. Santanu? Philip?/
It is definitely required in 1.0. About 2.0 I have to check but there must be a way to pass parameters for button clicks to figure out important things such as the process model to execute and so forth.
Regards.
Santanu
/
-- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741
http://keelframework.org/documentation Keelgroup mailing list [EMAIL PROTECTED] http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
