Are the file upload and submit buttons in a WOForm?

On Jun 16, 2006, at 9:26 PM, Gilles MATHURIN wrote:

Hello everyone,

i don't manage to record an image file in my Openbase database with a webobject application. This webapp use a WOFileUpload and a Submit Button which is bind to this action method :

public WOComponent addToDB()
    {   
                
                EOEditingContext ec = session().defaultEditingContext();
                
                NSData fileContents = new NSData(aFileContents);
                
                artisteItem.setPhotoID(fileContents);
                
                ec.saveChanges();
                
                return null;

        }

PhotoID is an attribute of my EOModel set to "binary" for External type and "NSData" for Value Class.

i have this in my .wod file :

FileUpload2: WOFileUpload {
        data = aFileContents;
        filePath = aFileName;
        mimeType = aMimeType;

And here are my instance variable declared in my Main.java file :

protected NSData aFileContents;
    protected String aFileName;
    protected String aMimeType;
    protected Artiste artiste;
    public Artiste artisteItem;


Anyone can help please ?


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]

--
Coming sometime... - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to