I have similar requirements. In the roo shell I typed:
Code:
field other --fieldName actualfile --type java.io.File
The generated .java RooEntity correctly includes the "actualFile" with its appropriate type:
Code:
private File actualfile;
However, the generated create.jspx uses a field:input tag instead of creating a file upload mechanism. I manually set render to false and z to user-managed and decided to write in a file upload box:
Code:
<field:input render="false" field="actualfile" id="c_com_blah_Attachment_actualfile" z="user-managed"/>
<input type="file" name="actualfile" size="50"> </input>
It seems to save at least the filename with the entity. I'm not yet sure if it is persisting the file contents to the database or if there is a mechanism I can later allow downloading of the file.
Will let you know if I find anything.