I'd like to describe a field that should point to
a file on the
server's disk.
The precise use-case is that I have a seaside component to displays
bibliographies in Pier, and I would like to have it display the
contents of a .bib file, which is under SVN or similar
version/replication control (so it will be updated sometimes without
going through Squeak).
Currently I'm using MAFileDescription new kind:
MAExternalFileModel; ...
but that makes Pier ask for a file to upload, when I'd like to specify
a server-specific file path.
I was thinking of subclassing MAFileModel but now I suspect that
defining MAServerFileChooserComponent is the way... correct ?
Yes, in your case you certainly need to create your own file chooser
dialog. I don't exactly remember the details on how
MAExternalFileModel is implemented, probably you need to subclass the
model as well (unless it supports to freely specify the location).
PS. why does MAFileUploadComponent>>#isMultipart
actually mean "no
file yet"?
This is used by Seaside to determine if the form has to be a multi-
part form. There is only a file-upload control if there is "no file
yet" and therefor the form only needs to be multipart in that case.
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch