Hi Steve, I glad you are enjoying Click, interesting observation about Delphi. Click actually takes some inspiration from Delphi, in terms of components being named Controls and the control callback mechanism (closures in modern parlance).
FileFields <input type="file"/> are a little tricky as browsers have tight security restrictions around them to prevent them from being used to pick up files off a users computer. When I use FileFields I don't bind them directly to the Cayenne model but handle this manually in the on submit event handler. You will need to get the FileItem from the control and get the file data from that to add to your Cayenne entity. http://www.avoka.com/click-examples/control/file-upload.htm regards Malcolm Edgar On Fri, Jul 31, 2009 at 10:45 AM, Steve Wells<[email protected]> wrote: > Hi all, > > I've only just begun using Click and so far it looks like a winner, well > done guys on a simple and effective framework. Finally things are starting > to look they way they should for the end-user developer! It takes me way > back to my Delphi days. > > As a Cayenne user one of the most appealing facets was the slick integration > between the 2 frameworks. > > I have hit my first snag trying to use a FileField that links automagically > to a Cayenne object field of type byte[] (db is BLOB). The field displays > fine but as it is a Cayenne mandatory the commit fails with a Cayenne > validation exception; it looks like the screen field is not wired to the > Cayenne field. > > Is my approach wrong? > > Thank you, > > Steve > > >
