• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Newbie : Help to include a WOFileUpload as a D2WCustomComponent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie : Help to include a WOFileUpload as a D2WCustomComponent


  • Subject: Newbie : Help to include a WOFileUpload as a D2WCustomComponent
  • From: Gilles MATHURIN <email@hidden>
  • Date: Thu, 17 Aug 2006 17:02:01 -0400

Hello all,

I took some vacations on St-Marteen Island, and i am back now, hope you had a great last week.
I see that the discusison on the WOCommunity Topic has been exciting and rich


I'd like to contribute even i don't know how still.

Meanwhile, i need some clue to implement a WOFileUpload as a D2WCustomComponent
I managed to create a partial component and it displays in the D2WApp, but the file i choose is not saved in the database…


Here my files :

===
The CustomComponent : UploadDataPage
===


import com.webobjects.foundation.*; import com.webobjects.appserver.*; import com.webobjects.eocontrol.*; import com.webobjects.eoaccess.*;

public class UploadDataPage extends WOComponent {

	protected NSData aFileContents;
	protected String aMimeType;
	protected String aUrl;

	protected EOEnterpriseObject object;
	protected String key;

    public UploadDataPage(WOContext context) {
        super(context);
    }


public void takeValuesFromRequest(WORequest request, WOContext context) {
object.takeValueForKey(aFileContents, key);
}

public WOComponent addFile() {
object.takeValueForKey(aFileContents, key);
return null;
}


}

===
The Wod File
===

FileUpload1: WOFileUpload {
	data = aFileContents;
	mimeType = aMimeType;
}

Form1: WOForm {
	enctype = "mutlipart/form-data";
}

SubmitButton1: WOSubmitButton {
	action = addFile;
	value = "Click Here when done";
} _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Newbie : Help to include a WOFileUpload as a D2WCustomComponent
      • From: Chuck Hill <email@hidden>
  • Prev by Date: dBug WebObjects SIG Meeting - 8/22 (Seattle, WA)
  • Next by Date: Re: Newbie : Help to include a WOFileUpload as a D2WCustomComponent
  • Previous by thread: dBug WebObjects SIG Meeting - 8/22 (Seattle, WA)
  • Next by thread: Re: Newbie : Help to include a WOFileUpload as a D2WCustomComponent
  • Index(es):
    • Date
    • Thread