D2W And ERAttachment
D2W And ERAttachment
- Subject: D2W And ERAttachment
- From: Kevin Hinkson <email@hidden>
- Date: Mon, 15 Aug 2011 16:36:17 -0400
Hi, I've implemented a D2W on an EOModel containing a Place EO with a flattened to-many relationship to ERAttachment (Place >> PlaceERAttachment >> ERAttachment). "Place" has several other properties so I created a new action in MenuHeader.java using EditPageInterface and the rule to enable a wizard and that works fine.
For actually adding new photos within the wizard things seem to fall apart. Initially I was getting an exception about the abstract class ERAttachment being instantiated, but "solved" that by mapping the relationship to ERFileAttachment instead of ERAttachment.
I've also attempted to add a rule to tell D2W how to edit an ERAttachment.
Using: ( entity.name = 'Place' and task = 'edit' and propertyKey = 'photos') => componentName = "ERMD2WEditAttachment" Gives me: java.lang.ClassCastException: com.webobjects.eocontrol._EOCheapCopyMutableArray cannot be cast to er.attachment.model.ERAttachment
So... Using: (task = 'edit' and entity.name = 'PlaceERFileAttachment' and propertyKey = 'erFileAttachment') => componentName = "ERMD2WEditAttachment" Gives me: java.lang.IllegalArgumentException: This form is missing a 'enctype=multipart/form-data' attribute. It is required for WOFileUpload to work.
And now I'm not sure how else to proceed. Does anyone have any suggestions?
— K.R.H.
|
_______________________________________________
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