• 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
Re: [Solved] FileUpload with D2W
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Solved] FileUpload with D2W


  • Subject: Re: [Solved] FileUpload with D2W
  • From: Guido Neitzer <email@hidden>
  • Date: Thu, 24 Nov 2005 11:10:13 +0100

On 23.11.2005, at 16:34 Uhr, David Teran wrote:

myUploadComponent extends ERDCustomEditComponent

just adding a description string, a WOFileUpload and a submit button (for the fileupload). Then i modify a rule:

task='edit' and entity.name='Whatever' -> displayPropertyKeys = '(key1, key2, fileUpload, key3, key4)'

task='edit' and entity.name='Whatever' and propertyKey = 'fileUpload' -> componentName = myUploadComponent

This works fine. Adding a little bit more magic and you can reuse the component for -all- fileuploads.

Okay, I have tested this because I was interested in doing it "the right way" with a property level component and I just can't get it working correctly.


I have created a component inheriting from ERDCustomEditComponent. This has just a WOFileUpload and a submit button, a method for the submit (which isn't actually called :-(), two conditionals to provide the fileupload only if the data property is null and at least a hyperlink with a "removeData" action.

I have also created a rule to add the "enctype" to the enclosing form.

Now - if I have this setup, my own "submitData" action IS NOT called. If I don't have the rule setting the enctype, my own action IS called but the file is not transferred. Okay, I expected the second but not the first.

So, I could have lived with my own action not being called and do all processing in the EO (as it is the better place to do). But the behaviour I get now, is not, what I expect: I have set the mimetype and filename attribute to be non null in my file entity. When I click on "my" submit button which doesn't call "my" action but another one, I get the error message that I have to provide input in filename and mimetype - but they ARE SET when the page returns! When I remove the "not null" constraint from my model, the mimetype isn't set at all.

Some hints where I can look what I'm doing wrong?

I use Wonder (a few weeks old), WebObjects 5.2.4 on Tiger.

cug

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >FileUpload with D2W (From: Guido Neitzer <email@hidden>)
 >[Solved] FileUpload with D2W (From: Guido Neitzer <email@hidden>)
 >Re: [Solved] FileUpload with D2W (From: David Teran <email@hidden>)

  • Prev by Date: Re: Web Services example projects
  • Next by Date: WebServices . Win and Mac - work in the pair
  • Previous by thread: Re: [Solved] FileUpload with D2W
  • Next by thread: Web Services example projects
  • Index(es):
    • Date
    • Thread